From Jason Turner

[system_error.syn]

Diff to HTML by rtfpessoa

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