|
Boost-Commit : |
From: johnmaddock_at_[hidden]
Date: 2007-06-17 12:31:04
Author: johnmaddock
Date: 2007-06-17 12:31:04 EDT (Sun, 17 Jun 2007)
New Revision: 7087
URL: http://svn.boost.org/trac/boost/changeset/7087
Log:
Initial policy code tests
Added:
sandbox/math_toolkit/libs/math/test/test_policy.cpp
Text files modified:
sandbox/math_toolkit/libs/math/test/Jamfile.v2 | 8 +
sandbox/math_toolkit/libs/math/test/test_error_handling.cpp | 280 ++++++++++++++-------------------------
2 files changed, 112 insertions(+), 176 deletions(-)
Modified: sandbox/math_toolkit/libs/math/test/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/test/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/test/Jamfile.v2 2007-06-17 12:31:04 EDT (Sun, 17 Jun 2007)
@@ -35,6 +35,10 @@
run test_ellint_3.cpp ;
run test_erf.cpp ;
run test_error_handling.cpp ;
+run test_new_error_handling.cpp ;
+run test_policy.cpp ;
+run test_default_policy.cpp ;
+run test_no_policy.cpp ;
run test_exponential_dist.cpp ;
run test_extreme_value.cpp ;
run test_factorials.cpp ;
@@ -154,3 +158,7 @@
+
+
+
+
Modified: sandbox/math_toolkit/libs/math/test/test_error_handling.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_error_handling.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_error_handling.cpp 2007-06-17 12:31:04 EDT (Sun, 17 Jun 2007)
@@ -1,6 +1,3 @@
-// test_error_handling.cpp
-
-// Test error handling.
// Copyright Paul A. Bristow 2006.
// Copyright John Maddock 2006.
@@ -10,80 +7,117 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-#define BOOST_MATH_THROW_ON_DOMAIN_ERROR
+//
+// Define some custom error handlers:
+//
+struct user_defined_error{};
-// Boost
-#include <boost/math/tools/error_handling.hpp> // for domain_error.
- using ::boost::math::tools::domain_error;
- using ::boost::math::tools::pole_error;
- using ::boost::math::tools::overflow_error;
- using ::boost::math::tools::underflow_error;
- using ::boost::math::tools::denorm_error;
- using ::boost::math::tools::logic_error;
-#include <boost/math/special_functions/gamma.hpp> // tgamma
- using ::boost::math::tgamma;
-#include <boost/math/special_functions/fpclassify.hpp>
- using boost::math::isnan;
-// std
-#include <iostream>
- using std::cout;
- using std::endl;
-#include <limits>
- using std::numeric_limits;
-#include <stdexcept>
- using std::exception;
+namespace boost{ namespace math{ namespace policy{
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
-#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
+template <class T>
+T user_domain_error(const char* , const char* , const T& )
+{
+ throw user_defined_error();
+}
-#include <boost/math/concepts/real_concept.hpp> // for real_concept
- using ::boost::math::concepts::real_concept;
+template <class T>
+T user_pole_error(const char* , const char* , const T& )
+{
+ throw user_defined_error();
+}
+template <class T>
+T user_overflow_error(const char* , const char* , const T& )
+{
+ throw user_defined_error();
+}
+
+template <class T>
+T user_underflow_error(const char* , const char* , const T& )
+{
+ throw user_defined_error();
+}
+
+template <class T>
+T user_denorm_error(const char* , const char* , const T& )
+{
+ throw user_defined_error();
+}
+
+template <class T>
+T user_evaluation_error(const char* , const char* , const T& )
+{
+ throw user_defined_error();
+}
+
+}}} // namespaces
+
+
+#include <boost/math/policy/policy.hpp>
+#include <boost/math/policy/error_handling.hpp>
+#include <boost/math/concepts/real_concept.hpp>
+#include <boost/test/included/test_exec_monitor.hpp> // for test_main
//
-// The macro BOOST_CHECK_THROW_MSG is the same as BOOST_CHECK_THROW
-// which is to say it verifies that the exception we expect is
-// thrown from the function under test, but it also prints the message
-// contained in the thrown exception so we can manually inspect the
-// quality of the message.
-//
-// The expanded code is:
-//
-// try
-// {
-// code;
-// }
-// catch(const std::exception& e)
-// {
-// std::cout <<
-// "Message from thrown exception was:\n " << e.what() << std::endl;
-// }
-// BOOST_CHECK_THROW(code, t);
+// Define some policies:
//
-#define BOOST_CHECK_THROW_MSG(code,t)\
- try{ code; } catch(const std::exception& e){\
- std::cout << "Message from thrown exception was:\n " << e.what() << std::endl; }\
- BOOST_CHECK_THROW(code, t);
-
-template <class FPT> // Any floating-point type FPT.
-void test_error(FPT)
-{
- cout << "Current function is " << BOOST_CURRENT_FUNCTION << endl;
-// 2 argument version now removed, so these two commented out.
-// BOOST_CHECK_THROW_MSG(domain_error<FPT>(BOOST_CURRENT_FUNCTION, 0), std::domain_error);
-// BOOST_CHECK_THROW_MSG(domain_error<FPT>(BOOST_CURRENT_FUNCTION, "Out of range argument"), std::domain_error);
- BOOST_CHECK_THROW_MSG(domain_error<FPT>(BOOST_CURRENT_FUNCTION, 0, static_cast<FPT>(3.124567890123456789012345678901L)), std::domain_error);
- BOOST_CHECK_THROW_MSG(domain_error<FPT>(BOOST_CURRENT_FUNCTION, "Out of range argument %1% in test invocation", static_cast<FPT>(3.124567890123456789012345678901L)), std::domain_error);
-// BOOST_CHECK_THROW_MSG(logic_error<FPT>(BOOST_CURRENT_FUNCTION, 0), std::logic_error);
-// BOOST_CHECK_THROW_MSG(logic_error<FPT>(BOOST_CURRENT_FUNCTION, "Internal error"), std::logic_error);
- BOOST_CHECK_THROW_MSG(logic_error<FPT>(BOOST_CURRENT_FUNCTION, 0, static_cast<FPT>(3.124567890123456789012345678901L)), std::logic_error);
- BOOST_CHECK_THROW_MSG(logic_error<FPT>(BOOST_CURRENT_FUNCTION, "Internal error, computed result was %1%, but should be in the range [0,1]", static_cast<FPT>(3.124567890123456789012345678901L)), std::logic_error);
- BOOST_CHECK_THROW_MSG(boost::math::tgamma(static_cast<FPT>(0)), std::domain_error);
- BOOST_CHECK_THROW_MSG(boost::math::tgamma(static_cast<FPT>(-10)), std::domain_error);
- BOOST_CHECK_THROW_MSG(boost::math::tgamma(static_cast<FPT>(-10123457772243.0)), std::domain_error);
+using namespace boost::math::policy;
+policy<
+ domain_error<throw_on_error>,
+ pole_error<throw_on_error>,
+ overflow_error<throw_on_error>,
+ underflow_error<throw_on_error>,
+ denorm_error<throw_on_error>,
+ evaluation_error<throw_on_error> > throw_policy;
+policy<
+ domain_error<errno_on_error>,
+ pole_error<errno_on_error>,
+ overflow_error<errno_on_error>,
+ underflow_error<errno_on_error>,
+ denorm_error<errno_on_error>,
+ evaluation_error<errno_on_error> > errno_policy;
+policy<
+ domain_error<user_error>,
+ pole_error<user_error>,
+ overflow_error<user_error>,
+ underflow_error<user_error>,
+ denorm_error<user_error>,
+ evaluation_error<user_error> > user_policy;
+policy<> default_policy;
+
+#define TEST_EXCEPTION(expression, exception)\
+ BOOST_CHECK_THROW(expression, exception);\
+ try{ expression; }catch(const exception& e){ std::cout << e.what() << std::endl; }
- cout << endl;
+template <class T>
+void test_error(T)
+{
+ const char* func = "boost::math::test_function<%1%>(%1%, %1%, %1%)";
+ const char* msg1 = "Error while handling value %1%";
+ const char* msg2 = "Error message goes here...";
+
+ TEST_EXCEPTION(boost::math::policy::raise_domain_error(func, msg1, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policy::raise_domain_error(func, 0, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policy::raise_pole_error(func, msg1, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policy::raise_pole_error(func, 0, T(0.0), throw_policy), std::domain_error);
+ TEST_EXCEPTION(boost::math::policy::raise_overflow_error<T>(func, msg2, throw_policy), std::overflow_error);
+ TEST_EXCEPTION(boost::math::policy::raise_overflow_error<T>(func, 0, throw_policy), std::overflow_error);
+ TEST_EXCEPTION(boost::math::policy::raise_underflow_error<T>(func, msg2, throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policy::raise_underflow_error<T>(func, 0, throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policy::raise_denorm_error<T>(func, msg2, T(0), throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policy::raise_denorm_error<T>(func, 0, T(0), throw_policy), std::underflow_error);
+ TEST_EXCEPTION(boost::math::policy::raise_evaluation_error(func, msg1, T(1.25), throw_policy), boost::math::evaluation_error);
+ TEST_EXCEPTION(boost::math::policy::raise_evaluation_error(func, 0, T(1.25), throw_policy), boost::math::evaluation_error);
+ //
+ // Now try user error handlers: these should all throw user_error():
+ //
+ BOOST_CHECK_THROW(boost::math::policy::raise_domain_error(func, msg1, T(0.0), user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policy::raise_pole_error(func, msg1, T(0.0), user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policy::raise_overflow_error<T>(func, msg2, user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policy::raise_underflow_error<T>(func, msg2, user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policy::raise_denorm_error<T>(func, msg2, T(0), user_policy), user_defined_error);
+ BOOST_CHECK_THROW(boost::math::policy::raise_evaluation_error(func, msg1, T(0.0), user_policy), user_defined_error);
-} // template <class FPT>void test_error(FPT)
+}
int test_main(int, char* [])
{
@@ -92,114 +126,8 @@
test_error(0.0F); // Test float.
test_error(0.0); // Test double.
test_error(0.0L); // Test long double.
- test_error(real_concept(0.0L)); // Test concepts.
+ test_error(boost::math::concepts::real_concept(0.0L)); // Test concepts.
return 0;
} // int test_main(int, char* [])
-/*
-
-Output:
-
-
------- Rebuild All started: Project: test_error_handling, Configuration: Release Win32 ------
-Deleting intermediate and output files for project 'test_error_handling', configuration 'Release|Win32'
-Compiling...
-test_error_handling.cpp
-Linking...
-Generating code
-Finished generating code
-Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\release\test_error_handling.exe"
-Running 1 test case...
-Current function is void __cdecl test_error<float>(float)
-Message from thrown exception was:
- Error in function void __cdecl test_error<float>(float): Domain Error on value 3.12456799
-Message from thrown exception was:
- Error in function void __cdecl test_error<float>(float): Out of range argument 3.12456799 in test invocation
-Message from thrown exception was:
- Error in function void __cdecl test_error<float>(float): Internal logic error, computed value was 3.12456799
-Message from thrown exception was:
- Error in function void __cdecl test_error<float>(float): Internal error, computed result was 3.12456799, but should be in the range [0,1]
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::chisqr_imp<double>(double,double): degrees of freedom argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function float __cdecl boost::math::detail::chisqr_imp<float>(float,float): chisqr argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function float __cdecl boost::math::detail::chisqr_imp<float>(float,float): degrees of freedom argument is 0, but must be > 0 !
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::gamma_imp<double,struct boost::math::lanczos::lanczos6>(double,const struct boost::math::lanczos::lanczos6 &): Evaluation of tgamma at a negative integer 0.
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::gamma_imp<double,struct boost::math::lanczos::lanczos6>(double,const struct boost::math::lanczos::lanczos6 &): Evaluation of tgamma at a negative integer -10.
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::gamma_imp<double,struct boost::math::lanczos::lanczos6>(double,const struct boost::math::lanczos::lanczos6 &): Evaluation of tgamma at a negative integer -10123458117632.
-Current function is void __cdecl test_error<double>(double)
-Message from thrown exception was:
- Error in function void __cdecl test_error<double>(double): Domain Error on value 3.1245678901234566
-Message from thrown exception was:
- Error in function void __cdecl test_error<double>(double): Out of range argument 3.1245678901234566 in test invocation
-Message from thrown exception was:
- Error in function void __cdecl test_error<double>(double): Internal logic error, computed value was 3.1245678901234566
-Message from thrown exception was:
- Error in function void __cdecl test_error<double>(double): Internal error, computed result was 3.1245678901234566, but should be in the range [0,1]
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::chisqr_imp<double>(double,double): degrees of freedom argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::chisqr_imp<double>(double,double): chisqr argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::chisqr_imp<double>(double,double): degrees of freedom argument is 0, but must be > 0 !
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::gamma_imp<double,struct boost::math::lanczos::lanczos13m53>(double,const struct boost::math::lanczos::lanczos13m53 &): Evaluation of tgamma at a negative integer 0.
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::gamma_imp<double,struct boost::math::lanczos::lanczos13m53>(double,const struct boost::math::lanczos::lanczos13m53 &): Evaluation of tgamma at a negative integer -10.
-Message from thrown exception was:
- Error in function double __cdecl boost::math::detail::gamma_imp<double,struct boost::math::lanczos::lanczos13m53>(double,const struct boost::math::lanczos::lanczos13m53 &): Evaluation of tgamma at a negative integer -10123457772243.
-Current function is void __cdecl test_error<long double>(long double)
-Message from thrown exception was:
- Error in function void __cdecl test_error<long double>(long double): Domain Error on value 3.1245678901234566
-Message from thrown exception was:
- Error in function void __cdecl test_error<long double>(long double): Out of range argument 3.1245678901234566 in test invocation
-Message from thrown exception was:
- Error in function void __cdecl test_error<long double>(long double): Internal logic error, computed value was 3.1245678901234566
-Message from thrown exception was:
- Error in function void __cdecl test_error<long double>(long double): Internal error, computed result was 3.1245678901234566, but should be in the range [0,1]
-Message from thrown exception was:
- Error in function long double __cdecl boost::math::detail::chisqr_imp<long double>(long double,long double): degrees of freedom argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function long double __cdecl boost::math::detail::chisqr_imp<long double>(long double,long double): chisqr argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function long double __cdecl boost::math::detail::chisqr_imp<long double>(long double,long double): degrees of freedom argument is 0, but must be > 0 !
-Message from thrown exception was:
- Error in function long double __cdecl boost::math::detail::gamma_imp<long double,struct boost::math::lanczos::lanczos13m53>(long double,const struct boost::math::lanczos::lanczos13m53 &): Evaluation of tgamma at a negative integer 0.
-Message from thrown exception was:
- Error in function long double __cdecl boost::math::detail::gamma_imp<long double,struct boost::math::lanczos::lanczos13m53>(long double,const struct boost::math::lanczos::lanczos13m53 &): Evaluation of tgamma at a negative integer -10.
-Message from thrown exception was:
- Error in function long double __cdecl boost::math::detail::gamma_imp<long double,struct boost::math::lanczos::lanczos13m53>(long double,const struct boost::math::lanczos::lanczos13m53 &): Evaluation of tgamma at a negative integer -10123457772243.
-Current function is void __cdecl test_error<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept)
-Message from thrown exception was:
- Error in function void __cdecl test_error<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept): Domain Error on value 3.1245678901234566
-Message from thrown exception was:
- Error in function void __cdecl test_error<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept): Out of range argument 3.1245678901234566 in test invocation
-Message from thrown exception was:
- Error in function void __cdecl test_error<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept): Internal logic error, computed value was 3.1245678901234566
-Message from thrown exception was:
- Error in function void __cdecl test_error<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept): Internal error, computed result was 3.1245678901234566, but should be in the range [0,1]
-Message from thrown exception was:
- Error in function class boost::math::concepts::real_concept __cdecl boost::math::detail::chisqr_imp<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept,class boost::math::concepts::real_concept): degrees of freedom argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function class boost::math::concepts::real_concept __cdecl boost::math::detail::chisqr_imp<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept,class boost::math::concepts::real_concept): chisqr argument is -1, but must be > 0 !
-Message from thrown exception was:
- Error in function class boost::math::concepts::real_concept __cdecl boost::math::detail::chisqr_imp<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept,class boost::math::concepts::real_concept): degrees of freedom argument is 0, but must be > 0 !
-Message from thrown exception was:
- Error in function class boost::math::concepts::real_concept __cdecl boost::math::detail::gamma_imp<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept,const struct boost::math::lanczos::undefined_lanczos &): Evaluation of tgamma at a negative integer 0.
-Message from thrown exception was:
- Error in function class boost::math::concepts::real_concept __cdecl boost::math::detail::gamma_imp<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept,const struct boost::math::lanczos::undefined_lanczos &): Evaluation of tgamma at a negative integer -10.
-Message from thrown exception was:
- Error in function class boost::math::concepts::real_concept __cdecl boost::math::detail::gamma_imp<class boost::math::concepts::real_concept>(class boost::math::concepts::real_concept,const struct boost::math::lanczos::undefined_lanczos &): Evaluation of tgamma at a negative integer -10123457772243.
-*** No errors detected
-Build Time 0:11
-Build log was saved at "file://i:\boost-06-05-03-1300\libs\math\test\Math_test\test_error_handling\Release\BuildLog.htm"
-test_error_handling - 0 error(s), 0 warning(s)
-========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
-
-
-*/
Added: sandbox/math_toolkit/libs/math/test/test_policy.cpp
==============================================================================
--- (empty file)
+++ sandbox/math_toolkit/libs/math/test/test_policy.cpp 2007-06-17 12:31:04 EDT (Sun, 17 Jun 2007)
@@ -0,0 +1,229 @@
+
+// Copyright John Maddock 2007.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/math/policy/policy.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+
+template <class P1, class P2>
+bool check_same(const P1&, const P2&)
+{
+ if(!boost::is_same<P1, P2>::value)
+ {
+ std::cout << "P1 = " << typeid(P1).name() << std::endl;
+ std::cout << "P2 = " << typeid(P2).name() << std::endl;
+ }
+ return boost::is_same<P1, P2>::value;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::math::policy;
+ using namespace boost;
+ BOOST_CHECK(is_domain_error<domain_error<ignore_error> >::value);
+ BOOST_CHECK(0 == is_domain_error<pole_error<ignore_error> >::value);
+ BOOST_CHECK(is_pole_error<pole_error<ignore_error> >::value);
+ BOOST_CHECK(0 == is_pole_error<domain_error<ignore_error> >::value);
+ BOOST_CHECK(is_digits10<digits10<ignore_error> >::value);
+ BOOST_CHECK(0 == is_digits10<digits2<ignore_error> >::value);
+
+ BOOST_CHECK((is_same<policy<>::domain_error_type, domain_error<BOOST_MATH_DOMAIN_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<>::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::denorm_error_type, denorm_error<BOOST_MATH_DENORM_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::pole_error_type, pole_error<user_error> >::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::denorm_error_type, denorm_error<BOOST_MATH_DENORM_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<pole_error<user_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::overflow_error_type, overflow_error<errno_on_error> >::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::denorm_error_type, denorm_error<BOOST_MATH_DENORM_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<overflow_error<errno_on_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::underflow_error_type, underflow_error<errno_on_error> >::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::denorm_error_type, denorm_error<BOOST_MATH_DENORM_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<underflow_error<errno_on_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::underflow_error_type, policy<>::underflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::denorm_error_type, denorm_error<errno_on_error> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<denorm_error<errno_on_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::underflow_error_type, policy<>::underflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::denorm_error_type, policy<>::denorm_error_type >::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::evaluation_error_type, evaluation_error<errno_on_error> >::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<evaluation_error<errno_on_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<digits2<20> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::underflow_error_type, policy<>::underflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::denorm_error_type, policy<>::denorm_error_type >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::evaluation_error_type, policy<>::evaluation_error_type >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::precision_type, digits2<20> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<digits2<20> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<promote_float<false> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::underflow_error_type, policy<>::underflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::denorm_error_type, policy<>::denorm_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::evaluation_error_type, policy<>::evaluation_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::precision_type, policy<>::precision_type >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::float_promote_type, promote_float<false> >::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<promote_float<false> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<promote_double<false> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::underflow_error_type, policy<>::underflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::denorm_error_type, policy<>::denorm_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::evaluation_error_type, policy<>::evaluation_error_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::precision_type, policy<>::precision_type >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::double_promote_type, promote_double<false> >::value));
+ BOOST_CHECK((is_same<policy<promote_double<false> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::domain_error_type, policy<>::domain_error_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::pole_error_type, policy<>::pole_error_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::overflow_error_type, policy<>::overflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::underflow_error_type, policy<>::underflow_error_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::denorm_error_type, policy<>::denorm_error_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::evaluation_error_type, policy<>::evaluation_error_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::precision_type, policy<>::precision_type >::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<discrete_quantile<integer_above> >::discrete_quantile_type, discrete_quantile<integer_above> >::value));
+
+ //
+ // Now try again with 2 policies:
+ //
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::overflow_error_type, overflow_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::denorm_error_type, denorm_error<BOOST_MATH_DENORM_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<domain_error<ignore_error>, overflow_error<ignore_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::denorm_error_type, denorm_error<throw_on_error> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::precision_type, policy<>::precision_type>::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::float_promote_type, policy<>::float_promote_type>::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<denorm_error<throw_on_error>, domain_error<ignore_error> >::discrete_quantile_type, policy<>::discrete_quantile_type>::value));
+
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::denorm_error_type, denorm_error<throw_on_error> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::precision_type, digits2<20> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::float_promote_type, promote_float<false> >::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::discrete_quantile_type, discrete_quantile<integer_below> >::value));
+
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::domain_error_type, domain_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::denorm_error_type, denorm_error<throw_on_error> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::precision_type, digits2<20> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::float_promote_type, promote_float<false> >::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<normalise<policy<digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> > >::type::discrete_quantile_type, discrete_quantile<integer_below> >::value));
+
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::domain_error_type, domain_error<ignore_error> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::underflow_error_type, underflow_error<BOOST_MATH_UNDERFLOW_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::denorm_error_type, denorm_error<throw_on_error> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::precision_type, digits2<20> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::float_promote_type, promote_float<false> >::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::double_promote_type, policy<>::double_promote_type>::value));
+ BOOST_CHECK((is_same<normalise<policy<>, digits2<20>, promote_float<false>, discrete_quantile<integer_below>, denorm_error<throw_on_error>, domain_error<ignore_error> >::type::discrete_quantile_type, discrete_quantile<integer_below> >::value));
+
+ BOOST_CHECK(check_same(make_policy(), policy<>()));
+ BOOST_CHECK(check_same(make_policy(denorm_error<ignore_error>()), normalise<policy<denorm_error<ignore_error> > >::type()));
+ BOOST_CHECK(check_same(make_policy(digits2<20>()), normalise<policy<digits2<20> > >::type()));
+ BOOST_CHECK(check_same(make_policy(promote_float<false>()), normalise<policy<promote_float<false> > >::type()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>()), normalise<policy<domain_error<ignore_error> > >::type()));
+ BOOST_CHECK(check_same(make_policy(pole_error<ignore_error>()), normalise<policy<pole_error<ignore_error> > >::type()));
+
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>()), policy<domain_error<ignore_error> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits10<5>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<19> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>(), promote_float<false>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10>, promote_float<false> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>(), promote_float<false>(), promote_double<false>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10>, promote_float<false>, promote_double<false> >()));
+ BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), digits2<10>(), promote_float<false>(), promote_double<false>(), discrete_quantile<integer_below>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, digits2<10>, promote_float<false>, promote_double<false>, discrete_quantile<integer_below> >()));
+
+ return 0;
+} // int test_main(int, char* [])
+
+
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