diff --git a/include/boost/math/bindings/rr.hpp b/include/boost/math/bindings/rr.hpp index 59744925b..7a107deae 100644 --- a/include/boost/math/bindings/rr.hpp +++ b/include/boost/math/bindings/rr.hpp @@ -7,7 +7,6 @@ #define BOOST_MATH_NTL_RR_HPP #include -#include #include #include #include @@ -15,10 +14,11 @@ #include #include #include - +#include #include #include -#include +#include +#include #include namespace boost{ namespace math{ diff --git a/include/boost/math/complex/details.hpp b/include/boost/math/complex/details.hpp index 112e6c602..ec93c1996 100644 --- a/include/boost/math/complex/details.hpp +++ b/include/boost/math/complex/details.hpp @@ -10,21 +10,16 @@ // inverse trig complex functions, it also contains all the includes // that we need to implement all these functions. // -#include + +#include +#include +#include #include -#include -#include -#include // isnan where available -#include #include #include #include #include -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std{ using ::sqrt; } -#endif - namespace boost{ namespace math{ namespace detail{ template diff --git a/include/boost/math/concepts/std_real_concept.hpp b/include/boost/math/concepts/std_real_concept.hpp index a517d1d28..bd1a832e7 100644 --- a/include/boost/math/concepts/std_real_concept.hpp +++ b/include/boost/math/concepts/std_real_concept.hpp @@ -17,14 +17,12 @@ // compile if it std::whatever is in scope. #include -#include #include #include - +#include #include #include -#include -#include // fmodl +#include #ifndef BOOST_MATH_STD_REAL_CONCEPT_HPP #define BOOST_MATH_STD_REAL_CONCEPT_HPP diff --git a/include/boost/math/distributions/cauchy.hpp b/include/boost/math/distributions/cauchy.hpp index a026441d8..ddab35b37 100644 --- a/include/boost/math/distributions/cauchy.hpp +++ b/include/boost/math/distributions/cauchy.hpp @@ -17,9 +17,8 @@ #include #include #include -#include - #include +#include namespace boost{ namespace math { diff --git a/include/boost/math/distributions/exponential.hpp b/include/boost/math/distributions/exponential.hpp index 17b1b3085..949afabaf 100644 --- a/include/boost/math/distributions/exponential.hpp +++ b/include/boost/math/distributions/exponential.hpp @@ -12,7 +12,6 @@ #include #include #include -#include #ifdef BOOST_MSVC # pragma warning(push) @@ -21,6 +20,7 @@ #endif #include +#include namespace boost{ namespace math{ diff --git a/include/boost/math/distributions/extreme_value.hpp b/include/boost/math/distributions/extreme_value.hpp index 3f7458682..495e50ce3 100644 --- a/include/boost/math/distributions/extreme_value.hpp +++ b/include/boost/math/distributions/extreme_value.hpp @@ -12,7 +12,6 @@ #include #include #include -#include // // This is the maximum extreme value distribution, see @@ -22,6 +21,7 @@ // distribution or a Gumbel distribution. #include +#include #ifdef BOOST_MSVC # pragma warning(push) diff --git a/include/boost/math/distributions/rayleigh.hpp b/include/boost/math/distributions/rayleigh.hpp index 95c866a13..2920776ad 100644 --- a/include/boost/math/distributions/rayleigh.hpp +++ b/include/boost/math/distributions/rayleigh.hpp @@ -12,7 +12,6 @@ #include #include #include -#include #ifdef BOOST_MSVC # pragma warning(push) @@ -20,6 +19,7 @@ #endif #include +#include namespace boost{ namespace math{ diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index cdc490559..2d5a78930 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -15,8 +15,7 @@ #pragma once #endif -#include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index e55a35628..9d104aaab 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -16,8 +16,7 @@ #endif -#include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/atanh.hpp b/include/boost/math/special_functions/atanh.hpp index 871a465a8..035b09ba2 100644 --- a/include/boost/math/special_functions/atanh.hpp +++ b/include/boost/math/special_functions/atanh.hpp @@ -15,9 +15,7 @@ #pragma once #endif - -#include -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index c565ac08b..4d9094562 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -10,8 +10,8 @@ #pragma once #endif +#include #include -#include #include #include #include diff --git a/include/boost/math/special_functions/hypot.hpp b/include/boost/math/special_functions/hypot.hpp index efe1a3f21..c33135059 100644 --- a/include/boost/math/special_functions/hypot.hpp +++ b/include/boost/math/special_functions/hypot.hpp @@ -14,12 +14,8 @@ #include #include #include -#include #include // for swap - -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std{ using ::sqrt; using ::fabs; } -#endif +#include namespace boost{ namespace math{ namespace detail{ diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index c55c4ff79..3dc096683 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include +#include #include #include #include diff --git a/include/boost/math/special_functions/sinc.hpp b/include/boost/math/special_functions/sinc.hpp index 131e985fd..7220d30b8 100644 --- a/include/boost/math/special_functions/sinc.hpp +++ b/include/boost/math/special_functions/sinc.hpp @@ -19,14 +19,10 @@ #include #include #include -#include -#include +#include #include #include - - -#include - +#include // These are the the "Sinus Cardinal" functions. @@ -70,7 +66,6 @@ namespace boost return detail::sinc_pi_imp(static_cast(x)); } -#ifndef BOOST_NO_TEMPLATE_TEMPLATES template class U> inline U sinc_pi(const U x) { @@ -117,7 +112,6 @@ namespace boost { return sinc_pi(x); } -#endif /* BOOST_NO_TEMPLATE_TEMPLATES */ } } diff --git a/include/boost/math/special_functions/sinhc.hpp b/include/boost/math/special_functions/sinhc.hpp index 1216b7bfb..ffe8e4805 100644 --- a/include/boost/math/special_functions/sinhc.hpp +++ b/include/boost/math/special_functions/sinhc.hpp @@ -18,14 +18,13 @@ #include #include #include -#include -#include +#include #include #include +#include #include - // These are the the "Hyperbolic Sinus Cardinal" functions. namespace boost diff --git a/include/boost/math/tools/minima.hpp b/include/boost/math/tools/minima.hpp index edd4e3f23..800976b96 100644 --- a/include/boost/math/tools/minima.hpp +++ b/include/boost/math/tools/minima.hpp @@ -11,16 +11,16 @@ #pragma once #endif +#include +#include #include -#include #include #include -#include namespace boost{ namespace math{ namespace tools{ template -std::pair brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& max_iter) +std::pair brent_find_minima(F f, T min, T max, int bits, std::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { BOOST_MATH_STD_USING @@ -141,7 +141,7 @@ template inline std::pair brent_find_minima(F f, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { - boost::uintmax_t m = (std::numeric_limits::max)(); + std::uintmax_t m = (std::numeric_limits::max)(); return brent_find_minima(f, min, max, digits, m); } diff --git a/include/boost/math/tools/series.hpp b/include/boost/math/tools/series.hpp index 8816f47a9..1809dfab1 100644 --- a/include/boost/math/tools/series.hpp +++ b/include/boost/math/tools/series.hpp @@ -10,9 +10,9 @@ #pragma once #endif -#include -#include -#include +#include +#include +#include #include namespace boost{ namespace math{ namespace tools{ @@ -21,13 +21,13 @@ namespace boost{ namespace math{ namespace tools{ // Simple series summation come first: // template -inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms, const V& init_value) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING typedef typename Functor::result_type result_type; - boost::uintmax_t counter = max_terms; + std::uintmax_t counter = max_terms; result_type result = init_value; result_type next_term; @@ -44,14 +44,14 @@ inline typename Functor::result_type sum_series(Functor& func, const U& factor, } template -inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { typename Functor::result_type init_value = 0; return sum_series(func, factor, max_terms, init_value); } template -inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, const U& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms, const U& init_value) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING typedef typename Functor::result_type result_type; @@ -60,17 +60,17 @@ inline typename Functor::result_type sum_series(Functor& func, int bits, boost:: } template -inline typename Functor::result_type sum_series(Functor& func, int bits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type sum_series(Functor& func, int bits) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING typedef typename Functor::result_type result_type; - boost::uintmax_t iters = (std::numeric_limits::max)(); + std::uintmax_t iters = (std::numeric_limits::max)(); result_type init_val = 0; return sum_series(func, bits, iters, init_val); } template -inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING typedef typename Functor::result_type result_type; @@ -79,23 +79,23 @@ inline typename Functor::result_type sum_series(Functor& func, int bits, boost:: } template -inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING - boost::uintmax_t iters = (std::numeric_limits::max)(); + std::uintmax_t iters = (std::numeric_limits::max)(); return sum_series(func, bits, iters, init_value); } // // Checked summation: // template -inline typename Functor::result_type checked_sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value, V& norm) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type checked_sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms, const V& init_value, V& norm) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING typedef typename Functor::result_type result_type; - boost::uintmax_t counter = max_terms; + std::uintmax_t counter = max_terms; result_type result = init_value; result_type next_term; @@ -125,7 +125,7 @@ inline typename Functor::result_type checked_sum_series(Functor& func, const U& // in any case the result is still much better than a naive summation. // template -inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING @@ -148,13 +148,13 @@ inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) B } template -inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) +inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, std::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval()())) { BOOST_MATH_STD_USING typedef typename Functor::result_type result_type; - boost::uintmax_t counter = max_terms; + std::uintmax_t counter = max_terms; result_type factor = ldexp(result_type(1), bits); result_type result = func(); diff --git a/include/boost/math/tools/stats.hpp b/include/boost/math/tools/stats.hpp index e7ea8bd2b..312f15280 100644 --- a/include/boost/math/tools/stats.hpp +++ b/include/boost/math/tools/stats.hpp @@ -10,8 +10,8 @@ #pragma once #endif -#include -#include +#include +#include #include namespace boost{ namespace math{ namespace tools{ @@ -41,7 +41,7 @@ public: T max BOOST_PREVENT_MACRO_SUBSTITUTION()const{ return m_max; } T total()const{ return m_total; } T mean()const{ return m_total / static_cast(m_count); } - boost::uintmax_t count()const{ return m_count; } + std::uintmax_t count()const{ return m_count; } T variance()const { BOOST_MATH_STD_USING @@ -77,7 +77,7 @@ public: } private: T m_min, m_max, m_total, m_squared_total; - boost::uintmax_t m_count; + std::uintmax_t m_count; }; } // namespace tools