std::error_code::error_code
来自cppreference.com
< cpp | error | error code
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
error_code(); |
(1) | (C++11 起) |
error_code( int ec, const error_category& ecat ); |
(2) | (C++11 起) |
template< class ErrorCodeEnum > error_code( ErrorCodeEnum e ); |
(3) | (C++11 起) |
Constructs new error code.
1) Constructs error code with default value. Equivalent to error_code(0, std::system_category()).
2) Constructs error code with
ec
as the platform-dependent error code and ecat
as the corresponding error category.3) Constructs error code from an error code enum
e
. Equivalent to *this = std::make_error_code(e). The overload participates in overload resolutions only if std::is_error_code_enum<ErrorCodeEnum>::value == true.[编辑] 参数
ec | - | platform dependent error code to construct with |
ecat | - | 错误类别对应
ec |
e | - | error code enum to construct with |