The class
error_condition describes an object used to hold values identifying
error conditions
. [
Note 1:
error_condition values are portable abstractions,
while
error_code values (
[syserr.errcode]) 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_;
};
}