53 lines · plain
1// (C) Copyright John Maddock 2023.2// Use, modification and distribution are subject to the3// Boost Software License, Version 1.0. (See accompanying file4// 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_CONFIG9#define BOOST_MATH_CCMATH_DETAIL_CONFIG10 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_STANDALONE18 19#include <boost/config.hpp>20#ifdef BOOST_MATH_NO_CXX17_IF_CONSTEXPR21# define BOOST_MATH_NO_CCMATH22#endif23 24#else // BOOST_MATH_STANDALONE25 26#if defined(_MSC_VER)27 28#if defined(_MSVC_LANG) && (_MSVC_LANG < 201703)29# define BOOST_MATH_NO_CCMATH30#endif31 32#else // _MSC_VER33 34#if (__cplusplus < 201703)35# define BOOST_MATH_NO_CCMATH36#endif37 38#endif39 40#endif41 42#ifndef _MSC_VER43//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_CCMATH48#endif49#endif50 51 52#endif53