mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 12:37:13 +02:00
Update documentation
This commit is contained in:
@ -14,6 +14,7 @@ https://www.boost.org/LICENSE_1_0.txt
|
||||
* 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.)
|
||||
* Added `operator|=` for `result`.
|
||||
|
||||
## Changes in Boost 1.84
|
||||
|
||||
|
@ -2618,6 +2618,41 @@ int get_port()
|
||||
}
|
||||
```
|
||||
|
||||
#### operator|=
|
||||
|
||||
```
|
||||
template<class T, class E, class U> result<T, E>& operator|=( result<T, E>& r, U&& u );
|
||||
```
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
If `r` contains an error, assigns a value to it, constructed from `u`.
|
||||
+
|
||||
Effects: ::
|
||||
If `r.has_value()` is `false`, assigns `u` to `r`.
|
||||
Returns: ::
|
||||
`r`.
|
||||
Remarks: ::
|
||||
Only enabled when `U` is convertible to `T`.
|
||||
|
||||
```
|
||||
template<class T, class E, class F> result<T, E>& operator|=( result<T, E>& r, F&& f );
|
||||
```
|
||||
[none]
|
||||
* {blank}
|
||||
+
|
||||
If `r` contains an error, assigns `f()` to it.
|
||||
+
|
||||
Effects: ::
|
||||
If `r.has_value()` is `false`, assigns `f()` to `r`.
|
||||
Returns: ::
|
||||
`r`.
|
||||
Remarks: ::
|
||||
Only enabled when the type of `f()` is either
|
||||
- convertible to `T` or
|
||||
- an instance of `result` convertible to `result<T, E>`.
|
||||
|
||||
|
||||
#### operator&
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user