Subject: Re: [boost] a safe integer library
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2015-12-17 16:23:20
On 17/12/2015 21:12, Robert Ramey wrote:
> On 12/16/15 11:16 PM, David Stone wrote:
>> How difficult
>> would it be to add in the ability to provide 'clamping' or 'saturation'
>> behavior? If you go below the min, set the value to the min, and if
>> you go above the max, set to the max.
> I never considered this, and from what I know about the design of the
> library, I don't think it would be practical to implement on top of what
> I have now.
FWIW, in most cases where I have range concerns (mostly squeezing ints
into smaller data types for protocol reasons), clamping is the behaviour
that I want.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk