Difference between revisions of "cpp/error/errc/make error code"
From cppreference.com
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
m (fmt) |
||
(12 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | {{cpp | + | {{cpp/title|make_error_code{{small|(std::errc)}}}} |
− | {{cpp/error/ | + | {{cpp/error/errc/navbar}} |
− | {{ddcl | header=system_error | | + | {{ddcl|header=system_error|since=c++11|1= |
− | error_code make_error_code( std::errc e ); | + | std::error_code make_error_code( std::errc e ) noexcept; |
}} | }} | ||
− | Creates error code value for errc enum {{ | + | Creates error code value for {{tt|errc}} enum {{c|e}}. |
− | Equivalent to {{c|error_code(static_cast<int>(e), generic_category())}} | + | Equivalent to {{c|std::error_code(static_cast<int>(e), std::generic_category())}} |
===Parameters=== | ===Parameters=== | ||
− | {{ | + | {{par begin}} |
− | {{ | + | {{par|e|error code enum to create error code for}} |
− | {{ | + | {{par end}} |
===Return value=== | ===Return value=== | ||
− | Error code corresponding to {{ | + | Error code corresponding to {{c|e}}. |
− | === | + | ===See also=== |
− | {{ | + | {{dsc begin}} |
+ | {{dsc inc|cpp/io/io_errc/dsc make_error_code}} | ||
+ | {{dsc inc|cpp/thread/future_errc/dsc make_error_code}} | ||
+ | {{dsc end}} | ||
− | + | {{langlinks|es|ja|ru|zh}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 23:24, 30 August 2023
Defined in header <system_error>
|
||
std::error_code make_error_code( std::errc e ) noexcept; |
(since C++11) | |
Creates error code value for errc
enum e.
Equivalent to std::error_code(static_cast<int>(e), std::generic_category())
[edit] Parameters
e | - | error code enum to create error code for |
[edit] Return value
Error code corresponding to e.
[edit] See also
constructs an iostream error code (function) | |
constructs a future error code (function) |