by elb2020 · 4y ago · 0 comments
I think this is an imagined problem. If you use Foo * for ownership, you will need to write new Foo() + delete foo. I don't really think that's more convenient than just writing std::make_unique<Foo>(). It's more a matter of old habit, I think.
Still, if C++ was designed as a new language today, I think there's a chance that unique pointers would have made their way into the native language specification, together with for instance std::tuple, instead of being library features, like they are today.
No comments yet.