mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Merge pull request #1045 from boostorg/ccmath_config
Update/improve ccmath configuration.
This commit is contained in:
@@ -8,20 +8,13 @@
|
||||
#ifndef BOOST_MATH_CCMATH_ABS
|
||||
#define BOOST_MATH_CCMATH_ABS
|
||||
|
||||
#include <cmath>
|
||||
#include <type_traits>
|
||||
#include <limits>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/ccmath/isnan.hpp>
|
||||
#include <boost/math/ccmath/isinf.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/abs.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
34
include/boost/math/ccmath/detail/config.hpp
Normal file
34
include/boost/math/ccmath/detail/config.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
// (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_NO_CXX17_IF_CONSTEXPR
|
||||
# define BOOST_MATH_NO_CCMATH
|
||||
#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 (__cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH)
|
||||
# define BOOST_MATH_NO_CCMATH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -6,18 +6,12 @@
|
||||
#ifndef BOOST_MATH_CCMATH_DIV_HPP
|
||||
#define BOOST_MATH_CCMATH_DIV_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cinttypes>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/div.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
@@ -6,19 +6,12 @@
|
||||
#ifndef BOOST_MATH_CCMATH_FMA_HPP
|
||||
#define BOOST_MATH_CCMATH_FMA_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/ccmath/isinf.hpp>
|
||||
#include <boost/math/ccmath/isnan.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/fma.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
@@ -6,18 +6,11 @@
|
||||
#ifndef BOOST_MATH_CCMATH_ISINF
|
||||
#define BOOST_MATH_CCMATH_ISINF
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/isinf.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
@@ -6,17 +6,11 @@
|
||||
#ifndef BOOST_MATH_CCMATH_ISNAN
|
||||
#define BOOST_MATH_CCMATH_ISNAN
|
||||
|
||||
#include <cmath>
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/isnan.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
@@ -6,20 +6,13 @@
|
||||
#ifndef BOOST_MATH_ISNORMAL_HPP
|
||||
#define BOOST_MATH_ISNORMAL_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/ccmath/abs.hpp>
|
||||
#include <boost/math/ccmath/isinf.hpp>
|
||||
#include <boost/math/ccmath/isnan.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/abs.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
@@ -7,11 +7,8 @@
|
||||
#ifndef BOOST_MATH_CCMATH_LDEXP_HPP
|
||||
#define BOOST_MATH_CCMATH_LDEXP_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/ccmath/abs.hpp>
|
||||
#include <boost/math/ccmath/isinf.hpp>
|
||||
#include <boost/math/ccmath/isnan.hpp>
|
||||
|
||||
@@ -6,21 +6,15 @@
|
||||
#ifndef BOOST_MATH_CCMATH_ROUND_HPP
|
||||
#define BOOST_MATH_CCMATH_ROUND_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/ccmath/abs.hpp>
|
||||
#include <boost/math/ccmath/isinf.hpp>
|
||||
#include <boost/math/ccmath/isnan.hpp>
|
||||
#include <boost/math/ccmath/modf.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/round.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
@@ -6,22 +6,15 @@
|
||||
#ifndef BOOST_MATH_CCMATH_SIGNBIT_HPP
|
||||
#define BOOST_MATH_CCMATH_SIGNBIT_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/special_functions/detail/fp_traits.hpp>
|
||||
#include <boost/math/ccmath/isnan.hpp>
|
||||
#include <boost/math/ccmath/abs.hpp>
|
||||
|
||||
#include <boost/math/tools/is_standalone.hpp>
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#ifdef BOOST_MATH_NO_CCMATH
|
||||
#error "The header <boost/math/signbit.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __has_include
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/math/tools/config.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/policies/error_handling.hpp>
|
||||
#include <boost/math/special_functions/math_fwd.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
@@ -19,11 +20,9 @@
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
#if !defined(BOOST_MATH_NO_CCMATH) && !defined(BOOST_MATH_NO_CONSTEXPR_DETECTION)
|
||||
#include <boost/math/ccmath/ldexp.hpp>
|
||||
# if !defined(BOOST_MATH_NO_CONSTEXPR_DETECTION)
|
||||
# define BOOST_MATH_HAS_CONSTEXPR_LDEXP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace math{
|
||||
|
||||
@@ -14,15 +14,14 @@
|
||||
#include <type_traits>
|
||||
#include <boost/math/special_functions/math_fwd.hpp>
|
||||
#include <boost/math/tools/config.hpp>
|
||||
#include <boost/math/ccmath/detail/config.hpp>
|
||||
#include <boost/math/policies/error_handling.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <boost/math/tools/is_constant_evaluated.hpp>
|
||||
|
||||
#ifndef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||
# if !defined(BOOST_MATH_NO_CONSTEXPR_DETECTION)
|
||||
# include <boost/math/ccmath/ldexp.hpp>
|
||||
#if !defined(BOOST_MATH_NO_CCMATH) && !defined(BOOST_MATH_NO_CONSTEXPR_DETECTION)
|
||||
#include <boost/math/ccmath/ldexp.hpp>
|
||||
# define BOOST_MATH_HAS_CONSTEXPR_LDEXP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
|
||||
Reference in New Issue
Block a user