|
Boost : |
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-08-06 10:59:56
Beman Dawes wrote:
> For many uses, these are sufficient. But min() and max() are
> problems because they are not constant expressions (5.19) and some
> uses require constant expressions.
Like C array declarations, cases in switch
and integral template parameters
> Valentin worked around this by providing an extended_numeric_limits<>
> class derived from numeric_limits<>, which for integers added:
>
> static const T max_constant;
> static const T min_constant;
>
> (I have changed lots of details from Valentin's header for the sake
> of exposition.)
>
> Now the 64-bit question:
I would go as a far as 128 bits.
> Is it worthwhile for boost to supply an extended_numeric_limits<>
> class?
>
> To me, it seems more trouble that it is worth. What do others think?
Simply indispensable for my integral types library.
Trivial to define in term of <climits>.
-- Valentin Bonnard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk