From afa7217b1cc002912103e8d87f6512281c907d79 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Sat, 20 Mar 2021 15:03:07 +0300 Subject: [PATCH 1/2] Remove concept_check from real concept --- include/boost/math/concepts/real_concept.hpp | 7 +++---- include/boost/math/concepts/real_type_concept.hpp | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index f6dcce4f8..595398ff9 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -24,7 +24,6 @@ #define BOOST_MATH_REAL_CONCEPT_HPP #include -#include #include #include #include @@ -38,8 +37,8 @@ #endif #include #include -#include -#include // fmodl +#include +#include #if defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__) # include @@ -377,7 +376,7 @@ inline concepts::real_concept epsilon(BOOST_MATH_EXPLICI } template <> -inline BOOST_MATH_CONSTEXPR int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(concepts::real_concept)) BOOST_NOEXCEPT +inline constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(concepts::real_concept)) BOOST_NOEXCEPT { // Assume number of significand bits is same as real_concept_base_type, // unless std::numeric_limits::is_specialized to provide digits. diff --git a/include/boost/math/concepts/real_type_concept.hpp b/include/boost/math/concepts/real_type_concept.hpp index 97da78012..1156852f2 100644 --- a/include/boost/math/concepts/real_type_concept.hpp +++ b/include/boost/math/concepts/real_type_concept.hpp @@ -6,6 +6,7 @@ #ifndef BOOST_MATH_REAL_TYPE_CONCEPT_HPP #define BOOST_MATH_REAL_TYPE_CONCEPT_HPP +#include #include #ifdef BOOST_MSVC #pragma warning(push) @@ -13,7 +14,6 @@ #pragma warning(disable: 4510) #pragma warning(disable: 4610) #endif -#include #ifdef BOOST_MSVC #pragma warning(pop) #endif From 4e0aa947ab8020d8e28a77a48e5f200114d21662 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Sat, 20 Mar 2021 22:06:18 +0300 Subject: [PATCH 2/2] Disable distribution concepts header in standalone --- include/boost/math/concepts/distributions.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/math/concepts/distributions.hpp b/include/boost/math/concepts/distributions.hpp index 37e0c00e7..865a3ea48 100644 --- a/include/boost/math/concepts/distributions.hpp +++ b/include/boost/math/concepts/distributions.hpp @@ -11,6 +11,8 @@ #ifndef BOOST_MATH_DISTRIBUTION_CONCEPT_HPP #define BOOST_MATH_DISTRIBUTION_CONCEPT_HPP +#ifndef BOOST_MATH_STANDALONE + #include #include #ifdef BOOST_MSVC @@ -487,5 +489,9 @@ Distribution* DistributionConcept::pd = 0; } // namespace math } // namespace boost +#else +#error This header can not be used in standalone mode. +#endif // BOOST_MATH_STANDALONE + #endif // BOOST_MATH_DISTRIBUTION_CONCEPT_HPP