From f2d3a0decffbf64f73583e37e0455bcfe3a4ff65 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 2 Oct 2021 01:39:06 +0300 Subject: [PATCH] Update documentation --- doc/system/reference.adoc | 43 ++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index ee6e72f..63fb77e 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -571,9 +571,13 @@ public: error_code( int val, const error_category & cat, boost::source_location const * loc ) noexcept; - template + template constexpr error_code( ErrorCodeEnum e ) noexcept; + template + error_code( ErrorCodeEnum e, boost::source_location const * loc ) + noexcept; + error_code( std::error_code const& ec ) noexcept; // modifiers @@ -583,9 +587,13 @@ public: void assign( int val, const error_category & cat, boost::source_location const * loc ) noexcept; - template + template constexpr error_code & operator=( ErrorCodeEnum e ) noexcept; + template + void assign( ErrorCodeEnum e, + boost::source_location const * loc ) noexcept; + constexpr void clear() noexcept; // observers @@ -657,7 +665,7 @@ public: // stream insertion - template + template friend std::basic_ostream& operator<<( basic_ostream& os, const error_code & ec ); }; @@ -699,7 +707,7 @@ Requires: :: `loc` points to a valid `boost::source_location` object with static Ensures: :: `value() == val`; `category() == cat`; `has_location()`; `&location() == loc`. ``` -template +template constexpr error_code( ErrorCodeEnum e ) noexcept; ``` [none] @@ -708,6 +716,19 @@ template 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; +``` +[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`. + ``` error_code( std::error_code const & ec ) noexcept; ``` @@ -737,7 +758,7 @@ void assign( int val, const error_category & cat, Effects: :: `*this = error_code( val, cat, loc )`. ``` -template +template constexpr error_code & operator=( ErrorCodeEnum e ) noexcept; ``` [none] @@ -746,6 +767,18 @@ template 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; +``` +[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`. + ``` constexpr void clear() noexcept; ```