[cfe-dev] deprecating copy construction and assignment

David Blaikie dblaikie at gmail.com
Sun Apr 1 19:46:46 PDT 2012


Actually, no (if I understand your question correctly) - a deleted move
constructor doesn't cause copy construction to be used in the same context
- it causes move construction attempts to produce compilation errors. Think
of deletion as a nicer form of what people use to disable copy construction
in c++98 by declaring but not defining the copy constructor
------------------------------
From: Sean Silva
Sent: 4/1/2012 7:36 PM
To: Richard Smith
Cc: cfe-dev at cs.uiuc.edu Developers
Subject: Re: [cfe-dev] deprecating copy construction and assignment

So even though the latter one is move-constructible, it does it through the
copy ctor, so it doesn't get the performance benefit of the move then,
right?

On Thu, Mar 29, 2012 at 7:00 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> The result is that explicitly defaulting the move operations gives you
>> defaulted move operations,
>>
>
> ... gives you *deleted* move operations ... :)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120401/0e1f3733/attachment.html>


More information about the cfe-dev mailing list