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

std::error_code

Defined in header <system_error>

class error_code;

(since C++11)

std::error_code是与平台相关的错误代码。各std::error_code对象保存来自操作系统或低级接口的错误代码和指向类型对象的指针。std::error_category,该接口对应于所述接口。错误代码值在不同的错误类别之间可能并不是唯一的。

成员函数

(constructor)

constructs an error code (public member function)

operator=

assigns another error code (public member function)

assign

assigns another error code (public member function)

修饰符

清除设置错误[医]系统中值为0的代码[医]类别%28公共成员职能%29

观察员

值获得错误的值。[医]代码%28公共成员功能%29

类别获得错误[医]此错误的类别[医]代码%28公共成员功能%29

违约[医]误差[医]条件获得误差[医]此错误的条件[医]代码%28公共成员功能%29

消息获得此错误的解释性字符串。[医]代码%28公共成员功能%29

操作符bool检查该值是否为非零%28公共成员函数%29。

非会员职能

operator==operator!=operator<

compares two error_codes (function)

operator<<

outputs the value and the category name to an output stream (function)

帮助者类

is_error_code_enum (C++11)

identifies a class as an error_code enumeration (class template)

std::hash<std::error_code> (C++11)

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

另见

error_condition (C++11)

holds a portable error code (class)

error_category (C++11)

base class for error categories (class)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券