std::error_condition 是独立于平台的错误码。类似于 std::error_code ,它为整数值和 std::error_category 所唯一标识,但不同于 std::error_code ,该值不依赖平台。 典型的实现保有整数数据成员(该值)和指向一个 std::error_category 的指针。 成员函数 (构造函数) 构造error_con
class error_condition; (since C++11) std::error_condition是与平台无关的错误代码。就像std::error_code,则由整数值和std::error_category,但不像std::error_code,该值不依赖于平台。 典型实现包含一个整数数据成员%28值%29和指向std::error_category... 成员函数 (constructor) constructs an error_...
std::error_condition::categoryC++ 工具库 错误处理 std::error_condition const error_category& category() const noexcept; (C++11 起) 返回存储的 error_category 。 参数(无) 返回值存储的 error_category 。
std::error_condition::error_condition error_condition()noexcept; (1)(since C++11) error_condition(intval,consterror_category&cat)noexcept; (2)(since C++11) template<classErrorConditionEnum> error_condition(ErrorConditionEnum e)noexcept; (3)(since C++11) ...
问将外部错误代码映射到std::error_conditionEN我的理解是,通常情况下,您应该首先尝试将错误代码映射到...
is_error_condition_enum (C++11) identifies an enumeration as anstd::error_condition (class template) std::hash<std::error_condition> (C++17) hash support forstd::error_condition (class template specialization) Notes Thecomparisonbetween astd::error_codeand astd::error_conditionis defined by thei...
error_condition::message error_condition::operator bool Non-member functions operator==operator!=operator<operator<=> (until C++20)(until C++20)(C++20) Helper classes is_error_condition_enum hash<std::error_condition> Clears the state of the error condition. Sets the error value to0and...
error_condition::operator bool Non-member functions operator==operator!=operator<operator<=> (until C++20)(until C++20)(C++20) Helper classes is_error_condition_enum hash<std::error_condition> Assigns contents to an error condition. Sets the error value tovaland error category tocat. ...
std::error_category::default_error_condition From cppreference.com < cpp | error | error category C++ Language Standard library headers Concepts Utilities library Strings library Containers li
std::error_condition 定义于头文件<system_error> classerror_condition; (C++11 起) std::error_condition是独立于平台的错误码。类似于std::error_code,它为整数值和std::error_category所唯一标识,但不同于std::error_code,该值不依赖平台。 典型的实现保有整数数据成员(该值)和指向一个std::error_categor...