3 ms·
Great work! One thing I would change in the C++ Pointers & References is that things like: auto b = make_shared<char>('b'); is preferred over shared_
by eteran 11y ago
Great work! One thing I would change in the C++ Pointers & References is that things like:
auto b = make_shared<char>('b');
is preferred over
shared_ptr<char> ptr_b(new char('b'));
This style is better because it's shorter and doesn't make you repeat the type :-)
Unfortunately, make_unique didn't make it into C++11, but is there for C++14
- wspeirs 11y agoAdded a note... thanks!