diff --git a/doc/system/changes.adoc b/doc/system/changes.adoc index 218d56f..dce808c 100644 --- a/doc/system/changes.adoc +++ b/doc/system/changes.adoc @@ -12,6 +12,8 @@ https://www.boost.org/LICENSE_1_0.txt * {cpp}03 is no longer supported; a {cpp}11 compiler is required. (This includes GCC 4.8 or later, and MSVC 14.0 (VS 2015) or later.) * The deprecated header `boost/system/cygwin_error.hpp` has been removed. +* The original and obsolete (32 bit) MinGW is no longer supported. MinGW-w64 (both 64 and 32 bit) is still supported. +* `operator&` now works for `result` (by way of taking a nullary function.) ## Changes in Boost 1.84 diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index 5d86306..41eaa10 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -2655,6 +2655,24 @@ result convert( double amount, currency_type from, currency_type to ) } ``` +``` +template + result operator&( result const& r, F&& f ); +``` +[none] +* {blank} ++ +Returns the error in `r`, or if `r` contains a value, replaces it with the result of calling `f`. ++ +Let `U` be the type of `f()`. ++ +Effects: :: + - If `r.has_value()` is `true`, returns `f()`. + - Otherwise, returns `r.error()`. +Remarks: :: + Only enabled when `U` is not an instance of `result`. + + ``` template R operator&( result const& r, F&& f ); template R operator&( result&& r, F&& f ); @@ -2703,6 +2721,24 @@ int get_port( JsonValue const& config, int def ) } ``` +``` +template R operator&( result const& r, F&& f ); +``` +[none] +* {blank} ++ +Returns the error in `r`, or if `r` contains a value, another `result` obtained +by invoking the function `f`. ++ +Let `R` be the type of `f()`. ++ +Effects: :: + - If `r.has_value()` is `true`, returns `f()`. + - Otherwise, returns `r.error()`. +Remarks: :: + Only enabled when `R` is an instance of `result` and `E` is convertible to `R::error_type`. + + #### operator&= ```