std::logic_error

std::logic_error

Defined in header <stdexcept>
class logic_error;

Defines a type of object to be thrown as exception. It reports errors that are a consequence of faulty logic within the program such as violating logical preconditions or class invariants and may be preventable.

No standard library components throw this exception directly, but the exception types std::invalid_argument, 登录查看完整内容