diff --git a/include/boost/smart_ptr/enable_shared_from_raw.hpp b/include/boost/smart_ptr/enable_shared_from_raw.hpp index 3b2da3e..50e86d0 100644 --- a/include/boost/smart_ptr/enable_shared_from_raw.hpp +++ b/include/boost/smart_ptr/enable_shared_from_raw.hpp @@ -71,15 +71,12 @@ private: } } -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else private: + template friend class shared_ptr; template friend boost::shared_ptr shared_from_raw(T *); template friend boost::weak_ptr weak_from_raw(T *); template< class X, class Y > friend inline void detail::sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); -#endif shared_ptr shared_from_this() const { diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index 3f1d564..cc21cad 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -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 friend class shared_ptr; template friend class weak_ptr; -#endif - element_type * px; // contained pointer boost::detail::shared_count pn; // reference counter diff --git a/include/boost/smart_ptr/weak_ptr.hpp b/include/boost/smart_ptr/weak_ptr.hpp index 2a583f9..655a38b 100644 --- a/include/boost/smart_ptr/weak_ptr.hpp +++ b/include/boost/smart_ptr/weak_ptr.hpp @@ -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 friend class weak_ptr; template friend class shared_ptr; -#endif - element_type * px; // contained pointer boost::detail::weak_count pn; // reference counter