diff --git a/deps/ox/src/ox/std/anyptr.hpp b/deps/ox/src/ox/std/anyptr.hpp index 19f96bf8..36a6ac9b 100644 --- a/deps/ox/src/ox/std/anyptr.hpp +++ b/deps/ox/src/ox/std/anyptr.hpp @@ -64,7 +64,7 @@ class AnyPtrT { } } - constexpr AnyPtrT(AnyPtrT const&other) noexcept { + constexpr AnyPtrT(AnyPtrT const&other) noexcept requires(!unique) { if (other) { m_wrapPtr = other.m_wrapPtr->copyTo(m_wrapData); } @@ -104,11 +104,9 @@ class AnyPtrT { return *this; } - constexpr AnyPtrT &operator=(AnyPtrT const&ptr) noexcept { + constexpr AnyPtrT &operator=(AnyPtrT const&ptr) noexcept requires(!unique) { if (this != &ptr) { - if constexpr(unique) { - free(); - } else if (std::is_constant_evaluated()) { + if (std::is_constant_evaluated()) { ox::safeDelete(m_wrapPtr); } if (ptr) {