|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-04-24 05:40:32
Author: johnmaddock
Date: 2008-04-24 05:40:31 EDT (Thu, 24 Apr 2008)
New Revision: 44748
URL: http://svn.boost.org/trac/boost/changeset/44748
Log:
Apply VC-7.1 fixes: sometimes ADL fails, and we need a using declaration in order for the correct overload to be found.
Add missing #include. to t_distribution_inv.hpp.
Suppress unnecessary instantiations in instantiate_all.cpp.
Text files modified:
trunk/boost/math/concepts/real_concept.hpp | 10 ++++++++++
trunk/boost/math/concepts/std_real_concept.hpp | 9 +++++++++
trunk/boost/math/special_functions/detail/t_distribution_inv.hpp | 1 +
trunk/libs/math/test/compile_test/instantiate.hpp | 12 +++++++++---
trunk/libs/math/vc71_fix/instantiate_all.cpp | 4 +++-
5 files changed, 32 insertions(+), 4 deletions(-)
Modified: trunk/boost/math/concepts/real_concept.hpp
==============================================================================
--- trunk/boost/math/concepts/real_concept.hpp (original)
+++ trunk/boost/math/concepts/real_concept.hpp 2008-04-24 05:40:31 EDT (Thu, 24 Apr 2008)
@@ -416,6 +416,16 @@
#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
Modified: trunk/boost/math/concepts/std_real_concept.hpp
==============================================================================
--- trunk/boost/math/concepts/std_real_concept.hpp (original)
+++ trunk/boost/math/concepts/std_real_concept.hpp 2008-04-24 05:40:31 EDT (Thu, 24 Apr 2008)
@@ -353,6 +353,15 @@
} // 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
Modified: trunk/boost/math/special_functions/detail/t_distribution_inv.hpp
==============================================================================
--- trunk/boost/math/special_functions/detail/t_distribution_inv.hpp (original)
+++ trunk/boost/math/special_functions/detail/t_distribution_inv.hpp 2008-04-24 05:40:31 EDT (Thu, 24 Apr 2008)
@@ -13,6 +13,7 @@
#include <boost/math/special_functions/cbrt.hpp>
#include <boost/math/special_functions/round.hpp>
+#include <boost/math/special_functions/trunc.hpp>
namespace boost{ namespace math{ namespace detail{
Modified: trunk/libs/math/test/compile_test/instantiate.hpp
==============================================================================
--- trunk/libs/math/test/compile_test/instantiate.hpp (original)
+++ trunk/libs/math/test/compile_test/instantiate.hpp 2008-04-24 05:40:31 EDT (Thu, 24 Apr 2008)
@@ -16,6 +16,8 @@
#include <boost/math/special_functions.hpp>
#include <boost/math/concepts/distributions.hpp>
+#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
+
typedef boost::math::policies::policy<> test_policy;
namespace test{
@@ -29,6 +31,7 @@
BOOST_MATH_DECLARE_DISTRIBUTIONS(double, test_policy)
}
+#endif
namespace boost{ namespace math{
//
@@ -79,7 +82,7 @@
function_requires<DistributionConcept<non_central_beta_distribution<RealType> > >();
function_requires<DistributionConcept<non_central_f_distribution<RealType> > >();
function_requires<DistributionConcept<non_central_t_distribution<RealType> > >();
-
+#ifndef BOOST_MATH_INSTANTIATE_MINIMUM
function_requires<DistributionConcept<bernoulli_distribution<RealType, test_policy> > >();
function_requires<DistributionConcept<beta_distribution<RealType, test_policy> > >();
function_requires<DistributionConcept<binomial_distribution<RealType, test_policy> > >();
@@ -128,7 +131,7 @@
function_requires<DistributionConcept<dist_test::non_central_beta > >();
function_requires<DistributionConcept<dist_test::non_central_f > >();
function_requires<DistributionConcept<dist_test::non_central_t > >();
-
+#endif
int i;
RealType v1(0.5), v2(0.5), v3(0.5);
boost::math::tgamma(v1);
@@ -246,6 +249,7 @@
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 @@
test::modf(v1, &ll);
#endif
test::pow<2>(v1);
+#endif
}
template <class RealType>
@@ -490,7 +495,7 @@
{
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 @@
test::sph_bessel(i, 1);
test::sph_neumann(i, lr);
test::sph_neumann(i, i);
+#endif
}
Modified: trunk/libs/math/vc71_fix/instantiate_all.cpp
==============================================================================
--- trunk/libs/math/vc71_fix/instantiate_all.cpp (original)
+++ trunk/libs/math/vc71_fix/instantiate_all.cpp 2008-04-24 05:40:31 EDT (Thu, 24 Apr 2008)
@@ -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 <boost/math/concepts/real_concept.hpp>
+#include "../test/compile_test/instantiate.hpp"
void some_proc()
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk