首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::error_condition

Defined in header <system_error>

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_condition (public member function)

operator=

replaces the contents (public member function)

assign

replaces the contents (public member function)

clear

sets the error_condition to value 0 in generic_category (public member function)

value

obtains the value of the error_condition (public member function)

category

obtains the error_category for this error_condition (public member function)

message

obtains the explanatory string (public member function)

operator bool

checks if the value is non-zero (public member function)

非会员职能

operator==operator!=operator<

compares error_conditions and error_codes (function)

帮助者类

is_error_condition_enum (C++11)

identifies an enumeration as an std::error_condition (class template)

std::hash<std::error_condition> (C++17)

hash support for std::error_condition (class template specialization)

另见

error_code (C++11)

holds a platform-dependent error code (class)

error_category (C++11)

base class for error categories (class)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券