std:: fegetexceptflag, std:: fesetexceptflag
From cppreference.net
C++
Numerics library
| Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Floating-point environment
| Functions | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
fegetexceptflag
fesetexceptflag
(C++11)
(C++11)
|
||||
|
(C++11)
(C++11)
|
||||
|
(C++11)
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
| Macro constants | ||||
|
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
|
||||
|
(C++11)
(C++11)
(C++11)
(C++11)
|
||||
|
(C++11)
|
|
ヘッダー
<cfenv>
で定義
|
||
|
int
fegetexceptflag
(
std::
fexcept_t
*
flagp,
int
excepts
)
;
|
(1) | (C++11以降) |
|
int
fesetexceptflag
(
const
std::
fexcept_t
*
flagp,
int
excepts
)
;
|
(2) | (C++11以降) |
1) ビットマスク引数
excepts
にリストされている浮動小数点例外フラグの完全な内容を取得しようとします。
excepts
は
浮動小数点例外マクロ
のビット単位のORです。
2)
excepts
にリストされている浮動小数点例外フラグの完全な内容を
flagp
から浮動小数点環境へコピーしようと試みます。例外を発生させず、フラグのみを変更します。
浮動小数点例外フラグの完全な内容は、必ずしも例外が発生したかクリアされたかを示すブール値ではありません。例えば、ブール値のステータスと例外をトリガーしたコードのアドレスを含む構造体である可能性があります。これらの関数はそのような内容をすべて取得し、実装定義の形式で
flagp
に取得/保存します。
パラメータ
| flagp | - | フラグを格納または読み取る std:: fexcept_t オブジェクトへのポインタ |
| excepts | - | 取得/設定する例外フラグをリストしたビットマスク |
戻り値
0 成功時は0、それ以外の場合は非ゼロ値。
関連項目
|
C documentation
for
fegetexceptflag
,
fesetexceptflag
|