aboutsummaryrefslogtreecommitdiff
path: root/third-party/boost-math/include/boost/math/ccmath/detail/config.hpp
blob: 097d69a16bd3d8ff8b4871f45ee9824e95e62cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//  (C) Copyright John Maddock 2023.
//  Use, modification and distribution are subject to the
//  Boost Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
//  Core configuration for ccmath functions, basically will they work or not?

#ifndef BOOST_MATH_CCMATH_DETAIL_CONFIG
#define BOOST_MATH_CCMATH_DETAIL_CONFIG

#include <cmath>
#include <type_traits>
#include <limits>
#include <boost/math/tools/is_constant_evaluated.hpp>
#include <boost/math/tools/is_standalone.hpp>

#ifndef BOOST_MATH_STANDALONE

#include <boost/config.hpp>
#ifdef BOOST_MATH_NO_CXX17_IF_CONSTEXPR
#  define BOOST_MATH_NO_CCMATH
#endif

#else // BOOST_MATH_STANDALONE

#if defined(_MSC_VER)

#if defined(_MSVC_LANG) && (_MSVC_LANG < 201703)
#  define BOOST_MATH_NO_CCMATH
#endif

#else // _MSC_VER

#if (__cplusplus < 201703)
#  define BOOST_MATH_NO_CCMATH
#endif

#endif

#endif

#ifndef _MSC_VER
//
// Don't check here for msvc as they didn't get std lib configuration macros at the same time as C++17 <type_traits>
//
#if (defined(__cpp_lib_bool_constant) && __cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH)
#  define BOOST_MATH_NO_CCMATH
#endif
#endif


#endif