
15 Mar
2005
15 Mar
'05
6:41 p.m.
Gennadiy Rozental wrote:
P.S. BTW, does it says anywhere that primary template is required to be ill-format for array types? Could STL implementers does a better job?
It is implied by the signature of numeric_limits<T>::max: template<class T> class numeric_limits { public: static T max() throw(); // ... }; When T is an array type, this declaration is ill-formed. I'm not sure whether STL implementers are allowed to let a program that uses numeric_limits<X[N]> compile anyway, but they are certainly not required to. This probably applies to abstract classes as well.