C++ 与C+;中的.Net NotSupportedException最接近的替代方案是什么+;

C++ 与C+;中的.Net NotSupportedException最接近的替代方案是什么+;,c++,exception,exception-handling,stl,std,C++,Exception,Exception Handling,Stl,Std,标准库中与.Net NotSupportedException最接近的替代方案是什么?如果我必须创建一个我自己的,那么它在逻辑上应该从何而来?标准为您提供了 namespace std { class logic_error; class domain_error; class invalid_argument; class length_error; class out_of_range; class runtime_error; class range_error; class overfl

标准库中与.Net NotSupportedException最接近的替代方案是什么?如果我必须创建一个我自己的,那么它在逻辑上应该从何而来?

标准为您提供了

namespace std {
class logic_error;
class domain_error;
class invalid_argument;
class length_error;
class out_of_range;
class runtime_error;
class range_error;
class overflow_error;
class underflow_error;
}

正如Jerry所说,运行时错误是这些错误中最好的匹配,因此从中派生。

对我来说听起来像是
std::runtime\u错误。