This is my first experiment with C++0x rvalue references and something strange seems to be going on.
In the code sample below the factory function MakeWindow>
Isn’t it obvious? Your code returns a copy of the local temporary Window:
Window MakeWindow()
{
return Window(CreateWindow());
}
The compiler will in fact optimize this copy away (via return value optimization) – this is why your move constructor is never actually called – but for correctness a copy constructor must still be present.