1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
14 #include <type_traits>
16 #include "test_macros.h"
19 #error FE_DIVBYZERO not defined
23 #error FE_INEXACT not defined
27 #error FE_INVALID not defined
31 #error FE_OVERFLOW not defined
35 #error FE_UNDERFLOW not defined
39 #error FE_ALL_EXCEPT not defined
43 #error FE_DOWNWARD not defined
47 #error FE_TONEAREST not defined
51 #error FE_TOWARDZERO not defined
55 #error FE_UPWARD not defined
59 #error FE_DFL_ENV not defined
66 static_assert((std::is_same
<decltype(::feclearexcept(0)), int>::value
), "");
67 static_assert((std::is_same
<decltype(::fegetexceptflag(&fex
, 0)), int>::value
), "");
68 static_assert((std::is_same
<decltype(::feraiseexcept(0)), int>::value
), "");
69 static_assert((std::is_same
<decltype(::fesetexceptflag(&fex
, 0)), int>::value
), "");
70 static_assert((std::is_same
<decltype(::fetestexcept(0)), int>::value
), "");
71 static_assert((std::is_same
<decltype(::fegetround()), int>::value
), "");
72 static_assert((std::is_same
<decltype(::fesetround(0)), int>::value
), "");
73 static_assert((std::is_same
<decltype(::fegetenv(&fenv
)), int>::value
), "");
74 static_assert((std::is_same
<decltype(::feholdexcept(&fenv
)), int>::value
), "");
75 static_assert((std::is_same
<decltype(::fesetenv(&fenv
)), int>::value
), "");
76 static_assert((std::is_same
<decltype(::feupdateenv(&fenv
)), int>::value
), "");