Answer by Yakk - Adam Nevraumont for Are new and delete still useful in C++14?
It is a relatively common choice to use make_unique and make_shared rather than raw calls to new. It is not, however, mandatory. Assuming you choose to follow that convention, there are a few places to...
View ArticleAnswer by Barry for Are new and delete still useful in C++14?
While smart pointers are preferable to raw pointers in many cases, there are still lots of use-cases for new/delete in C++14. If you need to write anything that requires in-place construction, for...
View ArticleAnswer by TheCppZoo for Are new and delete still useful in C++14?
I would say the only reason for new and delete is to implement other kinds of smart pointers.For example, the library still does not have intrusive pointers as boost::intrusive_ptr, which is a pity...
View ArticleAnswer by Mark B for Are new and delete still useful in C++14?
The only reason I can think of is that occasionally you may wish to use a custom deleter with your unique_ptr or shared_ptr. To use a custom deleter you need to create the smart pointer directly,...
View ArticleAre new and delete still useful in C++14?
Given availability of make_unique and make_shared, as well as automatic deletion by unique_ptr and shared_ptr destructors, what are the situations (apart from supporting legacy code) for using new and...
View Article