std::error_code
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Utilities library
Type support (basic types, RTTI)
Library feature-test macros (C++20)
(C++11)
(C++20)
(C++26)
(C++20)
Coroutine support (C++20)
Contract support (C++26)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
(C++20)
Swap and type operations
Common vocabulary types
Diagnostics library
(until C++20*)
(C++17)(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Exception handling failures
(C++11)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(TM TS)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
error_code
(C++11)
(C++11)
(C++23)
(C++23)
(C++26)
(C++26)
(C++26)
std::error_code
Member functions
Modifiers
Observers
Non-member functions
(until C++20)(until C++20)(C++20)
Helper classes
Defined in header
<system_error>
class error_code;
(since C++11)
std::error_code
represents a platform-dependent error code value. Each std::error_code
object holds an error code value originating from the operating system or some low-level interface and a pointer to an object of type std::error_category , which corresponds to the said interface. The error code values are not required to be unique across different error categories.