class
std::overflow_error
<stdexcept>
Overflow error exception
|  |
|  |
overflow_error |
This class defines the type of objects thrown as exceptions to arithmetic overflow errors.
This class is designed so that any program, not just the elements of the standard library, can throw it as an exception.
It is defined as:
1 2 3 4
|
class overflow_error : public runtime_error {
public:
explicit overflow_error (const string& what_arg);
};
|
Members
- constructor
- The constructor takes a standard string object as parameter. This value is stored in the object, and its value is used to generate the C-string returned by its inherited member what.
The class inherits the
what member function from
exception, along with its
copy constructor and
assignment operator member functions.
See also
- exception
- Standard exception class (class)
- logic_error
- Logic error exception (class
)
- runtime_error
- Runtime error exception (class
)
- range_error
- Range error exception (class
)
- underflow_error
- Underflow error exception (class
)