
On 8/21/2011 5:35 PM, Nevin Liber wrote:
On 21 August 2011 05:10, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>wrote:
I understand that Boost can not rely on libraries promoting undefined behavior, but sometimes using undefined behavior can be accepted if at the end the function ensures everything is in a state that is consistent.
If you invoke undefined behavior, by definition it is impossible to ensure everything is in a consistent state afterwards. Undefined behavior really means "don't go there".
This is the accepted dogma, but having read Stepanov's paper, I think there is value to the technique. However, I might prefer a more conservative approach whereby users must opt-in to the memcpy implementation instead of making it the default. -- Eric Niebler BoostPro Computing http://www.boostpro.com