aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/cfenv
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/libcxx/include/cfenv')
-rw-r--r--contrib/llvm-project/libcxx/include/cfenv44
1 files changed, 27 insertions, 17 deletions
diff --git a/contrib/llvm-project/libcxx/include/cfenv b/contrib/llvm-project/libcxx/include/cfenv
index 6cd91db5a463..16b3761ee27b 100644
--- a/contrib/llvm-project/libcxx/include/cfenv
+++ b/contrib/llvm-project/libcxx/include/cfenv
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===---------------------------- cfenv -----------------------------------===//
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -52,30 +52,40 @@ int feupdateenv(const fenv_t* envp);
} // std
*/
+#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
+
#include <fenv.h>
+#ifndef _LIBCPP_FENV_H
+# error <cfenv> tried including <fenv.h> but didn't find libc++'s <fenv.h> header. \
+ This usually means that your header search paths are not configured properly. \
+ The header search paths should contain the C++ Standard Library headers before \
+ any C Standard Library, and you are probably using compiler flags that make that \
+ not be the case.
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#pragma GCC system_header
+# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
-using ::fenv_t;
-using ::fexcept_t;
-
-using ::feclearexcept;
-using ::fegetexceptflag;
-using ::feraiseexcept;
-using ::fesetexceptflag;
-using ::fetestexcept;
-using ::fegetround;
-using ::fesetround;
-using ::fegetenv;
-using ::feholdexcept;
-using ::fesetenv;
-using ::feupdateenv;
+using ::fenv_t _LIBCPP_USING_IF_EXISTS;
+using ::fexcept_t _LIBCPP_USING_IF_EXISTS;
+
+using ::feclearexcept _LIBCPP_USING_IF_EXISTS;
+using ::fegetexceptflag _LIBCPP_USING_IF_EXISTS;
+using ::feraiseexcept _LIBCPP_USING_IF_EXISTS;
+using ::fesetexceptflag _LIBCPP_USING_IF_EXISTS;
+using ::fetestexcept _LIBCPP_USING_IF_EXISTS;
+using ::fegetround _LIBCPP_USING_IF_EXISTS;
+using ::fesetround _LIBCPP_USING_IF_EXISTS;
+using ::fegetenv _LIBCPP_USING_IF_EXISTS;
+using ::feholdexcept _LIBCPP_USING_IF_EXISTS;
+using ::fesetenv _LIBCPP_USING_IF_EXISTS;
+using ::feupdateenv _LIBCPP_USING_IF_EXISTS;
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_CFENV
+#endif // _LIBCPP_CFENV