From 2c0eee7cd002ae01f7f20f78a8f2c159f1fcb429 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 13 Feb 2014 16:57:45 +0000 Subject: [PATCH] Quash some VC12 warnings. --- include/boost/math/distributions/chi_squared.hpp | 9 +++++++++ .../distributions/detail/inv_discrete_quantile.hpp | 10 ++++++++++ include/boost/math/distributions/normal.hpp | 9 +++++++++ include/boost/math/special_functions/owens_t.hpp | 9 +++++++++ 4 files changed, 37 insertions(+) diff --git a/include/boost/math/distributions/chi_squared.hpp b/include/boost/math/distributions/chi_squared.hpp index 51b80de52..071c7756f 100644 --- a/include/boost/math/distributions/chi_squared.hpp +++ b/include/boost/math/distributions/chi_squared.hpp @@ -55,6 +55,11 @@ private: typedef chi_squared_distribution chi_squared; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) +#endif + template inline const std::pair range(const chi_squared_distribution& /*dist*/) { // Range of permissible values for random variable x. @@ -69,6 +74,10 @@ inline const std::pair range(const chi_squared_distribution< } } +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + template inline const std::pair support(const chi_squared_distribution& /*dist*/) { // Range of supported values for random variable x. diff --git a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp index 1684254ab..cb7234e6e 100644 --- a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +++ b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp @@ -315,6 +315,12 @@ inline typename Dist::value_type round_to_floor(const Dist& d, typename Dist::va return result; } + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) +#endif + template inline typename Dist::value_type round_to_ceil(const Dist& d, typename Dist::value_type result, typename Dist::value_type p, bool c) { @@ -343,6 +349,10 @@ inline typename Dist::value_type round_to_ceil(const Dist& d, typename Dist::val return result; } + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif // // Now finally are the public API functions. // There is one overload for each policy, diff --git a/include/boost/math/distributions/normal.hpp b/include/boost/math/distributions/normal.hpp index 73039679f..a250a6e58 100644 --- a/include/boost/math/distributions/normal.hpp +++ b/include/boost/math/distributions/normal.hpp @@ -71,6 +71,11 @@ private: typedef normal_distribution normal; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) +#endif + template inline const std::pair range(const normal_distribution& /*dist*/) { // Range of permissible values for random variable x. @@ -100,6 +105,10 @@ inline const std::pair support(const normal_distribution inline RealType pdf(const normal_distribution& dist, const RealType& x) { diff --git a/include/boost/math/special_functions/owens_t.hpp b/include/boost/math/special_functions/owens_t.hpp index 9f39e5c56..096cb298c 100644 --- a/include/boost/math/special_functions/owens_t.hpp +++ b/include/boost/math/special_functions/owens_t.hpp @@ -26,6 +26,11 @@ #include +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) +#endif + namespace boost { namespace math @@ -1057,5 +1062,9 @@ namespace boost } // namespace math } // namespace boost +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + #endif // EOF