
Paolo Carlini wrote:
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.
Dear Paolo,
I think your reading of the standard is completely correct. It seems that, in order to play safe, one really has to use the is_specialized member. Many thanks,
Roberto