diff --git a/types.hpp b/types.hpp index 32de0fcf..66ad9426 100644 --- a/types.hpp +++ b/types.hpp @@ -142,11 +142,10 @@ template size_t elems(T (&)[N]) { return N; } - -template -std::unique_ptr -make_unique (const Args &...args) - { return std::unique_ptr (new T (args...)); } +template +std::unique_ptr make_unique(Args&&... args) { + return std::unique_ptr (new T(std::forward(args)...)); +} struct fourcc {