mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-31 21:24:40 +02:00
Remove uses of BOOST_NO_MEMBER_TEMPLATE_FRIENDS
This commit is contained in:
@@ -71,15 +71,12 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
public:
|
||||
#else
|
||||
private:
|
||||
|
||||
template<class Y> friend class shared_ptr;
|
||||
template<typename T> friend boost::shared_ptr<T> shared_from_raw(T *);
|
||||
template<typename T> friend boost::weak_ptr<T> weak_from_raw(T *);
|
||||
template< class X, class Y > friend inline void detail::sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe );
|
||||
#endif
|
||||
|
||||
shared_ptr<void const volatile> shared_from_this() const
|
||||
{
|
||||
|
@@ -839,19 +839,12 @@ public:
|
||||
return pn;
|
||||
}
|
||||
|
||||
// Tasteless as this may seem, making all members public allows member templates
|
||||
// to work in the absence of member template friends. (Matthew Langston)
|
||||
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
|
||||
private:
|
||||
|
||||
template<class Y> friend class shared_ptr;
|
||||
template<class Y> friend class weak_ptr;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
element_type * px; // contained pointer
|
||||
boost::detail::shared_count pn; // reference counter
|
||||
|
||||
|
@@ -249,18 +249,11 @@ public:
|
||||
return pn.hash_value();
|
||||
}
|
||||
|
||||
// Tasteless as this may seem, making all members public allows member templates
|
||||
// to work in the absence of member template friends. (Matthew Langston)
|
||||
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
|
||||
private:
|
||||
|
||||
template<class Y> friend class weak_ptr;
|
||||
template<class Y> friend class shared_ptr;
|
||||
|
||||
#endif
|
||||
|
||||
element_type * px; // contained pointer
|
||||
boost::detail::weak_count pn; // reference counter
|
||||
|
||||
|
Reference in New Issue
Block a user