[cfe-commits] r148675 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/microsoft-cxx0x.cpp

Douglas Gregor dgregor at apple.com
Tue Jan 24 10:35:34 PST 2012


On Jan 22, 2012, at 7:19 PM, Nico Weber wrote:

> Author: nico
> Date: Sun Jan 22 21:19:29 2012
> New Revision: 148675
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=148675&view=rev
> Log:
> In ms mode, a move assignment operator shouldn't mark a copy ctor as deleted.
> 
> MSVC2010's pair class has a move assignment operator but no explicit copy
> constructor, which makes it unusable without this change.
> 
> For symmetry, let move copy constructors not mark the default assignment
> operator as deleted either. Both changes match cl.exe's behavior.  Fixes
> pr11826.
> 
> Also update the standard excerpt to point to the right paragraph.


I'm not at all convinced that we should mimic this behavior of MSVC 2010. They implemented an older, pre-standard version of rvalue references. By emulating this behavior, we're prolonging the pain that goes along with having multiple, different implementations of this feature and making rvalue references ever harder than they are. 

Especially given that it looks like the next MSVC will fix their rvalue references support, per

	http://stackoverflow.com/questions/7421825/c11-features-in-visual-studio-11

I think we should revert this change (and it's MicrosoftMode follow-on) and mark the original PR as WONTFIX. 

Opinions?

	- Doug



More information about the cfe-commits mailing list