Boost logo

Boost :

Subject: Re: [boost] [interest] underlying type library
From: Eric Niebler (eric_at_[hidden])
Date: 2011-08-21 22:15:28


On 8/21/2011 5:35 PM, Nevin Liber wrote:
> On 21 August 2011 05:10, Vicente J. Botet Escriba <vicente.botet_at_[hidden]>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

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