Subject: Re: [boost] [review][constrained_value] Review of Constrained Value Library begins today
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2008-12-09 20:34:26
> From: Thorsten Ottosen
> >>> Error policy may need to modify the
> >>> constraint, so it has to be copied (the argument of
> >> change_constraint cannot be
> >>> modified).
> >> Well, yes, but that justify to copy *also* the value and the
> >> error handler?
> > I suspect yes for the value (to ensure strong exception
> guarantee), but not
> > necessarily for the error handler.
> This seems a little ad hoc to me. What are the requirements of the
> contraint? Is it unrealistic to demand that it has a no-throw swap?
You're right, I didn't think of the possibility of swapping the constraint
instead of assignment.
> > In some cases the error policy needs to access the
> constraint even if it does
> > not need to modify it. For example, the wrap policy needs
> to query the bounds to
> > perform the modulo arithmetic operations.
> I guess my concern here is that the error policy is more than just an
> error policy.
Yes, it is. It is a recoverable error policy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk