std::is_error_code_enum<std::io_errc> (3) - Linux Manuals
std::is_error_code_enum<std::io_errc>: std::is_error_code_enum<std::io_errc>
NAME
std::is_error_code_enum<std::io_errc> - std::is_error_code_enum<std::io_errc>
Synopsis
Defined in header <ios>
template< > (since C++11)
struct is_error_code_enum<std::io_errc> : public std::true_type { };
This specialization of std::is_error_code_enum informs other library components that values of type std::io_errc are enumerations that hold error codes, which makes them implicitly convertible and assignable to objects of type std::error_code.
Inherited from std::integral_constant
Member constants
value true
[static]
Member functions
operator bool (public member function)
operator() returns value
(C++14)
Member types
Type Definition
value_type bool
type std::integral_constant<bool, value>
Example
The comparison between e.code() and std::io_errc::stream compiles because std::is_error_code_enum<std::io_errc>::value == true
// Run this code
Output:
See also
is_error_code_enum identifies a class as an error_code enumeration
(C++11)
error_code holds a platform-dependent error code
(C++11)
io_errc the IO stream error codes
(C++11)