mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 02:18:19 -05:00
Common: Add a clone of std::make_unique
This commit is contained in:
16
src/common/make_unique.h
Normal file
16
src/common/make_unique.h
Normal file
@ -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 <memory>
|
||||
|
||||
namespace Common {
|
||||
|
||||
template <typename T, typename... Args>
|
||||
std::unique_ptr<T> make_unique(Args&&... args) {
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
} // namespace
|
Reference in New Issue
Block a user