[GIT] ppl/ppl(bounded_arithmetic): Got rid of Checked_Number_Default_Policy .
 
            Module: ppl/ppl Branch: bounded_arithmetic Commit: bfc05d94ff20f86579e31c2c87efe6c4ae659308 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=bfc05d94ff20f...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Wed May 13 20:29:09 2009 +0200
Got rid of Checked_Number_Default_Policy.
---
src/Checked_Number.defs.hh | 25 ------------------------- src/Checked_Number.inlines.hh | 6 ------ src/Checked_Number.types.hh | 3 +-- 3 files changed, 1 insertions(+), 33 deletions(-)
diff --git a/src/Checked_Number.defs.hh b/src/Checked_Number.defs.hh index df23841..d363c65 100644 --- a/src/Checked_Number.defs.hh +++ b/src/Checked_Number.defs.hh @@ -34,31 +34,6 @@ namespace Parma_Polyhedra_Library { #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS /*! \ingroup PPL_CXX_interface */ #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS) -struct Checked_Number_Default_Policy { - const_bool_nodef(check_overflow, true); - const_bool_nodef(check_inf_add_inf, false); - const_bool_nodef(check_inf_sub_inf, false); - const_bool_nodef(check_inf_mul_zero, false); - const_bool_nodef(check_div_zero, false); - const_bool_nodef(check_inf_div_inf, false); - const_bool_nodef(check_inf_mod, false); - const_bool_nodef(check_sqrt_neg, false); - const_bool_nodef(has_nan, false); - const_bool_nodef(has_infinity, false); - const_bool_nodef(convertible, true); - const_bool_nodef(fpu_check_inexact, true); - const_bool_nodef(fpu_check_nan_result, true); - static const Rounding_Dir ROUND_DEFAULT_CONSTRUCTOR = ROUND_NATIVE; - static const Rounding_Dir ROUND_DEFAULT_OPERATOR = ROUND_NATIVE; - static const Rounding_Dir ROUND_DEFAULT_FUNCTION = ROUND_NATIVE; - static const Rounding_Dir ROUND_DEFAULT_INPUT = ROUND_NATIVE; - static const Rounding_Dir ROUND_DEFAULT_OUTPUT = ROUND_NATIVE; - static void handle_result(Result r); -}; - -#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS -/*! \ingroup PPL_CXX_interface */ -#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS) struct Extended_Number_Policy { const_bool_nodef(check_overflow, true); const_bool_nodef(check_inf_add_inf, false); diff --git a/src/Checked_Number.inlines.hh b/src/Checked_Number.inlines.hh index 197beb0..1d5aace 100644 --- a/src/Checked_Number.inlines.hh +++ b/src/Checked_Number.inlines.hh @@ -66,12 +66,6 @@ Checked_Number_Transparent_Policy<T>::handle_result(Result) { }
inline void -Checked_Number_Default_Policy::handle_result(Result r) { - if (result_overflow(r) || result_class(r) == VC_NAN) - throw_result_exception(r); -} - -inline void Extended_Number_Policy::handle_result(Result r) { if (result_class(r) == VC_NAN) throw_result_exception(r); diff --git a/src/Checked_Number.types.hh b/src/Checked_Number.types.hh index b6acba5..c4c4559 100644 --- a/src/Checked_Number.types.hh +++ b/src/Checked_Number.types.hh @@ -16,10 +16,9 @@ PURPOSE. */
namespace Parma_Polyhedra_Library {
-struct Checked_Number_Default_Policy; struct Extended_Number_Policy;
-template <typename T, typename Policy = Checked_Number_Default_Policy> +template <typename T, typename Policy> class Checked_Number;
} // namespace Parma_Polyhedra_Library
participants (1)
- 
                 Roberto Bagnara Roberto Bagnara