libstdc++/5045 (take4) (was: Re: [PATCH] Fix libstdc++/5045 (take3))
Paolo Carlini
pcarlini@unitus.it
Tue Dec 11 12:05:00 GMT 2001
By the way,
this last change proposed by Ross, is in accord with the proposed resolution of C++ Standard Library Defect
Report 184.
Cheers,
Paolo.
/////////////////////////
Proposed resolution:
Append to the end of 18.2.1.5 [lib.numeric.special]:
The specialization for bool shall be provided as follows:
namespace std {
template<> class numeric_limits<bool> {
public:
static const bool is_specialized = true;
static bool min() throw() { return false; }
static bool max() throw() { return true; }
static const int digits = 1;
static const int digits10 = 0; <==========
static const bool is_signed = false;
static const bool is_integer = true;
static const bool is_exact = true;
static const int radix = 2;
static bool epsilon() throw() { return 0; }
static bool round_error() throw() { return 0; }
static const int min_exponent = 0;
static const int min_exponent10 = 0;
static const int max_exponent = 0;
static const int max_exponent10 = 0;
static const bool has_infinity = false;
static const bool has_quiet_NaN = false;
static const bool has_signaling_NaN = false;
static const float_denorm_style has_denorm = denorm_absent;
static const bool has_denorm_loss = false;
static bool infinity() throw() { return 0; }
static bool quiet_NaN() throw() { return 0; }
static bool signaling_NaN() throw() { return 0; }
static bool denorm_min() throw() { return 0; }
static const bool is_iec559 = false;
static const bool is_bounded = true;
static const bool is_modulo = false;
static const bool traps = false;
static const bool tinyness_before = false;
static const float_round_style round_style = round_toward_zero;
};
}
More information about the Libstdc++
mailing list