1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 #include <system_error>
18 static_assert(static_cast<int>(std::errc::address_family_not_supported
) == EAFNOSUPPORT
, "");
19 static_assert(static_cast<int>(std::errc::address_in_use
) == EADDRINUSE
, "");
20 static_assert(static_cast<int>(std::errc::address_not_available
) == EADDRNOTAVAIL
, "");
21 static_assert(static_cast<int>(std::errc::already_connected
) == EISCONN
, "");
22 static_assert(static_cast<int>(std::errc::argument_list_too_long
) == E2BIG
, "");
23 static_assert(static_cast<int>(std::errc::argument_out_of_domain
) == EDOM
, "");
24 static_assert(static_cast<int>(std::errc::bad_address
) == EFAULT
, "");
25 static_assert(static_cast<int>(std::errc::bad_file_descriptor
) == EBADF
, "");
26 static_assert(static_cast<int>(std::errc::bad_message
) == EBADMSG
, "");
27 static_assert(static_cast<int>(std::errc::broken_pipe
) == EPIPE
, "");
28 static_assert(static_cast<int>(std::errc::connection_aborted
) == ECONNABORTED
, "");
29 static_assert(static_cast<int>(std::errc::connection_already_in_progress
) == EALREADY
, "");
30 static_assert(static_cast<int>(std::errc::connection_refused
) == ECONNREFUSED
, "");
31 static_assert(static_cast<int>(std::errc::connection_reset
) == ECONNRESET
, "");
32 static_assert(static_cast<int>(std::errc::cross_device_link
) == EXDEV
, "");
33 static_assert(static_cast<int>(std::errc::destination_address_required
) == EDESTADDRREQ
, "");
34 static_assert(static_cast<int>(std::errc::device_or_resource_busy
) == EBUSY
, "");
35 static_assert(static_cast<int>(std::errc::directory_not_empty
) == ENOTEMPTY
, "");
36 static_assert(static_cast<int>(std::errc::executable_format_error
) == ENOEXEC
, "");
37 static_assert(static_cast<int>(std::errc::file_exists
) == EEXIST
, "");
38 static_assert(static_cast<int>(std::errc::file_too_large
) == EFBIG
, "");
39 static_assert(static_cast<int>(std::errc::filename_too_long
) == ENAMETOOLONG
, "");
40 static_assert(static_cast<int>(std::errc::function_not_supported
) == ENOSYS
, "");
41 static_assert(static_cast<int>(std::errc::host_unreachable
) == EHOSTUNREACH
, "");
42 static_assert(static_cast<int>(std::errc::identifier_removed
) == EIDRM
, "");
43 static_assert(static_cast<int>(std::errc::illegal_byte_sequence
) == EILSEQ
, "");
44 static_assert(static_cast<int>(std::errc::inappropriate_io_control_operation
) == ENOTTY
, "");
45 static_assert(static_cast<int>(std::errc::interrupted
) == EINTR
, "");
46 static_assert(static_cast<int>(std::errc::invalid_argument
) == EINVAL
, "");
47 static_assert(static_cast<int>(std::errc::invalid_seek
) == ESPIPE
, "");
48 static_assert(static_cast<int>(std::errc::io_error
) == EIO
, "");
49 static_assert(static_cast<int>(std::errc::is_a_directory
) == EISDIR
, "");
50 static_assert(static_cast<int>(std::errc::message_size
) == EMSGSIZE
, "");
51 static_assert(static_cast<int>(std::errc::network_down
) == ENETDOWN
, "");
52 static_assert(static_cast<int>(std::errc::network_reset
) == ENETRESET
, "");
53 static_assert(static_cast<int>(std::errc::network_unreachable
) == ENETUNREACH
, "");
54 static_assert(static_cast<int>(std::errc::no_buffer_space
) == ENOBUFS
, "");
55 static_assert(static_cast<int>(std::errc::no_child_process
) == ECHILD
, "");
56 static_assert(static_cast<int>(std::errc::no_link
) == ENOLINK
, "");
57 static_assert(static_cast<int>(std::errc::no_lock_available
) == ENOLCK
, "");
58 #if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
59 static_assert(static_cast<int>(std::errc::no_message_available
) == ENODATA
, "");
61 static_assert(static_cast<int>(std::errc::no_message
) == ENOMSG
, "");
62 static_assert(static_cast<int>(std::errc::no_protocol_option
) == ENOPROTOOPT
, "");
63 static_assert(static_cast<int>(std::errc::no_space_on_device
) == ENOSPC
, "");
64 #if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
65 static_assert(static_cast<int>(std::errc::no_stream_resources
) == ENOSR
, "");
67 static_assert(static_cast<int>(std::errc::no_such_device_or_address
) == ENXIO
, "");
68 static_assert(static_cast<int>(std::errc::no_such_device
) == ENODEV
, "");
69 static_assert(static_cast<int>(std::errc::no_such_file_or_directory
) == ENOENT
, "");
70 static_assert(static_cast<int>(std::errc::no_such_process
) == ESRCH
, "");
71 static_assert(static_cast<int>(std::errc::not_a_directory
) == ENOTDIR
, "");
72 static_assert(static_cast<int>(std::errc::not_a_socket
) == ENOTSOCK
, "");
73 #if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
74 static_assert(static_cast<int>(std::errc::not_a_stream
) == ENOSTR
, "");
76 static_assert(static_cast<int>(std::errc::not_connected
) == ENOTCONN
, "");
77 static_assert(static_cast<int>(std::errc::not_enough_memory
) == ENOMEM
, "");
78 static_assert(static_cast<int>(std::errc::not_supported
) == ENOTSUP
, "");
79 static_assert(static_cast<int>(std::errc::operation_canceled
) == ECANCELED
, "");
80 static_assert(static_cast<int>(std::errc::operation_in_progress
) == EINPROGRESS
, "");
81 static_assert(static_cast<int>(std::errc::operation_not_permitted
) == EPERM
, "");
82 static_assert(static_cast<int>(std::errc::operation_not_supported
) == EOPNOTSUPP
, "");
83 static_assert(static_cast<int>(std::errc::operation_would_block
) == EWOULDBLOCK
, "");
84 static_assert(static_cast<int>(std::errc::owner_dead
) == EOWNERDEAD
, "");
85 static_assert(static_cast<int>(std::errc::permission_denied
) == EACCES
, "");
86 static_assert(static_cast<int>(std::errc::protocol_error
) == EPROTO
, "");
87 static_assert(static_cast<int>(std::errc::protocol_not_supported
) == EPROTONOSUPPORT
, "");
88 static_assert(static_cast<int>(std::errc::read_only_file_system
) == EROFS
, "");
89 static_assert(static_cast<int>(std::errc::resource_deadlock_would_occur
) == EDEADLK
, "");
90 static_assert(static_cast<int>(std::errc::resource_unavailable_try_again
) == EAGAIN
, "");
91 static_assert(static_cast<int>(std::errc::result_out_of_range
) == ERANGE
, "");
92 static_assert(static_cast<int>(std::errc::state_not_recoverable
) == ENOTRECOVERABLE
, "");
93 #if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
94 static_assert(static_cast<int>(std::errc::stream_timeout
) == ETIME
, "");
96 static_assert(static_cast<int>(std::errc::text_file_busy
) == ETXTBSY
, "");
97 static_assert(static_cast<int>(std::errc::timed_out
) == ETIMEDOUT
, "");
98 static_assert(static_cast<int>(std::errc::too_many_files_open_in_system
) == ENFILE
, "");
99 static_assert(static_cast<int>(std::errc::too_many_files_open
) == EMFILE
, "");
100 static_assert(static_cast<int>(std::errc::too_many_links
) == EMLINK
, "");
101 static_assert(static_cast<int>(std::errc::too_many_symbolic_link_levels
) == ELOOP
, "");
102 static_assert(static_cast<int>(std::errc::value_too_large
) == EOVERFLOW
, "");
103 static_assert(static_cast<int>(std::errc::wrong_protocol_type
) == EPROTOTYPE
, "");