|  |  Version: SMASH-2.0 |  | 
 
 
 
Go to the documentation of this file.
   10 #ifndef SRC_INCLUDE_SMASH_FPENVIRONMENT_H_ 
   11 #define SRC_INCLUDE_SMASH_FPENVIRONMENT_H_ 
   17 #if defined _GNU_SOURCE && !defined __clang__ 
   35 #elif defined __SSE__ && !defined __clang__ 
  128 template <
typename F>
 
  136 #endif  // SRC_INCLUDE_SMASH_FPENVIRONMENT_H_ 
  
 
~DisableFloatTraps()
When the guard goes out of scope the floating point environment is restored.
std::fenv_t environment_
The stored environment that the destructor will restore.
Guard type that safely disables floating point traps for the scope in which it is placed.
bool enable_float_traps(int)
Fallback that fails to set the trap.
void reenable_traps(int mask)
Reenables the given traps.
void setup_default_float_traps()
Setup the floating-point traps used throughout SMASH.
DisableFloatTraps(int mask=0)
Constructs the guard object.
void without_float_traps(F &&f)
Convenience function to create a scope where all floating point traps are disabled.