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) 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) |
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
http://en.cpPreference.com/w/cpp/Error/Error[医]范畴