Update documentation

This commit is contained in:
Peter Dimov
2022-05-05 21:15:03 +03:00
parent 648a35838b
commit 7dec756a6f

View File

@ -610,9 +610,8 @@ public:
template<class ErrorCodeEnum>
constexpr error_code( ErrorCodeEnum e ) noexcept;
template<class ErrorCodeEnum>
error_code( ErrorCodeEnum e, boost::source_location const * loc )
noexcept;
error_code( error_code const& ec,
boost::source_location const * loc ) noexcept;
error_code( std::error_code const& ec ) noexcept;
@ -626,9 +625,8 @@ public:
template<class ErrorCodeEnum>
constexpr error_code & operator=( ErrorCodeEnum e ) noexcept;
template<class ErrorCodeEnum>
void assign( ErrorCodeEnum e,
boost::source_location const * loc ) noexcept;
void assign( error_code const& ec,
boost::source_location const * loc ) noexcept;
constexpr void clear() noexcept;
@ -757,17 +755,17 @@ Ensures: :: `*this == make_error_code( e )`.
Remarks: :: This constructor is only enabled when `is_error_code_enum<ErrorCodeEnum>::value` is `true`.
```
template<class ErrorCodeEnum>
error_code( ErrorCodeEnum e, boost::source_location const * loc ) noexcept;
error_code( error_code const& ec,
boost::source_location const * loc ) noexcept;
```
[none]
* {blank}
+
Requires: :: `loc` points to a valid `boost::source_location` object with static storage duration.
Ensures: :: `*this == make_error_code( e )`.
Remarks: :: This constructor is only enabled when `is_error_code_enum<ErrorCodeEnum>::value` is `true`.
When `make_error_code( e )` is not a default-constructed `error_code` and doesn't wrap a
`std::error_code`, `has_location()` is `true` and `&location()` is `loc`.
Requires: :: `loc` points to a valid `boost::source_location` object with static storage duration, or is `nullptr`.
Ensures: :: `*this == ec`.
Remarks: :: When `ec` is a default-constructed `error_code` or wraps a `std::error_code`,
or when `loc` is `nullptr`, `*this` stores no location (`has_location()` is `false`).
Otherwise, `*this` stores `loc` (`has_location()` is `true` and `&location()` is `loc`.)
```
error_code( std::error_code const & ec ) noexcept;
@ -808,16 +806,13 @@ Ensures: :: `*this == make_error_code( e )`.
Remarks: :: This operator is only enabled when `is_error_code_enum<ErrorCodeEnum>::value` is `true`.
```
template<class ErrorCodeEnum>
void assign( ErrorCodeEnum e,
boost::source_location const * loc ) noexcept;
void assign( error_code const& ec,
boost::source_location const * loc ) noexcept;
```
[none]
* {blank}
+
Requires: :: `loc` points to a valid `boost::source_location` object with static storage duration.
Effects: :: `*this = error_code( e, loc )`.
Remarks: :: This function is only enabled when `is_error_code_enum<ErrorCodeEnum>::value` is `true`.
Effects: :: `*this = error_code( ec, loc )`.
```
constexpr void clear() noexcept;