std::error_condition

From cppreference.com
< cpp‎ | error
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)
 
Diagnostics library
Exception handling
Exception handling failures
(until C++17)
(until C++17)
(C++11)(until C++17)
(until C++17)
Error codes
Error codes
Exception categories
System error support
error_condition
(C++11)
(C++11)
(C++11)
Assertions
Stacktrace
 
 
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

constructs an error_condition
(public member function)
replaces the contents
(public member function)
replaces the contents
(public member function)
sets the error_condition to value 0 in generic_category
(public member function)
obtains the value of the error_condition
(public member function)
obtains the error_category for this error_condition
(public member function)
obtains the explanatory string
(public member function)
checks if the value is non-zero
(public member function)

Non-member functions

(removed in C++20)(removed in C++20)(C++20)
compares error_conditions and error_codes
(function)

Helper classes

identifies an enumeration as an std::error_condition
(class template)
hash support for std::error_condition
(class template specialization)

See also

holds a platform-dependent error code
(class)
base class for error categories
(class)
constructs an std::errc error condition
(function)