summaryrefslogtreecommitdiff
path: root/src/std/memory.tpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-07 09:24:37 +0100
committerHampusM <hampus@hampusmat.com>2022-03-07 09:26:17 +0100
commit4b4605df15ce7061a08d7911069927bf49778d05 (patch)
tree5f853e2d7508e073bd12175a7d18ab9e6bf2ea82 /src/std/memory.tpp
parentfaa501905e2fb554a2444b5e396d9e979ce0be0e (diff)
fix: prevent invalid UniquePtr usage
Diffstat (limited to 'src/std/memory.tpp')
-rw-r--r--src/std/memory.tpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/std/memory.tpp b/src/std/memory.tpp
index fdfe72b..b2f39bf 100644
--- a/src/std/memory.tpp
+++ b/src/std/memory.tpp
@@ -27,12 +27,6 @@ UniquePtr<Target>::UniquePtr(Target *target) : _target(target)
}
template <class Target>
-UniquePtr<Target>::UniquePtr(const UniquePtr &unique_ptr)
- : _target(new Target(*(unique_ptr._target)))
-{
-}
-
-template <class Target>
UniquePtr<Target>::UniquePtr(UniquePtr &&unique_ptr) noexcept
: _target(unique_ptr._target)
{
@@ -40,19 +34,6 @@ UniquePtr<Target>::UniquePtr(UniquePtr &&unique_ptr) noexcept
}
template <class Target>
-UniquePtr<Target> &UniquePtr<Target>::operator=(const UniquePtr &unique_ptr)
-{
- if (&unique_ptr != this)
- {
- delete _target;
- _target = nullptr;
- _target = new Target(*(unique_ptr._target));
- }
-
- return *this;
-}
-
-template <class Target>
UniquePtr<Target> &UniquePtr<Target>::operator=(UniquePtr &&unique_ptr) noexcept
{
if (&unique_ptr != this)