Boost logo

Boost :

From: Matt Doyle (mdoyle_at_[hidden])
Date: 2005-09-16 15:45:08


> From: "michael toksvig" <michaeltoksvig_at_[hidden]>
> > > "Rob Stewart" <stewart_at_[hidden]> wrote in message
> > >
> news:200509161700.j8GH0nHo017101_at_shannonhoon.balstatdev.susq.com...
> > > It's surprising for the result type to have a less restrictive
> > > range than the inputs.
> >
> > add two numbers in the 1-10 range, and you invariably end
> up with a number
> > in the 2-20 range
>
> Yep. However, when considering constrained ranges, I find it
> surprising that the result would be *permitted* to exceed the
> constraints of the inputs.
>
> IOW, I'd have expect the result to be constrained to be 2-10.
> Yes, that means that combinations exist that violate that
> constraint, but at least it wouldn't surprise me.
>
<snip>
YES, that's exactly the point I was trying to make earlier - you just did a much better job of explaining it :)
IMO, the constraints and/or policies set forth when the type was defined must apply for the lifetime of the type.

Matt

Scanned by Fortigate {X3BTB534}


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