Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-02-02 17:12:07

On 02/01/2005 12:34 PM, Larry Evans wrote:
> is reached by defining specialziations of:
> max_value<T>::value
> min_value<T>::value
> just as, at present, in largest_int, there are specializations
> for integral_rank<T> for each T that is an integral type.
Or maybe integral_rank<T> can be modified similar to:
template<> struct integral_rank<long> : int_<10>
     static long const max_value=LONG_MAX;
     static long const min_value=LONG_MIN;

where LONG_MAX and LONG_MIN are, I guess, macros defined in
<climits.hpp>. I guess this is where LONG_MAX in:


comes from.

OTOH, it seems this is more of a type trait, and maybe such a definition
belongs in boost/type_traits.

Any thoughts? I'd like to know where's the best place since I currently
have a use for it to replace the enum_size in:

Boost list run by bdawes at, gregod at, cpdaniel at, john at