@@ -1263,6 +1263,18 @@ class expected : private detail::expected_move_assign_base<T, E>,
12631263 return and_then_impl (*this , std::forward<F>(f));
12641264 }
12651265
1266+ #if defined(TL_EXPECTED_BIND_OPERATORS)
1267+ template <class F > TL_EXPECTED_11_CONSTEXPR auto operator >=(F &&f) & {
1268+ return and_then_impl (*this , std::forward<F>(f));
1269+ }
1270+ template <class F > TL_EXPECTED_11_CONSTEXPR auto operator >=(F &&f) && {
1271+ return and_then_impl (std::move (*this ), std::forward<F>(f));
1272+ }
1273+ template <class F > constexpr auto operator >=(F &&f) const & {
1274+ return and_then_impl (*this , std::forward<F>(f));
1275+ }
1276+ #endif
1277+
12661278 template <class F > TL_EXPECTED_11_CONSTEXPR auto and_also (F &&f) & {
12671279 return and_also_impl (*this , std::forward<F>(f));
12681280 }
@@ -1273,6 +1285,18 @@ class expected : private detail::expected_move_assign_base<T, E>,
12731285 return and_also_impl (*this , std::forward<F>(f));
12741286 }
12751287
1288+ #if defined(TL_EXPECTED_BIND_OPERATORS)
1289+ template <class F > TL_EXPECTED_11_CONSTEXPR auto operator >(F &&f) & {
1290+ return and_also_impl (*this , std::forward<F>(f));
1291+ }
1292+ template <class F > TL_EXPECTED_11_CONSTEXPR auto operator >(F &&f) && {
1293+ return and_also_impl (std::move (*this ), std::forward<F>(f));
1294+ }
1295+ template <class F > constexpr auto operator >(F &&f) const & {
1296+ return and_also_impl (*this , std::forward<F>(f));
1297+ }
1298+ #endif
1299+
12761300#ifndef TL_EXPECTED_NO_CONSTRR
12771301 template <class F > constexpr auto and_then (F &&f) const && {
12781302 return and_then_impl (std::move (*this ), std::forward<F>(f));
@@ -1281,6 +1305,16 @@ class expected : private detail::expected_move_assign_base<T, E>,
12811305 template <class F > constexpr auto and_also (F &&f) const && {
12821306 return and_also_impl (std::move (*this ), std::forward<F>(f));
12831307 }
1308+
1309+ #if defined(TL_EXPECTED_BIND_OPERATORS)
1310+ template <class F > constexpr auto operator >=(F &&f) const && {
1311+ return and_then_impl (std::move (*this ), std::forward<F>(f));
1312+ }
1313+
1314+ template <class F > constexpr auto operator >(F &&f) const && {
1315+ return and_also_impl (std::move (*this ), std::forward<F>(f));
1316+ }
1317+ #endif
12841318#endif
12851319
12861320#else
@@ -1300,6 +1334,24 @@ class expected : private detail::expected_move_assign_base<T, E>,
13001334 return and_then_impl (*this , std::forward<F>(f));
13011335 }
13021336
1337+ #if defined(TL_EXPECTED_BIND_OPERATORS)
1338+ template <class F >
1339+ TL_EXPECTED_11_CONSTEXPR auto
1340+ operator >=(F &&f) & -> decltype (and_then_impl(std::declval<expected&>(), std::forward<F>(f))) {
1341+ return and_then_impl (*this , std::forward<F>(f));
1342+ }
1343+ template <class F >
1344+ TL_EXPECTED_11_CONSTEXPR auto operator >=(F &&f) && -> decltype (
1345+ and_then_impl (std::declval<expected&&>(), std::forward<F>(f))) {
1346+ return and_then_impl (std::move (*this ), std::forward<F>(f));
1347+ }
1348+ template <class F >
1349+ constexpr auto operator >=(F &&f) const & -> decltype(
1350+ and_then_impl (std::declval<expected const &>(), std::forward<F>(f))) {
1351+ return and_then_impl (*this , std::forward<F>(f));
1352+ }
1353+ #endif
1354+
13031355 template <class F >
13041356 TL_EXPECTED_11_CONSTEXPR auto
13051357 and_also (F &&f) & -> decltype(and_also_impl(std::declval<expected&>(), std::forward<F>(f))) {
@@ -1316,6 +1368,24 @@ class expected : private detail::expected_move_assign_base<T, E>,
13161368 return and_also_impl (*this , std::forward<F>(f));
13171369 }
13181370
1371+ #if defined(TL_EXPECTED_BIND_OPERATORS)
1372+ template <class F >
1373+ TL_EXPECTED_11_CONSTEXPR auto
1374+ operator >(F &&f) & -> decltype (and_also_impl(std::declval<expected&>(), std::forward<F>(f))) {
1375+ return and_also_impl (*this , std::forward<F>(f));
1376+ }
1377+ template <class F >
1378+ TL_EXPECTED_11_CONSTEXPR auto operator >(F &&f) && -> decltype (
1379+ and_also_impl (std::declval<expected&&>(), std::forward<F>(f))) {
1380+ return and_also_impl (std::move (*this ), std::forward<F>(f));
1381+ }
1382+ template <class F >
1383+ constexpr auto operator >(F &&f) const & -> decltype(
1384+ and_also_impl (std::declval<expected const &>(), std::forward<F>(f))) {
1385+ return and_also_impl (*this , std::forward<F>(f));
1386+ }
1387+ #endif
1388+
13191389#ifndef TL_EXPECTED_NO_CONSTRR
13201390 template <class F >
13211391 constexpr auto and_then (F &&f) const && -> decltype(
0 commit comments