diff options
author | Tom <tomut@yahoo.com> | 2020-12-29 18:11:12 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-31 00:39:43 +0100 |
commit | 34b3d92a13f154d3560c79e16a2e370fddbf130e (patch) | |
tree | 0bdae292d8c039d52cf75ceb84ba07d9ca3b5e61 /AK/Weakable.h | |
parent | 54eeb8ee9a57850aca5056a5834bfb86a210bf1a (diff) | |
download | serenity-34b3d92a13f154d3560c79e16a2e370fddbf130e.zip |
AK: Fix some WeakPtr copy constructor variants not copying the link
Diffstat (limited to 'AK/Weakable.h')
-rw-r--r-- | AK/Weakable.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/AK/Weakable.h b/AK/Weakable.h index e598895ac9..4db6e1344d 100644 --- a/AK/Weakable.h +++ b/AK/Weakable.h @@ -30,6 +30,7 @@ #include "Atomic.h" #include "RefCounted.h" #include "RefPtr.h" +#include "StdLibExtras.h" #ifdef KERNEL # include <Kernel/Arch/i386/CPU.h> #endif @@ -52,7 +53,7 @@ class WeakLink : public RefCounted<WeakLink> { friend class WeakPtr; public: - template<typename T, typename PtrTraits = RefPtrTraits<T>> + template<typename T, typename PtrTraits = RefPtrTraits<T>, typename EnableIf<IsBaseOf<RefCountedBase, T>::value>::Type* = nullptr> RefPtr<T, PtrTraits> strong_ref() const { RefPtr<T, PtrTraits> ref; |