29 #ifndef AURORA_MAKEUNIQUE_HPP
30 #define AURORA_MAKEUNIQUE_HPP
39 #ifdef AURORA_HAS_VARIADIC_TEMPLATES
52 template <
typename T,
typename... Args>
55 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
64 #else // AURORA_HAS_VARIADIC_TEMPLATES
66 #include <Aurora/SmartPtr/Detail/Factories.hpp>
69 #define AURORA_DETAIL_UNIQUEPTR_FACTORY(n) AURORA_DETAIL_SMARTPTR_FACTORY(std::unique_ptr, makeUnique, n)
74 #endif // AURORA_HAS_VARIADIC_TEMPLATES
78 #endif // AURORA_MAKEUNIQUE_HPP
std::unique_ptr< T > makeUnique(Args &&...args)
Emplaces an object directly inside the unique pointer.
Definition: MakeUnique.hpp:53
Definition: DispatchTraits.hpp:39