mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Assert when features which require C++17 are compiled for an earlier C++ version.
Also document C++17 requirement for norms.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
[section:norms Norms]
|
||||
|
||||
[note All of the functions below require at least C++17]
|
||||
|
||||
[heading Synopsis]
|
||||
|
||||
``
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -13,6 +13,14 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
#include <type_traits>
|
||||
#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
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
#include <type_traits>
|
||||
#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
|
||||
#error "The header <boost/math/norms.hpp> can only be used in C++17 and later."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::ccmath {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
#ifdef __has_include
|
||||
# if __has_include(<bit>)
|
||||
# include <bit>
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
#include <type_traits>
|
||||
#include <boost/math/tools/assert.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
|
||||
#endif
|
||||
|
||||
namespace boost::math::differentiation {
|
||||
|
||||
namespace detail {
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost { namespace math{
|
||||
|
||||
template<class RandomAccessContainer>
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
#include <limits>
|
||||
#include <boost/math/tools/big_constant.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
|
||||
#endif
|
||||
|
||||
namespace boost::math::filters {
|
||||
|
||||
template <typename Real, unsigned p>
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
#include <boost/math/interpolators/detail/quintic_hermite_detail.hpp>
|
||||
#include <boost/math/interpolators/detail/septic_hermite_detail.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
|
||||
#endif
|
||||
|
||||
namespace boost::math {
|
||||
|
||||
template<class Real, int p, int order>
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
#include <boost/math/interpolators/detail/quintic_hermite_detail.hpp>
|
||||
#include <boost/math/interpolators/detail/septic_hermite_detail.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
|
||||
#endif
|
||||
|
||||
namespace boost::math {
|
||||
|
||||
template<class Real, int p, int order>
|
||||
|
||||
@@ -9,6 +9,14 @@
|
||||
#include <type_traits>
|
||||
#include <limits>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math {
|
||||
|
||||
template<typename Real>
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
#include <boost/math/tools/roots.hpp>
|
||||
#include <boost/math/statistics/univariate_statistics.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
|
||||
#endif
|
||||
|
||||
namespace boost::math::statistics {
|
||||
|
||||
|
||||
@@ -18,6 +18,13 @@
|
||||
#include <type_traits>
|
||||
#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
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/core/demangle.hpp>
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,14 @@
|
||||
#include <limits>
|
||||
#include <boost/math/differentiation/finite_difference.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
|
||||
#endif
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
template<class Real, bool kahan=true>
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
template<typename Real, typename Z = int64_t>
|
||||
|
||||
@@ -13,6 +13,14 @@
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
template<typename Real, typename Z = int64_t>
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
#include <boost/math/tools/complex.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
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
#include <boost/math/tools/header_deprecated.hpp>
|
||||
#include <boost/math/statistics/univariate_statistics.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
|
||||
#endif
|
||||
|
||||
BOOST_MATH_HEADER_DEPRECATED("<boost/math/statistics/signal_statistics.hpp>");
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
@@ -14,7 +14,14 @@
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_STANDALONE
|
||||
#include <boost/core/demangle.hpp>
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
#include <boost/math/tools/assert.hpp>
|
||||
#include <boost/math/tools/header_deprecated.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
|
||||
#endif
|
||||
|
||||
BOOST_MATH_HEADER_DEPRECATED("<boost/math/statistics/univariate_statistics.hpp>");
|
||||
|
||||
namespace boost::math::tools {
|
||||
|
||||
Reference in New Issue
Block a user