Why is there no std::make_unique function template in the standard C++11 library? I find
std::unique_ptr p(new SomeUs
Herb Sutter, chair of the C++ standardization committee, writes on his blog:
That C++11 doesn’t include
make_uniqueis partly an oversight, and it will almost certainly be added in the future.
He also gives an implementation that is identical with the one given by the OP.
Edit: std::make_unique now is part of C++14.