[value.error.codes] (original) (raw)
Certain functions in the C++ standard library report errors via astd::error_code object.
That object'scategory() member shall return std::system_category() for errors originating from the operating system, or a reference to animplementation-defined error_category object for errors originating elsewhere.
The implementation shall define the possible values of value() for each of these error categories.
[Example 1:
For operating systems that are based on POSIX, implementations should define the std::system_category() values as identical to the POSIX errno values, with additional values as defined by the operating system's documentation.
Implementations for operating systems that are not based on POSIX should define values identical to the operating system's values.
For errors that do not originate from the operating system, the implementation may provide enums for the associated values.
— _end example_]