#pragma once #include namespace common { template memType *malloc_s(unsigned int size); template class UniquePtr { public: explicit UniquePtr() = default; explicit UniquePtr(Target *target); // Move constructor UniquePtr(UniquePtr &&unique_ptr) noexcept; // Move assignment operator UniquePtr &operator=(UniquePtr &&unique_ptr) noexcept; // Disable the copy constructor UniquePtr(const UniquePtr &unique_ptr) = delete; // Disable the copy assignment operator UniquePtr &operator=(const UniquePtr &unique_ptr) = delete; ~UniquePtr(); Target operator*() const; Target *operator->() const; private: Target *_target = nullptr; }; template UniquePtr make_unique(Args... args); } // namespace common #include "memory.tpp"