|
Boost-Commit : |
From: pbristow_at_[hidden]
Date: 2007-10-23 14:54:40
Author: pbristow
Date: 2007-10-23 14:54:39 EDT (Tue, 23 Oct 2007)
New Revision: 40369
URL: http://svn.boost.org/trac/boost/changeset/40369
Log:
Removed obselete reference to parameter arity
Text files modified:
sandbox/math_toolkit/boost/math/policies/policy.hpp | 86 ++++++++++++++++++++++-----------------
1 files changed, 48 insertions(+), 38 deletions(-)
Modified: sandbox/math_toolkit/boost/math/policies/policy.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policies/policy.hpp (original)
+++ sandbox/math_toolkit/boost/math/policies/policy.hpp 2007-10-23 14:54:39 EDT (Tue, 23 Oct 2007)
@@ -6,7 +6,17 @@
#ifndef BOOST_MATH_POLICY_HPP
#define BOOST_MATH_POLICY_HPP
-#define BOOST_PARAMETER_MAX_ARITY 15
+#if defined (BOOST_MSVC)
+# pragma warning (push)
+# pragma warning (disable: 4005) // 'BOOST_PARAMETER_MAX_ARITY' : macro redefinition
+#endif
+
+// #define BOOST_PARAMETER_MAX_ARITY 15
+// Not now needed at all.
+
+#if defined (BOOST_MSVC)
+# pragma warning (pop)
+#endif
#include <boost/mpl/list.hpp>
#include <boost/mpl/contains.hpp>
@@ -30,7 +40,7 @@
#include <stddef.h>
#include <math.h>
-namespace boost{ namespace math{
+namespace boost{ namespace math{
namespace tools{
@@ -276,7 +286,7 @@
char test_is_default_arg(const default_policy*);
template <class T>
-struct is_valid_policy_imp
+struct is_valid_policy_imp
{
BOOST_STATIC_CONSTANT(bool, value = sizeof(test_is_valid_arg(static_cast<T*>(0))) == 1);
};
@@ -287,13 +297,13 @@
BOOST_STATIC_CONSTANT(bool, value = sizeof(test_is_default_arg(static_cast<T*>(0))) == 1);
};
-template <class T> struct is_valid_policy
-: public mpl::bool_<
+template <class T> struct is_valid_policy
+: public mpl::bool_<
::boost::math::policies::detail::is_valid_policy_imp<T>::value>
{};
-template <class T> struct is_default_policy
-: public mpl::bool_<
+template <class T> struct is_default_policy
+: public mpl::bool_<
::boost::math::policies::detail::is_default_policy_imp<T>::value>
{
template <class U>
@@ -356,8 +366,8 @@
// Now define the policy type with enough arguments to handle all
// the policies:
//
-template <class A1 = default_policy,
- class A2 = default_policy,
+template <class A1 = default_policy,
+ class A2 = default_policy,
class A3 = default_policy,
class A4 = default_policy,
class A5 = default_policy,
@@ -478,9 +488,9 @@
typedef max_root_iterations<> max_root_iterations_type;
};
-template <class Policy,
- class A1 = default_policy,
- class A2 = default_policy,
+template <class Policy,
+ class A1 = default_policy,
+ class A2 = default_policy,
class A3 = default_policy,
class A4 = default_policy,
class A5 = default_policy,
@@ -571,9 +581,9 @@
// Full specialisation to speed up compilation of the common case:
//
template <>
-struct normalise<policy<>,
- promote_float<false>,
- promote_double<false>,
+struct normalise<policy<>,
+ promote_float<false>,
+ promote_double<false>,
discrete_quantile<>,
assert_undefined<>,
default_policy,
@@ -592,72 +602,72 @@
template <class A1>
inline typename normalise<policy<>, A1>::type make_policy(const A1&)
-{
+{
typedef typename normalise<policy<>, A1>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2>
inline typename normalise<policy<>, A1, A2>::type make_policy(const A1&, const A2&)
-{
+{
typedef typename normalise<policy<>, A1, A2>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3>
inline typename normalise<policy<>, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4>
inline typename normalise<policy<>, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4, class A5>
inline typename normalise<policy<>, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4, A5>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4, class A5, class A6>
inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4, class A5, class A6, class A7>
inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type;
- return result_type();
+ return result_type();
}
template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&)
-{
+{
typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type;
- return result_type();
+ return result_type();
}
//
@@ -739,7 +749,7 @@
// Possibly unknown precision:
precision_type,
typename mpl::if_c<
- ((::std::numeric_limits<Real>::digits <= precision_type::value)
+ ((::std::numeric_limits<Real>::digits <= precision_type::value)
|| (Policy::precision_type::value <= 0)),
// Default case, full precision for RealType:
digits2< ::std::numeric_limits<Real>::digits>,
@@ -813,8 +823,8 @@
namespace detail{
-template <class A1,
- class A2,
+template <class A1,
+ class A2,
class A3,
class A4,
class A5,
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