std::domain_error
From cppreference.com
Defined in header <stdexcept>
|
||
class domain_error; |
||
Defines a type of object to be thrown as exception. It may be used by the implementation to report domain errors, that is, situations where the inputs are outside of the domain on which an operation is defined.
The standard library components do not throw this exception (mathematical functions report domain errors as specified in math_errhandling). Third-party libraries, however, use this. For example, boost.math throws std::domain_error
if boost::math::policies::throw_on_error
is enabled (the default setting).
All member functions of std::domain_error are constexpr: it is possible to create and use std::domain_error objects in the evaluation of a constant expression.However, |
(since C++26) |
Inheritance diagram
Contents |