diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index a419d96cc..5ebd7cc97 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -416,6 +416,16 @@ inline long double real_cast(concepts::real #endif +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) +// +// For some strange reason ADL sometimes fails to find the +// correct overloads, unless we bring these declarations into scope: +// +using concepts::itrunc; +using concepts::iround; + +#endif + } // namespace math } // namespace boost diff --git a/include/boost/math/concepts/std_real_concept.hpp b/include/boost/math/concepts/std_real_concept.hpp index 00391c644..6713429c4 100644 --- a/include/boost/math/concepts/std_real_concept.hpp +++ b/include/boost/math/concepts/std_real_concept.hpp @@ -353,6 +353,15 @@ inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_ } // namespace tools +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) +using concepts::itrunc; +using concepts::ltrunc; +using concepts::lltrunc; +using concepts::iround; +using concepts::lround; +using concepts::llround; +#endif + } // namespace math } // namespace boost diff --git a/include/boost/math/special_functions/detail/t_distribution_inv.hpp b/include/boost/math/special_functions/detail/t_distribution_inv.hpp index 5b965add6..5846b071f 100644 --- a/include/boost/math/special_functions/detail/t_distribution_inv.hpp +++ b/include/boost/math/special_functions/detail/t_distribution_inv.hpp @@ -13,6 +13,7 @@ #include #include +#include namespace boost{ namespace math{ namespace detail{ diff --git a/test/compile_test/instantiate.hpp b/test/compile_test/instantiate.hpp index 48cba9afc..204690514 100644 --- a/test/compile_test/instantiate.hpp +++ b/test/compile_test/instantiate.hpp @@ -16,6 +16,8 @@ #include #include +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM + typedef boost::math::policies::policy<> test_policy; namespace test{ @@ -29,6 +31,7 @@ namespace dist_test{ BOOST_MATH_DECLARE_DISTRIBUTIONS(double, test_policy) } +#endif namespace boost{ namespace math{ // @@ -79,7 +82,7 @@ void instantiate(RealType) function_requires > >(); function_requires > >(); function_requires > >(); - +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM function_requires > >(); function_requires > >(); function_requires > >(); @@ -128,7 +131,7 @@ void instantiate(RealType) function_requires >(); function_requires >(); function_requires >(); - +#endif int i; RealType v1(0.5), v2(0.5), v3(0.5); boost::math::tgamma(v1); @@ -246,6 +249,7 @@ void instantiate(RealType) boost::math::modf(v1, &ll); #endif boost::math::pow<2>(v1); +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM // // All over again, with a policy this time: // @@ -483,6 +487,7 @@ void instantiate(RealType) test::modf(v1, &ll); #endif test::pow<2>(v1); +#endif } template @@ -490,7 +495,7 @@ void instantiate_mixed(RealType) { using namespace boost; using namespace boost::math; - +#ifndef BOOST_MATH_INSTANTIATE_MINIMUM int i = 1; long l = 1; short s = 1; @@ -839,6 +844,7 @@ void instantiate_mixed(RealType) test::sph_bessel(i, 1); test::sph_neumann(i, lr); test::sph_neumann(i, i); +#endif } diff --git a/vc71_fix/instantiate_all.cpp b/vc71_fix/instantiate_all.cpp index 450ca188e..0a7357ff5 100644 --- a/vc71_fix/instantiate_all.cpp +++ b/vc71_fix/instantiate_all.cpp @@ -14,8 +14,10 @@ // as that would lead to recursive project dependencies... // -#include "../test/compile_test/instantiate.hpp" +#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false +#define BOOST_MATH_INSTANTIATE_MINIMUM #include +#include "../test/compile_test/instantiate.hpp" void some_proc() {