7 template <
typename AType>
class UniquePointer :
public std::unique_ptr<AType, void(*)(AType* const)> {
10 using BaseType = std::unique_ptr<AType, void(*)(AType* const)>;
20 static BaseType InitBase(AType*
const APointer, std::true_type AIsDestructible) noexcept;
29 static BaseType InitBase(AType*
const APointer, std::false_type AIsDestructible) noexcept;
37 static void Deallocate(AType*
const APointer) noexcept;
44 static void Delete(AType*
const APointer) noexcept;
58 constexpr
UniquePointer(const std::nullptr_t AIgnored) noexcept;
70 #include "UniquePointer.inl"
static void Delete(AType *const APointer) noexcept
Deletes APointer using the Allocator.
std::unique_ptr< CYB::Engine::Logger::LogEntry, void(*)(CYB::Engine::Logger::LogEntry *const)> BaseType
For readibility and fighting a bug with namespaced template base class constructors.
static BaseType InitBase(AType *const APointer, std::true_type AIsDestructible) noexcept
Used by this type's constructors.
static void Deallocate(AType *const APointer) noexcept
Deallocates APointer using the Allocator's Heap.
UniquePointer that uses our Allocator.
constexpr UniquePointer() noexcept
Initialize an empty UniquePointer.