2 ms·
It exists for both reasons. That's why there's also a std::make_unique even though it doesn't have a control block (although it was added later, but that was j
by quietbritishjim 5y ago
It exists for both reasons.
That's why there's also a std::make_unique even though it doesn't have a control block (although it was added later, but that was just an oversight).
- MaxBarraclough 5y ago> It exists for both reasons. I believe this is correct. Here's [0] some old Boost documentation on Boost's make_shared which inspired the C++ standard's make_shared. It mentions both reasons. [0] https://www.boost.org/doc/libs/1_67_0/libs/smart_ptr/doc/html/smart_ptr.html#make_shared https://www.boost.org/doc/libs/1_67_0/libs/smart_ptr/doc/htm...