[cfe-dev] [PATCH] Add APValue::swap
Chris Lattner
clattner at apple.com
Thu Mar 8 14:46:17 PST 2012
On Mar 8, 2012, at 10:45 AM, Howard Hinnant wrote:
> On Mar 8, 2012, at 1:39 PM, Daniel Dunbar wrote:
>
>> I wanted to make the copy assignment operator private to encourage
>> callers to see if they could use swap instead.
>>
>> My motivation here seems confused though, per subsequent discussion.
>
> I think you're just ahead of your time. Sounds like you're trying to encourage C++11 move assignment. :-) (which I think would be a very good idea, but requires commitment to using C++11)
I think that it would be completely reasonable (maybe even, "insanely great"?) to put move constructors and assignment operators into llvm & clang if they help performance and are *optional* and ifdef'd on compiler support.
That would just mean that people with c++'11 compilers can get better build times, but that we remain compatible with older compilers.
-Chris
More information about the cfe-dev
mailing list