Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/numeric/fenv/feexceptflag"

From cppreference.com
< cpp‎ | numeric‎ | fenv
m (Use since= and until= params of {{dcl}} template.)
m (see c)
Line 26: Line 26:
 
{{c|0}} on success, non-zero otherwise.
 
{{c|0}} on success, non-zero otherwise.
  
[[de:cpp/numeric/fenv/feexceptflag]]
+
===See Also===
[[es:cpp/numeric/fenv/feexceptflag]]
+
{{dsc begin}}
[[fr:cpp/numeric/fenv/feexceptflag]]
+
{{dsc see c | c/numeric/fenv/feexceptflag}}
[[it:cpp/numeric/fenv/feexceptflag]]
+
{{dsc end}}
[[ja:cpp/numeric/fenv/feexceptflag]]
+
 
[[pt:cpp/numeric/fenv/feexceptflag]]
+
{{langlinks|de|es|fr|it|ja|pt|ru|zh}}
[[ru:cpp/numeric/fenv/feexceptflag]]
+
[[zh:cpp/numeric/fenv/feexceptflag]]
+

Revision as of 07:27, 18 September 2017

 
 
 
Floating-point environment
Functions
fegetexceptflagfesetexceptflag
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
Macro constants
(C++11)
 
Defined in header <cfenv>
int fegetexceptflag( std::fexcept_t* flagp, int excepts );
(1) (since C++11)
int fesetexceptflag( const std::fexcept_t* flagp, int excepts );
(2) (since C++11)

1) Attempts to obtain the full contents of the floating-point exception flags that are listed in the bitmask argument excepts, which is a bitwise OR of the floating point exception macros.

2) Attempts to copy the full contents of the floating-point exception flags that are listed in excepts from flagp into the floating-point environment. Does not raise any exceptions, only modifies the flags.

The full contents of a floating-point exception flag is not necessarily a boolean value indicating whether the exception is raised or cleared. For example, it may be a struct which includes the boolean status and the address of the code that triggered the exception. These functions obtain all such content and obtain/store it in flagp in implementation-defined format.

Parameters

flagp - pointer to an std::fexcept_t object where the flags will be stored or read from
excepts - bitmask listing the exception flags to get/set

Return value

0 on success, non-zero otherwise.

See Also

C documentation for feexceptflag