Standard library header <cerrno>
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)
Standard library headers
<compare> (C++20)
<contracts> (C++26)
<coroutine> (C++20)
<cstdint> (C++11)
<source_location> (C++20)
<stdfloat> (C++23)
<version> (C++20)
<concepts> (C++20)
<cerrno>
<debugging> (C++26)
<stacktrace> (C++23)
<system_error> (C++11)
<memory_resource> (C++17)
<scoped_allocator> (C++11)
<type_traits> (C++11)
<ratio> (C++11)
<any> (C++17)
<bit> (C++20)
<charconv> (C++17)
<expected> (C++23)
<format> (C++20)
<optional> (C++17)
<stdbit.h> (C++26)
<tuple> (C++11)
<typeindex> (C++11)
<variant> (C++17)
<array> (C++11)
<flat_map> (C++23)
<flat_set> (C++23)
<forward_list> (C++11)
<hive> (C++26)
<mdspan> (C++23)
<span> (C++20)
<unordered_map> (C++11)
<unordered_set> (C++11)
<generator> (C++23)
<ranges> (C++20)
<cuchar> (C++11)
<string_view> (C++17)
<codecvt> (C++11/17/26*)
<regex> (C++11)
<cfenv> (C++11)
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<stdckdint.h> (C++26)
<chrono> (C++11)
<ccomplex> (C++11/17/20*)
<ciso646> (until C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
<cinttypes> (C++11)
<filesystem> (C++17)
<print> (C++23)
<spanstream> (C++23)
<strstream> (C++98/26*)
<syncstream> (C++20)
<atomic> (C++11)
<barrier> (C++20)
<condition_variable> (C++11)
<future> (C++11)
<hazard_pointer> (C++26)
<latch> (C++20)
<mutex> (C++11)
<rcu> (C++26)
<semaphore> (C++20)
<shared_mutex> (C++14)
<stdatomic.h> (C++23)
<stop_token> (C++20)
<thread> (C++11)
<execution> (C++17)
This header was originally in the C standard library as <errno.h>.
This header is part of the error handling library.
Contents
[edit] Macros
E2BIG
(C++11)
(macro constant)
EACCES
(C++11)
(macro constant)
EADDRINUSE
(C++11)
(macro constant)
EADDRNOTAVAIL
(C++11)
(macro constant)
EAFNOSUPPORT
(C++11)
(macro constant)
EAGAIN
(C++11)
(macro constant)
EALREADY
(C++11)
(macro constant)
EBADF
(C++11)
(macro constant)
EBADMSG
(C++11)
(macro constant)
EBUSY
(C++11)
(macro constant)
ECANCELED
(C++11)
(macro constant)
ECHILD
(C++11)
(macro constant)
ECONNABORTED
(C++11)
(macro constant)
ECONNREFUSED
(C++11)
(macro constant)
ECONNRESET
(C++11)
(macro constant)
EDEADLK
(C++11)
(macro constant)
EDESTADDRREQ
(C++11)
(macro constant)
EDOM
(macro constant)
EEXIST
(C++11)
(macro constant)
EFAULT
(C++11)
(macro constant)
EFBIG
(C++11)
(macro constant)
EHOSTUNREACH
(C++11)
(macro constant)
EIDRM
(C++11)
(macro constant)
EILSEQ
(macro constant)
EINPROGRESS
(C++11)
(macro constant)
EINTR
(C++11)
(macro constant)
EINVAL
(C++11)
(macro constant)
EIO
(C++11)
(macro constant)
EISCONN
(C++11)
(macro constant)
EISDIR
(C++11)
(macro constant)
ELOOP
(C++11)
(macro constant)
EMFILE
(C++11)
(macro constant)
EMLINK
(C++11)
(macro constant)
EMSGSIZE
(C++11)
(macro constant)
ENAMETOOLONG
(C++11)
(macro constant)
ENETDOWN
(C++11)
(macro constant)
ENETRESET
(C++11)
(macro constant)
ENETUNREACH
(C++11)
(macro constant)
ENFILE
(C++11)
(macro constant)
ENOBUFS
(C++11)
(macro constant)
ENODATA
(C++11) (deprecated in C++23)
(macro constant)
ENODEV
(C++11)
(macro constant)
ENOENT
(C++11)
(macro constant)
ENOEXEC
(C++11)
(macro constant)
ENOLCK
(C++11)
(macro constant)
ENOLINK
(C++11)
(macro constant)
ENOMEM
(C++11)
(macro constant)
ENOMSG
(C++11)
(macro constant)
ENOPROTOOPT
(C++11)
(macro constant)
ENOSPC
(C++11)
(macro constant)
ENOSR
(C++11) (deprecated in C++23)
(macro constant)
ENOSTR
(C++11) (deprecated in C++23)
(macro constant)
ENOSYS
(C++11)
(macro constant)
ENOTCONN
(C++11)
(macro constant)
ENOTDIR
(C++11)
(macro constant)
ENOTEMPTY
(C++11)
(macro constant)
ENOTRECOVERABLE
(C++11)
(macro constant)
ENOTSOCK
(C++11)
(macro constant)
ENOTSUP
(C++11)
(macro constant)
ENOTTY
(C++11)
(macro constant)
ENXIO
(C++11)
(macro constant)
EOPNOTSUPP
(C++11)
(macro constant)
EOVERFLOW
(C++11)
(macro constant)
EOWNERDEAD
(C++11)
(macro constant)
EPERM
(C++11)
(macro constant)
EPIPE
(C++11)
(macro constant)
EPROTO
(C++11)
(macro constant)
EPROTONOSUPPORT
(C++11)
(macro constant)
EPROTOTYPE
(C++11)
(macro constant)
ERANGE
(macro constant)
EROFS
(C++11)
(macro constant)
ESPIPE
(C++11)
(macro constant)
ESRCH
(C++11)
(macro constant)
ETIME
(C++11) (deprecated in C++23)
ioctl()
timeout (macro constant)
ETIMEDOUT
(C++11)
(macro constant)
ETXTBSY
(C++11)
(macro constant)
EWOULDBLOCK
(C++11)
(macro constant)
EXDEV
(C++11)
(macro constant)
[edit] Notes
Although the header <cerrno>
is based on the C standard library header <errno.h>, the majority of the macros defined by <cerrno>
were adopted by C++ from the POSIX standard, rather than the C standard library.
[edit] Synopsis
#define errno /* see description */ #define E2BIG /* see description */ // freestanding #define EACCES /* see description */ // freestanding #define EADDRINUSE /* see description */ // freestanding #define EADDRNOTAVAIL /* see description */ // freestanding #define EAFNOSUPPORT /* see description */ // freestanding #define EAGAIN /* see description */ // freestanding #define EALREADY /* see description */ // freestanding #define EBADF /* see description */ // freestanding #define EBADMSG /* see description */ // freestanding #define EBUSY /* see description */ // freestanding #define ECANCELED /* see description */ // freestanding #define ECHILD /* see description */ // freestanding #define ECONNABORTED /* see description */ // freestanding #define ECONNREFUSED /* see description */ // freestanding #define ECONNRESET /* see description */ // freestanding #define EDEADLK /* see description */ // freestanding #define EDESTADDRREQ /* see description */ // freestanding #define EDOM /* see description */ // freestanding #define EEXIST /* see description */ // freestanding #define EFAULT /* see description */ // freestanding #define EFBIG /* see description */ // freestanding #define EHOSTUNREACH /* see description */ // freestanding #define EIDRM /* see description */ // freestanding #define EILSEQ /* see description */ // freestanding #define EINPROGRESS /* see description */ // freestanding #define EINTR /* see description */ // freestanding #define EINVAL /* see description */ // freestanding #define EIO /* see description */ // freestanding #define EISCONN /* see description */ // freestanding #define EISDIR /* see description */ // freestanding #define ELOOP /* see description */ // freestanding #define EMFILE /* see description */ // freestanding #define EMLINK /* see description */ // freestanding #define EMSGSIZE /* see description */ // freestanding #define ENAMETOOLONG /* see description */ // freestanding #define ENETDOWN /* see description */ // freestanding #define ENETRESET /* see description */ // freestanding #define ENETUNREACH /* see description */ // freestanding #define ENFILE /* see description */ // freestanding #define ENOBUFS /* see description */ // freestanding #define ENODEV /* see description */ // freestanding #define ENOENT /* see description */ // freestanding #define ENOEXEC /* see description */ // freestanding #define ENOLCK /* see description */ // freestanding #define ENOLINK /* see description */ // freestanding #define ENOMEM /* see description */ // freestanding #define ENOMSG /* see description */ // freestanding #define ENOPROTOOPT /* see description */ // freestanding #define ENOSPC /* see description */ // freestanding #define ENOSYS /* see description */ // freestanding #define ENOTCONN /* see description */ // freestanding #define ENOTDIR /* see description */ // freestanding #define ENOTEMPTY /* see description */ // freestanding #define ENOTRECOVERABLE /* see description */ // freestanding #define ENOTSOCK /* see description */ // freestanding #define ENOTSUP /* see description */ // freestanding #define ENOTTY /* see description */ // freestanding #define ENXIO /* see description */ // freestanding #define EOPNOTSUPP /* see description */ // freestanding #define EOVERFLOW /* see description */ // freestanding #define EOWNERDEAD /* see description */ // freestanding #define EPERM /* see description */ // freestanding #define EPIPE /* see description */ // freestanding #define EPROTO /* see description */ // freestanding #define EPROTONOSUPPORT /* see description */ // freestanding #define EPROTOTYPE /* see description */ // freestanding #define ERANGE /* see description */ // freestanding #define EROFS /* see description */ // freestanding #define ESPIPE /* see description */ // freestanding #define ESRCH /* see description */ // freestanding #define ETIMEDOUT /* see description */ // freestanding #define ETXTBSY /* see description */ // freestanding #define EWOULDBLOCK /* see description */ // freestanding #define EXDEV /* see description */ // freestanding
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 288 | C++98 | the macro EILSEQ was not defined in <cerrno>
|
defined |