std::error_category
来自 cppreference.cn
定义于头文件 <system_error> |
||
class error_category; |
(C++11 起) | |
std::error_category
作为特定错误类别类型的基类,例如 std::system_category、std::iostream_category 等。每个特定类别类定义了 error_code
- error_condition
映射,并保存所有 error_condition 的解释性字符串。错误类别类的对象被视为单例,通过引用传递。
[编辑] 成员函数
构造一个 error_category (public 成员函数) | |
[虚] |
销毁一个 error_category (虚 public 成员函数) |
operator= [已删除] |
不可复制赋值 (public 成员函数) |
[虚] |
获取类别的名称 (虚 public 成员函数) |
将 error_code 映射到 error_condition (虚 public 成员函数) | |
[虚] |
比较 error_code 和 error_condition 是否等价(虚 public 成员函数) |
[虚] |
获取解释性字符串 (虚 public 成员函数) |
(在 C++20 中移除)(在 C++20 中移除)(C++20) |
比较两个错误类别 (函数) |
[编辑] 特定错误类别
(C++11) |
识别通用错误类别 (函数) |
(C++11) |
标识操作系统错误类别 (函数) |
(C++11) |
标识 iostream 错误类别 (函数) |
(C++11) |
标识 future 错误类别 (函数) |
[编辑] 参见
(C++11) |
保存可移植错误码 (类) |
(C++11) |
保存平台相关错误码 (类) |