Boost logo

Boost :

Subject: Re: [boost] [interest] underlying type library
From: Eric Niebler (eric_at_[hidden])
Date: 2011-08-22 11:23:20


(Julian, I'm having a hard time following the discussion because you're
replying to multiple people in a single email. Those of us with threaded
readers would prefer if you replied to us individually.)

On 8/22/2011 7:04 AM, Julian Gonggrijp wrote:
> Eric Niebler wrote:
>
>> [...] However, I might prefer a more
>> conservative approach whereby users must opt-in to the memcpy
>> implementation instead of making it the default.
>
> In fact I arrived at this same conclusion after I realised the bitwise
> approach was not as general as I thought.

Thought: the obvious default implementation should be to simply call
move, but this gets complicated because move operations can throw. Then
during unwinding you'll try to destruct an object that isn't in a
destructible state. You would need to find a way to address the
exception-safety issues. Perhaps the new noexcept keyword could help here.

-- 
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