
15 Mar
2005
15 Mar
'05
4:58 p.m.
Gennadiy Rozental wrote:
If I try to print C literal this function is instantiated with char [N]. And if fails to instantiate std::numeric_limits<char [N]>.
Shouldn't numeric_limits work for any type?
No. "Specializations shall be provided for each fundamental type, both floating point and integer, including bool." "Non-fundamental standard types, such as complex<T> (26.2.2), shall not have specializations." Since numeric_limits is not specialized for arrays, the primary template is used, which is ill-formed.