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:
[snip]
> 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:

   boost/mpl/aux_/preprocessed/plain/vector_c.hpp

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:

http://cvs.sourceforge.net/viewcvs.py/boost-sandbox/boost-sandbox/boost/indexed_types/enum_size.hpp?rev=1.1&view=auto


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