From 82528ba7df7bb8b2a6d89c416a66aee5c39f7f66 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 20 Dec 2014 03:21:23 -0200 Subject: Common: Add a clone of std::make_unique --- src/common/make_unique.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/common/make_unique.h (limited to 'src/common/make_unique.h') diff --git a/src/common/make_unique.h b/src/common/make_unique.h new file mode 100644 index 00000000..2a7b7641 --- /dev/null +++ b/src/common/make_unique.h @@ -0,0 +1,16 @@ +// Copyright 2014 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +namespace Common { + +template +std::unique_ptr make_unique(Args&&... args) { + return std::unique_ptr(new T(std::forward(args)...)); +} + +} // namespace -- cgit v1.2.3