在线文档教程
C++
应用 | Utilities

std::error_category

STD:错误[医]范畴

Defined in header
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) virtualdestructs an error_category (virtual public member function)
operator= deletednot copy assignable (public member function)
name virtualobtains the name of the category (virtual public member function)
default_error_condition virtualmaps error_code to error_condition (virtual public member function)
equivalent virtualcompares error_code and error_condition for equivalence (virtual public member function)
message virtualobtains 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)

© cppreference.com

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

http://en.cpPreference.com/w/cpp/Error/Error[医]范畴