Scroll to navigation

std::error_condition(3) C++ Standard Libary std::error_condition(3)

NAME

std::error_condition - std::error_condition

Synopsis


Defined in header <system_error>
class error_condition; (since C++11)


std::error_condition is a platform-independent error code. Like std::error_code, it
is uniquely identified by an integer value and a std::error_category, but unlike
std::error_code, the value is not platform-dependent.


A typical implementation holds one integer data member (the value) and a pointer to
an std::error_category.

Member functions


constructor constructs an error_condition
(public member function)
operator= replaces the contents
(public member function)
assign replaces the contents
(public member function)
clear sets the error_condition to value 0 in generic_category
(public member function)
value obtains the value of the error_condition
(public member function)
category obtains the error_category for this error_condition
(public member function)
message obtains the explanatory string
(public member function)
operator bool checks if the value is non-zero
(public member function)

Non-member functions


operator==
operator!=
operator< compares error_conditions and error_codes
operator<=> (function)
(removed in C++20)
(removed in C++20)
(C++20)

Helper classes


is_error_condition_enum identifies an enumeration as an std::error_condition
(C++11) (class template)
std::hash<std::error_condition> hash support for std::error_condition
(C++17) (class template specialization)

See also


error_code holds a platform-dependent error code
(C++11) (class)
error_category base class for error categories
(C++11) (class)
make_error_condition(std::errc) constructs an std::errc error condition
(C++11) (function)

2022.07.31 http://cppreference.com