class
<system_error>

std::error_code

class error_code;
Error code
Objects of this type hold an error code value associated with a category.

The operating system and other low-level applications and libraries generate numerical error codes to represent possible results. These numerical values may carry essential information for a specific platform, but be non-portable from one platform to another.

Objects of this class associate such numerical codes to error categories, so that they can be interpreted when needed as more abstract (and portable) error conditions.

Member functions


Non-member function overloads


Non-member class specializations