|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2005-09-18 14:01:39
On 9/15/05 3:05 PM, "Andrey Semashev" <andysem_at_[hidden]> wrote:
[SNIP previous post]
> Just a small proposal. It would be nice if CheckedIntegralValue would chose
> the actual type of value itself. For example, for range -10 .. 10 it would
> use signed char, for -1000 .. 1000 signed int, and for 0 .. 300 unsigned
> int. Of course, its type detecting logic should be overrideable. I think, it
> would look something like:
>
> template< signed long long min, signed long long max, typename T = typename
> auto_detected< min, max >::type, typename BoundingPolicyT =
> throw_on_overflow >
> struct CheckedIntegralValue;
I don't think the double-long types are guaranteed to be usable as
value-based template parameters, since they're not officially in C++ (yet).
That's why I didn't use them in Boost.CRC. (That was several years ago, so
maybe that changed. Also, someone else told me that, I never checked it
myself.)
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk