Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-15 11:58:36


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk