3 ms·
Note that since smart pointers showed up about the same time as the revamped “auto”, you should use std::unique_ptr<>, etc. with “new” and not need “auto” there
by makecheck 9y ago
Note that since smart pointers showed up about the same time as the revamped “auto”, you should use std::unique_ptr<>, etc. with “new” and not need “auto” there either.
- criddell 9y agoAnd make use of std::make_unique<>. auto foo = std::make_unique<Foo>(25.3, true);