#pragma warning(disable:4702) // Unreachable code: optimization warning
#endif
+#include <type_traits>
+
namespace boost{ namespace math{
namespace detail{
// this version is for 80-bit long double's and smaller:
//
template <class T, class Policy>
-T erf_inv_imp(const T& p, const T& q, const Policy&, const boost::integral_constant<int, 64>*)
+T erf_inv_imp(const T& p, const T& q, const Policy&, const std::integral_constant<int, 64>*)
{
BOOST_MATH_STD_USING // for ADL of std names.
};
template <class T, class Policy>
-T erf_inv_imp(const T& p, const T& q, const Policy& pol, const boost::integral_constant<int, 0>*)
+T erf_inv_imp(const T& p, const T& q, const Policy& pol, const std::integral_constant<int, 0>*)
{
//
// Generic version, get a guess that's accurate to 64-bits (10^-19)
//
- T guess = erf_inv_imp(p, q, pol, static_cast<boost::integral_constant<int, 64> const*>(0));
+ T guess = erf_inv_imp(p, q, pol, static_cast<std::integral_constant<int, 64> const*>(0));
T result;
//
// If T has more bit's than 64 in it's mantissa then we need to iterate,
//
if(policies::digits<T, Policy>() > 64)
{
- boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
+ std::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
if(p <= 0.5)
{
- result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(p, 1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3, max_iter);
+ result = tools::halley_iterate(detail::erf_roots<typename std::remove_cv<T>::type, Policy>(p, 1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3, max_iter);
}
else
{
- result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(q, -1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3, max_iter);
+ result = tools::halley_iterate(detail::erf_roots<typename std::remove_cv<T>::type, Policy>(q, -1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3, max_iter);
}
policies::check_root_iterations<T>("boost::math::erf_inv<%1%>", max_iter, pol);
}
// to use, based on the number of bits in the mantissa of T:
//
typedef typename policies::precision<result_type, Policy>::type precision_type;
- typedef boost::integral_constant<int,
+ typedef std::integral_constant<int,
precision_type::value <= 0 ? 0 :
precision_type::value <= 64 ? 64 : 0
> tag_type;
// to use, based on the number of bits in the mantissa of T:
//
typedef typename policies::precision<result_type, Policy>::type precision_type;
- typedef boost::integral_constant<int,
+ typedef std::integral_constant<int,
precision_type::value <= 0 ? 0 :
precision_type::value <= 64 ? 64 : 0
> tag_type;