From 8f6423a96ebd32620a343561e35856c28c3ea223 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Fri, 8 May 2020 22:29:30 +0200 Subject: [PATCH] Fix intrusive_ptr and IntrusiveFromThis on gcc, fixes #21 --- src/util/smart_ptr.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/smart_ptr.hpp b/src/util/smart_ptr.hpp index 80d9e115..6c02eb27 100644 --- a/src/util/smart_ptr.hpp +++ b/src/util/smart_ptr.hpp @@ -47,8 +47,8 @@ protected: } private: mutable std::atomic ref_count = 0; - template friend void intrusive_ptr_add_ref(const IntrusivePtrBase* ptr); - template friend void intrusive_ptr_release(const IntrusivePtrBase* ptr); + template friend void intrusive_ptr_add_ref(const IntrusivePtrBase* ptr); + template friend void intrusive_ptr_release(const IntrusivePtrBase* ptr); }; template void intrusive_ptr_add_ref(const IntrusivePtrBase* ptr) { @@ -87,7 +87,7 @@ template class IntrusiveFromThis : public std::enable_shared_from_this { public: inline intrusive_ptr intrusive_from_this() { - return shared_from_this(); + return this->shared_from_this(); } };