Name
range_error class — Arithmetic range error
Synopsis
class range_error : public runtime_error { public: explicit range_error(const string& what_arg); };
The range_error
class can
be used when a function’s results would fall outside its valid
range. Note that the <cmath>
functions do not throw any
exceptions, but a third-party math library might throw range_error
for, say, computing a power
that exceeds the limits of its return type.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.