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