#pragma once #include #include namespace lt::memory { /** Wrapper around std::unique_ptr. * * @note Currently just an alias, might turn into an implementation later. * @ref https://en.cppreference.com/w/cpp/memory/unique_ptr.html */ template using Scope = std::unique_ptr; /** Allocates memory for an `Underlying_T` and directly constructs it there. * * @return A Scope to the constructed object. */ template constexpr Scope create_scope(Args &&...args) { return std::make_unique(std::forward(args)...); } /** Converts c-style pointer of type `Underlying_T` to a `Scope`. */ template constexpr Scope make_scope(Underlying_T *raw_pointer) { return Scope(raw_pointer); } } // namespace lt::memory