diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index b3f9164..f5be6ab 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -622,6 +622,16 @@ namespace boost { friend bool operator!=( const std::error_code & lhs, const error_code & rhs ) noexcept; + template + friend constexpr bool operator==( const error_code & lhs, E rhs ) noexcept; + template + friend constexpr bool operator==( E lhs, const error_code & rhs ) noexcept; + + template + friend constexpr bool operator!=( const error_code & lhs, E rhs ) noexcept; + template + friend constexpr bool operator!=( E lhs, const error_code & rhs ) noexcept; + // conversions: operator std::error_code() const; @@ -818,11 +828,11 @@ Returns: :: If `code` wraps a `std::error_code` object `ec`, `ec == static_cast< Otherwise, `code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() )`. ``` -friend constexpr bool operator!=( const error_code & lhs, +friend bool operator!=( const error_code & lhs, const error_condition & rhs ) noexcept; ``` ``` -friend constexpr bool operator!=( const error_condition & lhs, +friend bool operator!=( const error_condition & lhs, const error_code & rhs ) noexcept; ``` [none] @@ -862,6 +872,48 @@ friend bool operator!=( const std::error_code & lhs, Returns: :: `!( lhs == rhs )`. +``` +template +friend constexpr bool operator==( const error_code & lhs, E rhs ) noexcept; +``` +[none] +* {blank} ++ +Effects: :: +[disc] +** When `is_error_code_enum::value` is `true`, returns `lhs == make_error_code(rhs)`; +** When `is_error_condition_enum::value` is `true`, returns `lhs == make_error_condition(rhs)`; +** Otherwise, this overload is disabled. + +``` +template +friend constexpr bool operator==( E lhs, const error_code & rhs ) noexcept; +``` +[none] +* {blank} ++ +Effects: :: +[disc] +** When `is_error_code_enum::value` is `true`, returns `make_error_code(lhs) == rhs`; +** When `is_error_condition_enum::value` is `true`, returns `make_error_condition(lhs) == rhs`; +** Otherwise, this overload is disabled. + +``` +template +friend constexpr bool operator!=( const error_code & lhs, E rhs ) noexcept; +``` +``` +template +friend constexpr bool operator!=( E lhs, const error_code & rhs ) noexcept; +``` +[none] +* {blank} ++ +Returns: :: `!( lhs == rhs )`. +Remarks: :: These overloads are only enabled when + `is_error_code_enum::value` is `true` or + `is_error_condition_enum::value` is `true`. + #### Conversions ```