| 1 |
// (C) Copyright John Maddock 2023. |
| 2 |
// Use, modification and distribution are subject to the |
| 3 |
// Boost Software License, Version 1.0. (See accompanying file |
| 4 |
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 |
// |
| 6 |
// Core configuration for ccmath functions, basically will they work or not? |
| 7 |
|
| 8 |
#ifndef BOOST_MATH_CCMATH_DETAIL_CONFIG |
| 9 |
#define BOOST_MATH_CCMATH_DETAIL_CONFIG |
| 10 |
|
| 11 |
#include <cmath> |
| 12 |
#include <type_traits> |
| 13 |
#include <limits> |
| 14 |
#include <boost/math/tools/is_constant_evaluated.hpp> |
| 15 |
#include <boost/math/tools/is_standalone.hpp> |
| 16 |
|
| 17 |
#ifndef BOOST_MATH_STANDALONE |
| 18 |
|
| 19 |
#include <boost/config.hpp> |
| 20 |
#ifdef BOOST_MATH_NO_CXX17_IF_CONSTEXPR |
| 21 |
# define BOOST_MATH_NO_CCMATH |
| 22 |
#endif |
| 23 |
|
| 24 |
#else // BOOST_MATH_STANDALONE |
| 25 |
|
| 26 |
#if defined(_MSC_VER) |
| 27 |
|
| 28 |
#if defined(_MSVC_LANG) && (_MSVC_LANG < 201703) |
| 29 |
# define BOOST_MATH_NO_CCMATH |
| 30 |
#endif |
| 31 |
|
| 32 |
#else // _MSC_VER |
| 33 |
|
| 34 |
#if (__cplusplus < 201703) |
| 35 |
# define BOOST_MATH_NO_CCMATH |
| 36 |
#endif |
| 37 |
|
| 38 |
#endif |
| 39 |
|
| 40 |
#endif |
| 41 |
|
| 42 |
#ifndef _MSC_VER |
| 43 |
// |
| 44 |
// Don't check here for msvc as they didn't get std lib configuration macros at the same time as C++17 <type_traits> |
| 45 |
// |
| 46 |
#if (defined(__cpp_lib_bool_constant) && __cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH) |
| 47 |
# define BOOST_MATH_NO_CCMATH |
| 48 |
#endif |
| 49 |
#endif |
| 50 |
|
| 51 |
|
| 52 |
#endif |