|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-06-01 15:46:58
Topher Cooper <topher_at_[hidden]> writes:
> I don't think anyone really objects to unsigned_integer, though some
> question its utility.
I do object. IMO it adds complexity for little or no benefit, and
complexity is a big problem. Also, in my opinion, the job of limiting
the allowed range of values for a type should be provided by a wrapper
template, so that other types can benefit. For example:
typedef range_checked<
infinite_precision_integer
, non_negative // a predicate
> infinite_precision_unsigned_integer;
typedef range_checked<
double
, abs_less_or_equal_to_1
> result_of_sin_or_cos;
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk