Possible Duplicate:
Move constructor signature
struct X
{
X(X&); // (1)
X(X&&); // (2)
X(const X&); // (3)
X(const X&&); // (4)
};
Are there any situations where (4) will be picked in overload resolution?
Yes. One situation is when you have a function with a const return value:
const X f();
X x(f());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With