[ox/std] Fix more functions to work with UPter custom deleters
This commit is contained in:
parent
9a80196fa6
commit
cc7c7ac9d7
8
deps/ox/src/ox/std/memory.hpp
vendored
8
deps/ox/src/ox/std/memory.hpp
vendored
@ -210,17 +210,17 @@ class UniquePtr {
|
|||||||
return m_t;
|
return m_t;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename U>
|
template<typename U, typename UDeleter>
|
||||||
constexpr void reset(UniquePtr<U> &&other = UniquePtr()) {
|
constexpr void reset(UniquePtr<U, UDeleter> &&other = UniquePtr()) {
|
||||||
auto t = m_t;
|
auto t = m_t;
|
||||||
m_t = other.release();
|
m_t = other.release();
|
||||||
Deleter()(t);
|
Deleter()(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr UniquePtr &operator=(const UniquePtr<T> &other) = delete;
|
constexpr UniquePtr &operator=(UniquePtr const&other) = delete;
|
||||||
|
|
||||||
template<typename U, typename UDeleter>
|
template<typename U, typename UDeleter>
|
||||||
constexpr UniquePtr &operator=(const UniquePtr<U, UDeleter> &other) = delete;
|
constexpr UniquePtr &operator=(UniquePtr<U, UDeleter> const&other) = delete;
|
||||||
|
|
||||||
constexpr UniquePtr &operator=(UniquePtr<T> &&other) noexcept {
|
constexpr UniquePtr &operator=(UniquePtr<T> &&other) noexcept {
|
||||||
reset(std::move(other));
|
reset(std::move(other));
|
||||||
|
Loading…
Reference in New Issue
Block a user