make_unique.h 357 B

12345678910111213141516
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <memory>
  6. namespace Common {
  7. template <typename T, typename... Args>
  8. std::unique_ptr<T> make_unique(Args&&... args) {
  9. return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
  10. }
  11. } // namespace