std::feraiseexcept (3) - Linux Manuals
std::feraiseexcept: std::feraiseexcept
NAME
std::feraiseexcept - std::feraiseexcept
Synopsis
Defined in header <cfenv>
int feraiseexcept( int excepts ); (since C++11)
Attempts to raise all floating point exceptions listed in excepts (a bitwise OR of the floating_point_exception_macros). If one of the exceptions is FE_OVERFLOW or FE_UNDERFLOW, this function may additionally raise FE_INEXACT. The order in which the exceptions are raised is unspecified, except that FE_OVERFLOW and FE_UNDERFLOW are always raised before FE_INEXACT.
Parameters
excepts - bitmask listing the exception flags to raise
Return value
0 if all listed exceptions were raised, non-zero value otherwise.
Example
// Run this code
Output:
See also
feclearexcept clears the specified floating-point status flags
(C++11)
fetestexcept determines which of the specified floating-point status flags are set
(C++11)