Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CXX03 and CXX11 workarounds #956

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions doc/distributions/hyperexponential.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
template <typename RateRangeT>
hyperexponential_distribution(RateRangeT const& rate_range);

#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) // C++11 initializer lists supported.
hyperexponential_distribution(std::initializer_list<RealType> l1, std::initializer_list<RealType> l2);
hyperexponential_distribution(std::initializer_list<RealType> l1);
#endif

// Accessors:
std::size_t num_phases() const;
Expand Down
16 changes: 0 additions & 16 deletions include/boost/math/cstdfloat/cstdfloat_complex_std.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,6 @@
complex(const complex<double>&);
complex(const complex<long double>&);

#if defined(BOOST_NO_CXX11_CONSTEXPR)
complex(const value_type& r = value_type(),
const value_type& i = value_type()) : re(r),
im(i) { }

template<typename X>
explicit complex(const complex<X>& 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) { }
Expand All @@ -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; }
Expand Down
6 changes: 1 addition & 5 deletions include/boost/math/differentiation/autodiff.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2004,12 +2004,8 @@ using autodiff_root_type = typename autodiff_fvar_type<RealType, Order>::root_ty
template <typename RealType0, size_t Order0, typename RealType1, size_t Order1>
struct promote_args_2<detail::autodiff_fvar_type<RealType0, Order0>,
detail::autodiff_fvar_type<RealType1, Order1>> {
using type = detail::autodiff_fvar_type<typename promote_args_2<RealType0, RealType1>::type,
#ifndef BOOST_NO_CXX14_CONSTEXPR
using type = detail::autodiff_fvar_type<typename promote_args_2<RealType0, RealType1>::type,
(std::max)(Order0, Order1)>;
#else
Order0<Order1 ? Order1 : Order0>;
#endif
};

template <typename RealType, size_t Order>
Expand Down
6 changes: 0 additions & 6 deletions include/boost/math/quaternion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ namespace boost
struct is_trivial_arithmetic_type : public is_trivial_arithmetic_type_imp<T>::type {};
}

#ifndef BOOST_NO_CXX14_CONSTEXPR
namespace constexpr_detail
{
template <class T>
Expand All @@ -57,7 +56,6 @@ namespace boost
b = t;
}
}
#endif

template<typename T>
class quaternion
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 1 addition & 9 deletions include/boost/math/special_functions/lambert_w.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,19 +519,11 @@ template <typename T, typename Policy>
T lambert_w0_small_z(T x, const Policy& pol)
{ //std::numeric_limits<T>::max_digits10 == 36 ? 3 : // 128-bit long double.
using tag_type = std::integral_constant<int,
std::numeric_limits<T>::is_specialized == 0 ? 5 :
#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
std::numeric_limits<T>::is_specialized == 0 ? 5 :
std::numeric_limits<T>::max_digits10 <= 9 ? 0 : // for float 32-bit.
std::numeric_limits<T>::max_digits10 <= 17 ? 1 : // for double 64-bit.
std::numeric_limits<T>::max_digits10 <= 22 ? 2 : // for 80-bit double extended.
std::numeric_limits<T>::max_digits10 < 37 ? 4 // for both 128-bit long double (3) and 128-bit quad suffix Q type (4).
#else
std::numeric_limits<T>::radix != 2 ? 5 :
std::numeric_limits<T>::digits <= 24 ? 0 : // for float 32-bit.
std::numeric_limits<T>::digits <= 53 ? 1 : // for double 64-bit.
std::numeric_limits<T>::digits <= 64 ? 2 : // for 80-bit double extended.
std::numeric_limits<T>::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());
Expand Down
8 changes: 1 addition & 7 deletions include/boost/math/special_functions/legendre.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ T legendre_imp(unsigned l, T x, const Policy& pol, bool second = false)
}

template <class T, class Policy>
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:
Expand Down