[PPL-devel] [GIT] ppl/ppl(master): Avoid commented-out code.
Roberto Bagnara
bagnara at cs.unipr.it
Fri Feb 24 19:58:14 CET 2012
Module: ppl/ppl
Branch: master
Commit: 5155daa681e19cb6bede5c899860cade0ac18174
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5155daa681e19cb6bede5c899860cade0ac18174
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Fri Feb 24 19:57:30 2012 +0100
Avoid commented-out code.
Detected by ECLAIR service cmntdout.
---
src/Checked_Number.defs.hh | 21 +++++++++++----------
src/WRD_coefficient_types.defs.hh | 34 ++++++++++++++--------------------
src/checked.inlines.hh | 10 +++++-----
3 files changed, 30 insertions(+), 35 deletions(-)
diff --git a/src/Checked_Number.defs.hh b/src/Checked_Number.defs.hh
index 0bf4a5f..d7bad52 100644
--- a/src/Checked_Number.defs.hh
+++ b/src/Checked_Number.defs.hh
@@ -46,18 +46,19 @@ struct Extended_Number_Policy {
const_bool_nodef(check_sqrt_neg, false);
const_bool_nodef(has_nan, true);
const_bool_nodef(has_infinity, true);
- // Do not uncomment the following.
- // The compile time error on conversions is the expected behavior.
- // const_bool_nodef(convertible, false);
+
+ // `convertible' is intentionally not defined: the compile time
+ // error on conversions is the expected behavior.
+
const_bool_nodef(fpu_check_inexact, true);
const_bool_nodef(fpu_check_nan_result, true);
- // Do not uncomment the following.
- // The compile time error is the expected behavior.
- // static const Rounding_Dir ROUND_DEFAULT_CONSTRUCTOR = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_OPERATOR = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_FUNCTION = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_INPUT = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_OUTPUT = ROUND_UP;
+
+ // ROUND_DEFAULT_CONSTRUCTOR is intentionally not defined.
+ // ROUND_DEFAULT_OPERATOR is intentionally not defined.
+ // ROUND_DEFAULT_FUNCTION is intentionally not defined.
+ // ROUND_DEFAULT_INPUT is intentionally not defined.
+ // ROUND_DEFAULT_OUTPUT is intentionally not defined.
+
static void handle_result(Result r);
};
diff --git a/src/WRD_coefficient_types.defs.hh b/src/WRD_coefficient_types.defs.hh
index 52df272..7c1e23e 100644
--- a/src/WRD_coefficient_types.defs.hh
+++ b/src/WRD_coefficient_types.defs.hh
@@ -65,9 +65,8 @@ struct WRD_Extended_Number_Policy {
//! Handle infinity special values.
const_bool_nodef(has_infinity, true);
- // Do not uncomment the following.
- // The compile time error on conversions is the expected behavior.
- // const_bool_nodef(convertible, false);
+ // `convertible' is intentionally not defined: the compile time
+ // error on conversions is the expected behavior.
//! Honor requests to check for FPU inexact results.
const_bool_nodef(fpu_check_inexact, true);
@@ -75,13 +74,11 @@ struct WRD_Extended_Number_Policy {
//! Do not make extra checks to detect FPU NaN results.
const_bool_nodef(fpu_check_nan_result, false);
- // Do not uncomment the following.
- // The compile time error is the expected behavior.
- // static const Rounding_Dir ROUND_DEFAULT_CONSTRUCTOR = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_OPERATOR = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_FUNCTION = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_INPUT = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_OUTPUT = ROUND_UP;
+ // ROUND_DEFAULT_CONSTRUCTOR is intentionally not defined.
+ // ROUND_DEFAULT_OPERATOR is intentionally not defined.
+ // ROUND_DEFAULT_FUNCTION is intentionally not defined.
+ // ROUND_DEFAULT_INPUT is intentionally not defined.
+ // ROUND_DEFAULT_OUTPUT is intentionally not defined.
/*! \brief
Handles \p r: called by all constructors, operators and functions that
@@ -127,9 +124,8 @@ struct Debug_WRD_Extended_Number_Policy {
//! Handle infinity special values.
const_bool_nodef(has_infinity, true);
- // Do not uncomment the following.
- // The compile time error on conversions is the expected behavior.
- // const_bool_nodef(convertible, false);
+ // `convertible' is intentionally not defined: the compile time
+ // error on conversions is the expected behavior.
//! Honor requests to check for FPU inexact results.
const_bool_nodef(fpu_check_inexact, true);
@@ -137,13 +133,11 @@ struct Debug_WRD_Extended_Number_Policy {
//! Make extra checks to detect FPU NaN results.
const_bool_nodef(fpu_check_nan_result, true);
- // Do not uncomment the following.
- // The compile time error is the expected behavior.
- // static const Rounding_Dir ROUND_DEFAULT_CONSTRUCTOR = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_OPERATOR = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_FUNCTION = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_INPUT = ROUND_UP;
- // static const Rounding_Dir ROUND_DEFAULT_OUTPUT = ROUND_UP;
+ // ROUND_DEFAULT_CONSTRUCTOR is intentionally not defined.
+ // ROUND_DEFAULT_OPERATOR is intentionally not defined.
+ // ROUND_DEFAULT_FUNCTION is intentionally not defined.
+ // ROUND_DEFAULT_INPUT is intentionally not defined.
+ // ROUND_DEFAULT_OUTPUT is intentionally not defined.
/*! \brief
Handles \p r: called by all constructors, operators and functions that
diff --git a/src/checked.inlines.hh b/src/checked.inlines.hh
index bf91e75..44eea27 100644
--- a/src/checked.inlines.hh
+++ b/src/checked.inlines.hh
@@ -222,27 +222,27 @@ PPL_SAFE_CONVERSION(mpz_class, signed char);
PPL_SAFE_CONVERSION(mpz_class, signed short);
PPL_SAFE_CONVERSION(mpz_class, signed int);
PPL_SAFE_CONVERSION(mpz_class, signed long);
-//PPL_SAFE_CONVERSION(mpz_class, signed long long);
+// GMP's API does not support signed long long.
PPL_SAFE_CONVERSION(mpz_class, unsigned char);
PPL_SAFE_CONVERSION(mpz_class, unsigned short);
PPL_SAFE_CONVERSION(mpz_class, unsigned int);
PPL_SAFE_CONVERSION(mpz_class, unsigned long);
-//PPL_SAFE_CONVERSION(mpz_class, unsigned long long);
+// GMP's API does not support unsigned long long.
PPL_SAFE_CONVERSION(mpq_class, char);
PPL_SAFE_CONVERSION(mpq_class, signed char);
PPL_SAFE_CONVERSION(mpq_class, signed short);
PPL_SAFE_CONVERSION(mpq_class, signed int);
PPL_SAFE_CONVERSION(mpq_class, signed long);
-//PPL_SAFE_CONVERSION(mpq_class, signed long long);
+// GMP's API does not support signed long long.
PPL_SAFE_CONVERSION(mpq_class, unsigned char);
PPL_SAFE_CONVERSION(mpq_class, unsigned short);
PPL_SAFE_CONVERSION(mpq_class, unsigned int);
PPL_SAFE_CONVERSION(mpq_class, unsigned long);
-//PPL_SAFE_CONVERSION(mpq_class, unsigned long long);
+// GMP's API does not support unsigned long long.
PPL_SAFE_CONVERSION(mpq_class, float);
PPL_SAFE_CONVERSION(mpq_class, double);
-//PPL_SAFE_CONVERSION(mpq_class, long double);
+// GMP's API does not support long double.
#undef PPL_SAFE_CONVERSION
More information about the PPL-devel
mailing list