From d6720dd6e1891f9b92fcedf380c810c980c3efc7 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 21 Feb 2023 08:55:52 -0800 Subject: [PATCH] Remove CXX03 and CXX11 workarounds --- doc/distributions/hyperexponential.qbk | 2 -- .../math/cstdfloat/cstdfloat_complex_std.hpp | 16 ---------------- include/boost/math/differentiation/autodiff.hpp | 6 +----- include/boost/math/quaternion.hpp | 6 ------ .../boost/math/special_functions/lambert_w.hpp | 10 +--------- .../boost/math/special_functions/legendre.hpp | 8 +------- 6 files changed, 3 insertions(+), 45 deletions(-) diff --git a/doc/distributions/hyperexponential.qbk b/doc/distributions/hyperexponential.qbk index d2b2a1d48b..bea4efed6f 100644 --- a/doc/distributions/hyperexponential.qbk +++ b/doc/distributions/hyperexponential.qbk @@ -39,10 +39,8 @@ template hyperexponential_distribution(RateRangeT const& rate_range); - #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) // C++11 initializer lists supported. hyperexponential_distribution(std::initializer_list l1, std::initializer_list l2); hyperexponential_distribution(std::initializer_list l1); - #endif // Accessors: std::size_t num_phases() const; diff --git a/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp b/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp index a4007ee186..9eba3dd695 100644 --- a/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp +++ b/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp @@ -90,21 +90,6 @@ complex(const complex&); complex(const complex&); - #if defined(BOOST_NO_CXX11_CONSTEXPR) - complex(const value_type& r = value_type(), - const value_type& i = value_type()) : re(r), - im(i) { } - - template - explicit complex(const complex& x) : re(x.real()), - im(x.imag()) { } - - const value_type& real() const { return re; } - const value_type& imag() const { return im; } - - value_type& real() { return re; } - value_type& imag() { return im; } - #else constexpr complex(const value_type& r = value_type(), const value_type& i = value_type()) : re(r), im(i) { } @@ -115,7 +100,6 @@ value_type real() const { return re; } value_type imag() const { return im; } - #endif void real(value_type r) { re = r; } void imag(value_type i) { im = i; } diff --git a/include/boost/math/differentiation/autodiff.hpp b/include/boost/math/differentiation/autodiff.hpp index 1286326c2e..f4b333b468 100644 --- a/include/boost/math/differentiation/autodiff.hpp +++ b/include/boost/math/differentiation/autodiff.hpp @@ -2004,12 +2004,8 @@ using autodiff_root_type = typename autodiff_fvar_type::root_ty template struct promote_args_2, detail::autodiff_fvar_type> { - using type = detail::autodiff_fvar_type::type, -#ifndef BOOST_NO_CXX14_CONSTEXPR + using type = detail::autodiff_fvar_type::type, (std::max)(Order0, Order1)>; -#else - Order0; -#endif }; template diff --git a/include/boost/math/quaternion.hpp b/include/boost/math/quaternion.hpp index 5cb8b36e5d..111e3a4422 100644 --- a/include/boost/math/quaternion.hpp +++ b/include/boost/math/quaternion.hpp @@ -46,7 +46,6 @@ namespace boost struct is_trivial_arithmetic_type : public is_trivial_arithmetic_type_imp::type {}; } -#ifndef BOOST_NO_CXX14_CONSTEXPR namespace constexpr_detail { template @@ -57,7 +56,6 @@ namespace boost b = t; } } -#endif template class quaternion @@ -177,11 +175,7 @@ namespace boost BOOST_CXX14_CONSTEXPR void swap(quaternion& o) { -#ifndef BOOST_NO_CXX14_CONSTEXPR using constexpr_detail::swap; -#else - using std::swap; -#endif swap(a, o.a); swap(b, o.b); swap(c, o.c); diff --git a/include/boost/math/special_functions/lambert_w.hpp b/include/boost/math/special_functions/lambert_w.hpp index 9bc5bb29fa..1340dd28b1 100644 --- a/include/boost/math/special_functions/lambert_w.hpp +++ b/include/boost/math/special_functions/lambert_w.hpp @@ -519,19 +519,11 @@ template T lambert_w0_small_z(T x, const Policy& pol) { //std::numeric_limits::max_digits10 == 36 ? 3 : // 128-bit long double. using tag_type = std::integral_constant::is_specialized == 0 ? 5 : -#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS + std::numeric_limits::is_specialized == 0 ? 5 : std::numeric_limits::max_digits10 <= 9 ? 0 : // for float 32-bit. std::numeric_limits::max_digits10 <= 17 ? 1 : // for double 64-bit. std::numeric_limits::max_digits10 <= 22 ? 2 : // for 80-bit double extended. std::numeric_limits::max_digits10 < 37 ? 4 // for both 128-bit long double (3) and 128-bit quad suffix Q type (4). -#else - std::numeric_limits::radix != 2 ? 5 : - std::numeric_limits::digits <= 24 ? 0 : // for float 32-bit. - std::numeric_limits::digits <= 53 ? 1 : // for double 64-bit. - std::numeric_limits::digits <= 64 ? 2 : // for 80-bit double extended. - std::numeric_limits::digits <= 113 ? 4 // for both 128-bit long double (3) and 128-bit quad suffix Q type (4). -#endif : 5>; // All Generic multiprecision types. // std::cout << "\ntag type = " << tag_type << std::endl; // error C2275: 'tag_type': illegal use of this type as an expression. return lambert_w0_small_z(x, pol, tag_type()); diff --git a/include/boost/math/special_functions/legendre.hpp b/include/boost/math/special_functions/legendre.hpp index e8e90f580b..888d4f09cf 100644 --- a/include/boost/math/special_functions/legendre.hpp +++ b/include/boost/math/special_functions/legendre.hpp @@ -73,13 +73,7 @@ T legendre_imp(unsigned l, T x, const Policy& pol, bool second = false) } template -T legendre_p_prime_imp(unsigned l, T x, const Policy& pol, T* Pn -#ifdef BOOST_NO_CXX11_NULLPTR - = 0 -#else - = nullptr -#endif -) +T legendre_p_prime_imp(unsigned l, T x, const Policy& pol, T* Pn = nullptr) { static const char* function = "boost::math::legrendre_p_prime<%1%>(unsigned, %1%)"; // Error handling: