Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/error/error condition"

From cppreference.com
< cpp‎ | error
m (Use since= and until= params of {{ddcl}} template.)
(Helper classes: +)
Line 29: Line 29:
 
{{dsc begin}}
 
{{dsc begin}}
 
{{dsc inc | cpp/error/error_condition/dsc is_error_condition_enum}}
 
{{dsc inc | cpp/error/error_condition/dsc is_error_condition_enum}}
 +
{{dsc inc | cpp/error/error_condition/dsc hash}}
 
{{dsc end}}
 
{{dsc end}}
  

Revision as of 14:36, 14 November 2016

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
 
 
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.

Contents

Member functions

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

Non-member functions

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

Helper classes

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

See also

holds a platform-dependent error code
(class) [edit]
base class for error categories
(class) [edit]