public virtual member function
<system_error>

std::error_category::default_error_condition

virtual error_condition default_error_condition (int val) const noexcept;
Default error condition
Returns the default error_condition object of this category that is associated with the error_code identified by a value of val.

Its definition in the base class error_category returns the same as constructing an error_condition object with:
1
error_condition (val, *this);

As a virtual member function, this behavior can be overriden in derived classes.

This function is called by the default definition of member equivalent, which is used to compare error conditions with error codes.

Parameters

val
A numerical value identifying an error condition.
If the error_category object is the one returned by generic_category, this value corresponds to one of the values defined in <cerrno>.

Return Value

The default error_condition object associated with condition value val for this category.

Example

For an example, see error_category.

See also