As MSDN states, VS2012 does not yet implicitly declare&define move-ctors and -assignment-ops:
"Rvalue references v3.0" adds new rules to automatically generate move constructors and move assignment operators under certain conditions. However, this is not implemented in Visual C++ in Visual Studio 2012, due to time and resource constraints.
Therefore, you'll have to provide own, user-defined move-ctors and -assignment-ops (maybe = default
suffices).
That said, and as Ali pointed out, x = f()
should indeed call the move-assignment-op of MyClass
, invoking the move-assignment-op of vector
.