[PPL-devel] Re: Problems with std::numeric_limits

Paolo Carlini pcarlini at suse.de
Fri Jan 13 19:47:41 CET 2006


Hi Roberto,

> Is that default implementation mandated by the standard?
> If so, well... fine.

I think it is: 18.2.1.1/2. But I don't know the rationale...

>   But if it is not mandated then I think it makes
> much sense to remove it as it seems a perfect recipe for disaster.
>
> Another issue is: shouldn't, e.g., std::numeric_limits<int> and
> std::numeric_limits<const int> be completely equivalent?

I tend to agree, but I'm not sure would be conforming: see 18.2.1/2 and
/4, in particular, which says: "Non fundamental standard types, such as
complex<T>, shall not have specializations".

I don't think a cv-qualified fundamental type qualifies as a fundamental
type. According to 3.9.3, "A type mentioned in 3.9.1 and 3.9.2 is a
cv-unqualified type", where 3.9.1 is the section named "Fundamental
types" and describing all those types.

Paolo.



More information about the PPL-devel mailing list