3 ms·
> 1 - knowing this is 100% useless information, in reality I have a compiler to tell me that. A clever compiler might tell you that adding std::move will make
by gpderetta 8y ago
> 1 - knowing this is 100% useless information, in reality I have a compiler to tell me that.
A clever compiler might tell you that adding std::move will make the code compile. But if you do not understand what std::move does it will lead to more bugs as you might not expect the ptr to suddenly be empty in main.
- Const-me 8y agoI agree with what you're saying but they aren't asking what it does. They're asking "What happens when?" giving code that doesn't compile. Nothing happens.