diff --git a/AK/NonnullRawPtr.h b/AK/NonnullRawPtr.h index fc4b9836833..a271160e0d8 100644 --- a/AK/NonnullRawPtr.h +++ b/AK/NonnullRawPtr.h @@ -7,12 +7,16 @@ #pragma once #include +#include #include namespace AK { template requires(!IsLvalueReference && !IsRvalueReference) class [[nodiscard]] NonnullRawPtr { + AK_MAKE_DEFAULT_COPYABLE(NonnullRawPtr); + AK_MAKE_DEFAULT_MOVABLE(NonnullRawPtr); + public: using ValueType = T; @@ -23,30 +27,6 @@ public: { } - NonnullRawPtr(NonnullRawPtr const& other) - : m_ptr(other.m_ptr) - { - } - - NonnullRawPtr(NonnullRawPtr&& other) - : m_ptr(other.m_ptr) - { - } - - NonnullRawPtr& operator=(NonnullRawPtr const& other) - { - m_ptr = other.m_ptr; - - return *this; - } - - NonnullRawPtr& operator=(NonnullRawPtr&& other) - { - m_ptr = other.m_ptr; - - return *this; - } - operator bool() const = delete; bool operator!() const = delete;