There are some errors (or perhaps IBM C++-isms) in the supplied <declimits> header. A patch is below:
code
-
-
- declimits 2006-07-09 18:34:40.000000000 -0400
+ ../decNumber++/include/declimits 2007-01-30 10:28:25.541988000 -0500
@@ -22,8 +22,7 @@
namespace std {
template
- class numeric_limits<decimal::decimal32>
- : public _Num_float_base {
+ class numeric_limits<decimal::decimal32> {
public:
static const bool is_specialized = true;
static decimal::decimal32 min() throw()
@@ -40,7 +39,7 @@
static decimal::decimal32 epsilon() throw()
{ return DEC32_EPSILON; }
static decimal::decimal32 round_error() throw()
- { return decimal::decimal32(5ULL, -1); }
+ { return decimal::make_decimal32(5ULL, -1); }
static const int min_exponent = DEC32_MIN_EXP;
static const int min_exponent10 = min_exponent;
@@ -72,8 +71,7 @@
};
template
- class numeric_limits<decimal::decimal64>
- : public _Num_float_base {
+ class numeric_limits<decimal::decimal64> {
public:
static const bool is_specialized = true;
static decimal::decimal64 min() throw()
@@ -90,7 +88,7 @@
static decimal::decimal64 epsilon() throw()
{ return DEC64_EPSILON; }
static decimal::decimal64 round_error() throw()
- { return decimal::decimal64(5ULL, -1); }
+ { return decimal::make_decimal64(5ULL, -1); }
static const int min_exponent = DEC64_MIN_EXP;
static const int min_exponent10 = min_exponent;
@@ -122,8 +120,7 @@
};
template
- class numeric_limits<decimal::decimal128>
- : public _Num_float_base {
+ class numeric_limits<decimal::decimal128> {
public:
static const bool is_specialized = true;
static decimal::decimal128 min() throw()
@@ -140,7 +137,7 @@
static decimal::decimal128 epsilon() throw()
{ return DEC128_EPSILON; }
static decimal::decimal128 round_error() throw()
- { return decimal::decimal128(5ULL, -1); }
+ { return decimal::make_decimal128(5ULL, -1); }
static const int min_exponent = DEC128_MIN_EXP;
static const int min_exponent10 = min_exponent;
[/code]