3 ms·
Re unique_ptr as a local variable: in C++98 you can use auto_ptr.
by jwilk 11y ago
Re unique_ptr as a local variable: in C++98 you can use auto_ptr.
- MereInterest 11y agoTrue, I didn't mention it, because it has its own issues. The move-on-copy semantics of auto_ptr makes it incompatible with std containers, and makes for some rather unexpected behavior.