diff --git a/types.hpp b/types.hpp index f8a683d1..e40d07d0 100644 --- a/types.hpp +++ b/types.hpp @@ -6,6 +6,7 @@ #include #include #include +#include template struct bits_type; @@ -130,4 +131,11 @@ T hton (T); template T ntoh (T); + +template +std::unique_ptr +make_unique (const Args &...args) + { return std::unique_ptr (new T (args...)); } + + #endif // __TYPES_HPP