The class error_condition describes an object used to hold values identifying error conditions. [ Note: error_condition values are portable abstractions, while error_code values are implementation specific. — end note ]
namespace std { class error_condition { public: error_condition() noexcept; error_condition(int val, const error_category& cat) noexcept; template <class ErrorConditionEnum> error_condition(ErrorConditionEnum e) noexcept; void assign(int val, const error_category& cat) noexcept; template <class ErrorConditionEnum> error_condition& operator=(ErrorConditionEnum e) noexcept; void clear() noexcept; int value() const noexcept; const error_category& category() const noexcept; string message() const; explicit operator bool() const noexcept; private: int val_; const error_category* cat_; }; }22.5.4.2 Class error_condition constructors [syserr.errcondition.constructors]
error_condition() noexcept;
Effects: Constructs an object of type error_condition.
Postconditions: val_ == 0 and cat_ == &generic_category().
error_condition(int val, const error_category& cat) noexcept;
Effects: Constructs an object of type error_condition.
Postconditions: val_ == val and cat_ == &cat.
template <class ErrorConditionEnum> error_condition(ErrorConditionEnum e) noexcept;
Effects: Constructs an object of type error_condition.
Postconditions: *this == make_error_condition(e).
Remarks: This constructor shall not participate in overload resolution unless
is_error_condition_enum_v<ErrorConditionEnum> is true.
void assign(int val, const error_category& cat) noexcept;
Postconditions: val_ == val and cat_ == &cat.
template <class ErrorConditionEnum> error_condition& operator=(ErrorConditionEnum e) noexcept;
Postconditions: *this == make_error_condition(e).
Remarks: This operator shall not participate in overload resolution unless
is_error_condition_enum_v<ErrorConditionEnum> is true.
void clear() noexcept;
Postconditions: value() == 0 and category() == generic_category().
22.5.4.4 Class error_condition observers [syserr.errcondition.observers]int value() const noexcept;
const error_category& category() const noexcept;
string message() const;
Returns: category().message(value()).
explicit operator bool() const noexcept;
error_condition make_error_condition(errc e) noexcept;
Returns: error_condition(static_cast<int>(e), generic_category()).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4