Boost logo

Boost :

Subject: Re: [boost] [optional] Specializing optional to save space
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2015-09-27 22:57:29


On 9/27/2015 11:47 PM, David Stone wrote:
> emplace can call
> the move assignment operator after constructing a temporary, because that
> is identical to destruct + construct.

Emplace doesn't move assign. Emplace can't have temporaries. Move
assigning is not at all identical to destruct + construct. All emplace
can assume is that there exists a constructor that takes the given
arguments via direct-non-list-initialization. This is fundamental, as
emplacing allows putting into places stuff that is not even move assignable.

Regards,

-- 
Agustín K-ballo Bergé.-
http://talesofcpp.fusionfenix.com

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