std::fegetenv, std::fesetenv
来自cppreference.com
![]() |
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <cfenv> 中定义
|
||
int fegetenv( std::fenv_t* envp ) |
(1) | (C++11 起) |
int fesetenv( const std::fenv_t* envp ); |
(2) | (C++11 起) |
试图存储状态的浮点环境中的对象指向的值,
2) envp
原文:
Attempts to store the status of the floating-point environment in the object pointed to by
envp
.尝试建立的浮点环境的
envp
指向的对象。对象,必须预先获得通过调用std::feholdexcept或std::fegetenv
或一个浮点宏常数,如果有任何的浮点状态标志被设置在envp
,他们变得在环境(设置,并且然后可测试与std::fetestexcept),但不提出相应的浮点异常(继续执行不间断)原文:
Attempts to establish the floating-point environment from the object pointed to by
envp
. The value of that object must be previously obtained by a call to std::feholdexcept or std::fegetenv
or be a floating-point macro constant. If any of the floating-point status flags are set in envp
, they become set in the environment (and are then testable with std::fetestexcept), but the corresponding floating-point exceptions are not raised (execution continues uninterrupted)[编辑] 参数
envp | - | 指针指向的对象类型std::fenv_t持有的地位浮点环境
原文: pointer to the object of type std::fenv_t which holds the status of the floating-point environment |
[编辑] 返回值
0成功,否则返回非零值.
[编辑] 另请参阅
(C++11) |
保存环境,清除所有状态标志,而忽略了未来所有的错误 原文: saves the environment, clears all status flags and ignores all future errors (函数) |
(C++11) |
浮点环境恢复和提高了先前抛出异常 原文: restores the floating-point environment and raises the previously raise exceptions (函数) |
(C++11) |
默认的浮点环境 (常量宏) |