Boost logo

Boost :

Subject: Re: [boost] a safe integer library
From: Robert Ramey (ramey_at_[hidden])
Date: 2016-01-12 14:30:37


On 1/12/16 11:05 AM, Robert Ramey wrote:

Oops

> x = y
>
> is checked at compile time that the range of x is compared to the range
> of y.
>
> if the range of x includes that of y - there is no runtime checking as
> is unnecessary.
>
> if the the ranges of x and y do not intersect - there's a static assert.
>

otherwise, there is a check at runtime which guarantees that y is in the
specified legal range for x

Robert Ramey


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