libMesh
|
The FPEDisabler
class puts Floating-Point Exception (FPE) trapping on hold during its lifetime, restoring the FE environment upon destruction.
More...
#include <fpe_disabler.h>
Public Member Functions | |
FPEDisabler () | |
~FPEDisabler () | |
Public Attributes | |
std::fenv_t | old_env |
The FPEDisabler
class puts Floating-Point Exception (FPE) trapping on hold during its lifetime, restoring the FE environment upon destruction.
This allows code to ignore known/expected FPE sources, e.g. to work around a bug in HDF5 1.14.3 or to test for errors in a more sophisticated way and throw a C++ exception instead.
FE environment changes should not be made during the lifetime of this object, as they will not be preserved when the destructor restores the original environment.
Definition at line 49 of file fpe_disabler.h.
|
inline |
|
inline |
std::fenv_t libMesh::FPEDisabler::old_env |
Definition at line 61 of file fpe_disabler.h.
Referenced by FPEDisabler(), and ~FPEDisabler().