|
|
@ -10,10 +10,11 @@
|
|
|
|
#include <utility>
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
|
|
|
|
//! Substitute for C++14 std::make_unique.
|
|
|
|
//! Substitute for C++14 std::make_unique.
|
|
|
|
|
|
|
|
//! DEPRECATED use std::make_unique in new code.
|
|
|
|
template <typename T, typename... Args>
|
|
|
|
template <typename T, typename... Args>
|
|
|
|
std::unique_ptr<T> MakeUnique(Args&&... args)
|
|
|
|
std::unique_ptr<T> MakeUnique(Args&&... args)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
|
|
|
return std::make_unique<T>(std::forward<Args>(args)...);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|