According to Herb Sutter in this article , it was "partially oversight." This article contains a nice implementation and provides a convincing argument in favor of its use:
template<typename T, typename ...Args> std::unique_ptr<T> make_unique( Args&& ...args ) { return std::unique_ptr<T>( new T( std::forward<Args>(args)... ) ); }
Update : The original update is updated, and the emphasis has been changed.
juanchopanza Sep 25 '12 at 9:52 2012-09-25 09:52
source share