mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 20:47:14 +02:00
Update documentation
This commit is contained in:
@ -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<void>` (by way of taking a nullary function.)
|
||||
|
||||
## Changes in Boost 1.84
|
||||
|
||||
|
@ -2655,6 +2655,24 @@ result<double> convert( double amount, currency_type from, currency_type to )
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
template<class E, class F, class U = ...>
|
||||
result<U, E> operator&( result<void, E> 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<class T, class E, class F, class R = ...> R operator&( result<T, E> const& r, F&& f );
|
||||
template<class T, class E, class F, class R = ...> R operator&( result<T, E>&& r, F&& f );
|
||||
@ -2703,6 +2721,24 @@ int get_port( JsonValue const& config, int def )
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
template<class E, class F, class R = ...> R operator&( result<void, E> 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&=
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user