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

std::error_category

Defined in header <system_error>

class error_category;

(since C++11)

std::error_category作为特定错误类别类型的基类,如std::system_category,,,std::iostream_category每个特定类别类定义error_code---error_condition映射并保存所有错误的解释性字符串。[医]条件。错误类别类的对象被视为单例,通过引用传递。

成员函数

(constructor)

constructs an error_category (public member function)

(destructor) virtual

destructs an error_category (virtual public member function)

operator= deleted

not copy assignable (public member function)

name virtual

obtains the name of the category (virtual public member function)

default_error_condition virtual

maps error_code to error_condition (virtual public member function)

equivalent virtual

compares error_code and error_condition for equivalence (virtual public member function)

message virtual

obtains the explanatory string (virtual public member function)

operator==operator!=operator<

compares two error categories (function)

特定错误类别

generic_category (C++11)

identifies the generic error category (function)

system_category (C++11)

identifies the operating system error category (function)

iostream_category (C++11)

identifies the iostream error category (function)

future_category (C++11)

identifies the future error category (function)

另见

error_condition (C++11)

holds a portable error code (class)

error_code (C++11)

holds a platform-dependent error code (class)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券