File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
test/std/diagnostics/syserr
syserr.errcode/syserr.errcode.overview
syserr.errcondition/syserr.errcondition.overview Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ template <> struct hash<std::error_condition>;
230
230
#include < type_traits>
231
231
#include < stdexcept>
232
232
#include < __functional_base>
233
+ #include < string>
233
234
234
235
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
235
236
#pragma GCC system_header
Original file line number Diff line number Diff line change 7
7
//
8
8
// ===----------------------------------------------------------------------===//
9
9
10
+ // <system_error>
11
+ // class error_code
12
+
13
+ // Make sure that the error_code bits of <system_error> are self-contained.
14
+
15
+ #include < system_error>
16
+
10
17
int main ()
11
18
{
19
+ std::error_code x;
20
+ (void ) x.category (); // returns a std::error_category &
21
+ (void ) x.default_error_condition (); // std::error_condition
22
+ (void ) x.message (); // returns a std::string
12
23
}
Original file line number Diff line number Diff line change 7
7
//
8
8
// ===----------------------------------------------------------------------===//
9
9
10
+ // <system_error>
11
+ // class error_condition
12
+
13
+ // Make sure that the error_condition bits of <system_error> are self-contained.
14
+
15
+ #include < system_error>
16
+
10
17
int main ()
11
18
{
19
+ std::error_condition x = std::errc (0 );
20
+ (void ) x.category (); // returns a std::error_condition &
21
+ (void ) x.message (); // returns a std::string
12
22
}
You can’t perform that action at this time.
0 commit comments