too tired to think

This commit is contained in:
Erris
2026-01-31 10:27:40 +01:00
parent 5a25ab5f5f
commit 7b4950dda0
20 changed files with 160 additions and 92 deletions

View File

@@ -0,0 +1,24 @@
#ifndef REF_SCOPE_HPP
#define REF_SCOPE_HPP
#include <memory>
namespace OpenEngine {
template<typename T>
using Scope = std::unique_ptr<T>;
template<typename T, typename ... Args>
constexpr Scope<T> CreateScope(Args&& ... args)
{
return std::make_unique<T>(std::forward<Args>(args)...);
}
template<typename T>
using Ref = std::shared_ptr<T>;
template<typename T, typename ... Args>
constexpr Ref<T> CreateRef(Args&& ... args)
{
return std::make_shared<T>(std::forward<Args>(args)...);
}
}
#endif // REF_SCOPE_HPP