$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Rob Stewart (stewart_at_[hidden])
Date: 2005-09-15 16:32:48
From: "michael toksvig" <michaeltoksvig_at_[hidden]>
>
> also, the type of a binary operator's return value should combine the
> intervals of the operands
>
> e.g. given:
> CheckedIntegralValue<int, -10, 100> a;
> CheckedIntegralValue<int, -100, 20> b;
>
> then the type of a+b should be CheckedIntegralValue<int, -110, 120>
>
> and given:
> CheckedIntegralValue<int, -110, 120> sum;
>
> then sum = a+b, sum = a, and sum = b should all compile just fine
>
> conversely, a = sum, b = sum, and a = b should not
If you think that's appropriate, then there needs to be a
range-checked, converting constructor from values with differing
minima and maxima.
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;