diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index 755b52f..5ff3882 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -610,9 +610,8 @@ public: template constexpr error_code( ErrorCodeEnum e ) noexcept; - template - 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 constexpr error_code & operator=( ErrorCodeEnum e ) noexcept; - template - 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::value` is `true`. ``` -template - 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::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::value` is `true`. ``` -template - 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::value` is `true`. +Effects: :: `*this = error_code( ec, loc )`. ``` constexpr void clear() noexcept;