
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. Best regards, Robert