38FPControl::~FPControl()
41 feclearexcept (m_masked);
50void FPControl::holdExceptions()
54 m_masked |= FE_ALL_EXCEPT;
62void FPControl::enable ([[maybe_unused]] Exc exc)
64#if HAVE_FEENABLEEXCEPT
65 int mask = excToMask (exc);
66 feenableexcept (mask);
76void FPControl::disable ([[maybe_unused]] Exc exc)
78#if HAVE_FEENABLEEXCEPT
79 int mask = excToMask (exc);
80 fedisableexcept (mask);
90int FPControl::excToMask (Exc exc)
Helper to control FP exceptions.
Some additional feature test macros.
constexpr std::enable_if_t< is_bitmask_v< E >, bool > test(E lhs, E rhs)
Convenience function to test bits in a class enum bitmask.