Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
makecheck
· 9y ago · 0 comments
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.
Comments
[–]
criddell
9y ago
And make use of std::make_unique<>.
auto foo = std::make_unique<Foo>(25.3, true);