diff options
Diffstat (limited to 'src/std/memory.hpp')
-rw-r--r-- | src/std/memory.hpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/std/memory.hpp b/src/std/memory.hpp deleted file mode 100644 index d1ca762..0000000 --- a/src/std/memory.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include <stddef.h> - -template <typename memType> -memType *malloc_s(unsigned int size); - -template <class Target> -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 <typename Target, typename... Args> -UniquePtr<Target> make_unique(Args... args); - -#include "memory.tpp" |