std::underflow_error
| Defined in header <stdexcept> |  |  | 
|---|---|---|
| class underflow_error; |  |  | 
定义要作为异常抛出的对象类型。它可用于报告算术下流量误差%28,即计算结果为低于正常浮点值%29的情况。
标准库组件不会抛出此异常%28数学函数,按math_errhandling29%。然而,第三方库使用这个。例如,助教数学抛出std::underflow_error如果boost::math::policies::throw_on_error启用%28默认设置%29。
二次
二次
继承图
成员函数
| (constructor) | constructs the exception object (public member function) | 
|---|
STD::地下水流[医]错误::底流[医]误差
| explicit underflow_error( const std::string& what_arg ); | (1) |  | 
|---|---|---|
| explicit underflow_error( const char* what_arg ); | (2) | (since C++11) | 
构造异常对象what_arg作为解释性字符串,可以通过what()...
因为复制std::exception不允许抛出异常,此消息通常作为单独分配的引用计数字符串存储在内部。这也是为什么没有构造函数std::string&&::无论如何,它必须复制内容。
参数
| what_arg | - | explanatory string | 
|---|
例外
可抛std::bad_alloc...
继承自STD:例外
成员函数
| (destructor) virtual | destructs the exception object (virtual public member function of std::exception) | 
|---|---|
| what virtual | returns an explanatory string (virtual public member function of std::exception) | 
 © cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

