From Jason Turner

[system.error.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp1julxegj/{from.md → to.md} +143 -0
tmp/tmp1julxegj/{from.md → to.md} RENAMED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Header `<system_error>` synopsis <a id="system.error.syn">[[system.error.syn]]</a>
2
+
3
+ ``` cpp
4
+ #include <compare> // see [compare.syn]
5
+
6
+ namespace std {
7
+ class error_category;
8
+ const error_category& generic_category() noexcept;
9
+ const error_category& system_category() noexcept;
10
+
11
+ class error_code;
12
+ class error_condition;
13
+ class system_error;
14
+
15
+ template<class T>
16
+ struct is_error_code_enum : public false_type {};
17
+
18
+ template<class T>
19
+ struct is_error_condition_enum : public false_type {};
20
+
21
+ enum class errc {
22
+ address_family_not_supported, // EAFNOSUPPORT
23
+ address_in_use, // EADDRINUSE
24
+ address_not_available, // EADDRNOTAVAIL
25
+ already_connected, // EISCONN
26
+ argument_list_too_long, // E2BIG
27
+ argument_out_of_domain, // EDOM
28
+ bad_address, // EFAULT
29
+ bad_file_descriptor, // EBADF
30
+ bad_message, // EBADMSG
31
+ broken_pipe, // EPIPE
32
+ connection_aborted, // ECONNABORTED
33
+ connection_already_in_progress, // EALREADY
34
+ connection_refused, // ECONNREFUSED
35
+ connection_reset, // ECONNRESET
36
+ cross_device_link, // EXDEV
37
+ destination_address_required, // EDESTADDRREQ
38
+ device_or_resource_busy, // EBUSY
39
+ directory_not_empty, // ENOTEMPTY
40
+ executable_format_error, // ENOEXEC
41
+ file_exists, // EEXIST
42
+ file_too_large, // EFBIG
43
+ filename_too_long, // ENAMETOOLONG
44
+ function_not_supported, // ENOSYS
45
+ host_unreachable, // EHOSTUNREACH
46
+ identifier_removed, // EIDRM
47
+ illegal_byte_sequence, // EILSEQ
48
+ inappropriate_io_control_operation, // ENOTTY
49
+ interrupted, // EINTR
50
+ invalid_argument, // EINVAL
51
+ invalid_seek, // ESPIPE
52
+ io_error, // EIO
53
+ is_a_directory, // EISDIR
54
+ message_size, // EMSGSIZE
55
+ network_down, // ENETDOWN
56
+ network_reset, // ENETRESET
57
+ network_unreachable, // ENETUNREACH
58
+ no_buffer_space, // ENOBUFS
59
+ no_child_process, // ECHILD
60
+ no_link, // ENOLINK
61
+ no_lock_available, // ENOLCK
62
+ no_message_available, // ENODATA
63
+ no_message, // ENOMSG
64
+ no_protocol_option, // ENOPROTOOPT
65
+ no_space_on_device, // ENOSPC
66
+ no_stream_resources, // ENOSR
67
+ no_such_device_or_address, // ENXIO
68
+ no_such_device, // ENODEV
69
+ no_such_file_or_directory, // ENOENT
70
+ no_such_process, // ESRCH
71
+ not_a_directory, // ENOTDIR
72
+ not_a_socket, // ENOTSOCK
73
+ not_a_stream, // ENOSTR
74
+ not_connected, // ENOTCONN
75
+ not_enough_memory, // ENOMEM
76
+ not_supported, // ENOTSUP
77
+ operation_canceled, // ECANCELED
78
+ operation_in_progress, // EINPROGRESS
79
+ operation_not_permitted, // EPERM
80
+ operation_not_supported, // EOPNOTSUPP
81
+ operation_would_block, // EWOULDBLOCK
82
+ owner_dead, // EOWNERDEAD
83
+ permission_denied, // EACCES
84
+ protocol_error, // EPROTO
85
+ protocol_not_supported, // EPROTONOSUPPORT
86
+ read_only_file_system, // EROFS
87
+ resource_deadlock_would_occur, // EDEADLK
88
+ resource_unavailable_try_again, // EAGAIN
89
+ result_out_of_range, // ERANGE
90
+ state_not_recoverable, // ENOTRECOVERABLE
91
+ stream_timeout, // ETIME
92
+ text_file_busy, // ETXTBSY
93
+ timed_out, // ETIMEDOUT
94
+ too_many_files_open_in_system, // ENFILE
95
+ too_many_files_open, // EMFILE
96
+ too_many_links, // EMLINK
97
+ too_many_symbolic_link_levels, // ELOOP
98
+ value_too_large, // EOVERFLOW
99
+ wrong_protocol_type, // EPROTOTYPE
100
+ };
101
+
102
+ template<> struct is_error_condition_enum<errc> : true_type {};
103
+
104
+ // [syserr.errcode.nonmembers], non-member functions
105
+ error_code make_error_code(errc e) noexcept;
106
+
107
+ template<class charT, class traits>
108
+ basic_ostream<charT, traits>&
109
+ operator<<(basic_ostream<charT, traits>& os, const error_code& ec);
110
+
111
+ // [syserr.errcondition.nonmembers], non-member functions
112
+ error_condition make_error_condition(errc e) noexcept;
113
+
114
+ // [syserr.compare], comparison functions
115
+ bool operator==(const error_code& lhs, const error_code& rhs) noexcept;
116
+ bool operator==(const error_code& lhs, const error_condition& rhs) noexcept;
117
+ bool operator==(const error_condition& lhs, const error_condition& rhs) noexcept;
118
+ strong_ordering operator<=>(const error_code& lhs, const error_code& rhs) noexcept;
119
+ strong_ordering operator<=>(const error_condition& lhs, const error_condition& rhs) noexcept;
120
+
121
+ // [syserr.hash], hash support
122
+ template<class T> struct hash;
123
+ template<> struct hash<error_code>;
124
+ template<> struct hash<error_condition>;
125
+
126
+ // [syserr], system error support
127
+ template<class T>
128
+ inline constexpr bool is_error_code_enum_v = is_error_code_enum<T>::value;
129
+ template<class T>
130
+ inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<T>::value;
131
+ }
132
+ ```
133
+
134
+ The value of each `enum errc` constant shall be the same as the value of
135
+ the `<cerrno>` macro shown in the above synopsis. Whether or not the
136
+ `<system_error>` implementation exposes the `<cerrno>` macros is
137
+ unspecified.
138
+
139
+ The `is_error_code_enum` and `is_error_condition_enum` may be
140
+ specialized for program-defined types to indicate that such types are
141
+ eligible for `class error_code` and `class error_condition` automatic
142
+ conversions, respectively.
143
+