diff --git a/include/xrpl/basics/IntrusivePointer.h b/include/xrpl/basics/IntrusivePointer.h index f693f52aa16..831b852d583 100644 --- a/include/xrpl/basics/IntrusivePointer.h +++ b/include/xrpl/basics/IntrusivePointer.h @@ -43,7 +43,7 @@ struct StaticCastTagSharedIntrusive }; /** Tag to create an intrusive pointer from another intrusive pointer by using a - static cast. This is useful to create an intrusive pointer to a derived + dynamic cast. This is useful to create an intrusive pointer to a derived class from an intrusive pointer to a base class. If the cast fails an empty (null) intrusive pointer is created. */ @@ -198,6 +198,16 @@ class SharedIntrusive friend SharedIntrusive make_SharedIntrusive(Args&&... args); + template + friend class SharedIntrusive; + + template + friend class SharedWeakUnion; + + template + friend class WeakIntrusive; + +private: /** Return the raw pointer held by this object. */ T* unsafeGetRawPtr() const; @@ -223,7 +233,6 @@ class SharedIntrusive T* unsafeExchange(T* p); -private: /** pointer to the type with an intrusive count */ T* ptr_{nullptr}; };