error_code::error_code

构造对象类型 error_code。

error_code();
error_code(value_type _Val, const error_category& _Cat);
template<class _Enum>
    error_code(_Enum _Errcode,
    typename enable_if<is_error_code_enum<_Enum>::value,
        error_code>::type * = 0);

参数

Parameter

说明

_Val

存储的错误代码值。error_code。

_Cat

存储的错误类别在 error_code。

_Errcode

存储的枚举值。error_code。

备注

第一个构造函数存储一个零误差代码值和指向 generic_category

第二个构造函数存储 _Val,错误代码值和指向 error_category

第三个构造函数存储 (value_type)_Errcode,错误代码值和指向 generic_category

要求

标头: <system_error>

命名空间: std

请参见

参考

error_code Class