|
|
|
|
Non-member functions | ||||
make_error_condition | ||||
Helper classes | ||||
Defined in header <system_error> | ||
std::error_condition make_error_condition(std::errc e)noexcept; | (since C++11) | |
Creates an error condition for anerrc
valuee. Sets the error value toint(e) and error category tostd::generic_category.
e | - | standard error value |
Error condition fore.
#include <iostream>#include <string>#include <system_error> int main(){auto err= std::make_error_condition(std::errc::invalid_argument);std::cout<< err.message()<<'\n';}
Possible output:
Invalid argument