From eeff0cd570adbe111deed5078f962c7ec7b47c49 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 1 Aug 2019 15:46:18 +0200 Subject: [PATCH] AK: Don't allow constructing an OwnPtr from a const NonnullOwnPtr& OwnPtr's must move around, they can't be copy constructed. --- AK/OwnPtr.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AK/OwnPtr.h b/AK/OwnPtr.h index 874f468751..67a19578db 100644 --- a/AK/OwnPtr.h +++ b/AK/OwnPtr.h @@ -46,6 +46,10 @@ public: template OwnPtr& operator=(const OwnPtr&) = delete; + template + OwnPtr(const NonnullOwnPtr&) = delete; + template + OwnPtr& operator=(const NonnullOwnPtr&) = delete; template OwnPtr(const RefPtr&) = delete; template