diff options
Diffstat (limited to 'boost/interprocess/smart_ptr/weak_ptr.hpp')
-rw-r--r-- | boost/interprocess/smart_ptr/weak_ptr.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/boost/interprocess/smart_ptr/weak_ptr.hpp b/boost/interprocess/smart_ptr/weak_ptr.hpp index 7126d055aa..5202ede91c 100644 --- a/boost/interprocess/smart_ptr/weak_ptr.hpp +++ b/boost/interprocess/smart_ptr/weak_ptr.hpp @@ -31,7 +31,7 @@ namespace boost{ namespace interprocess{ //!The weak_ptr class template stores a "weak reference" to an object -//!that's already managed by a shared_ptr. To access the object, a weak_ptr +//!that's already managed by a shared_ptr. To access the object, a weak_ptr //!can be converted to a shared_ptr using the shared_ptr constructor or the //!member function lock. When the last shared_ptr to the object goes away //!and the object is deleted, the attempt to obtain a shared_ptr from the @@ -99,11 +99,11 @@ class weak_ptr template<class Y> weak_ptr(weak_ptr<Y, A, D> const & r) : m_pn(r.m_pn) // never throws - { + { //Construct a temporary shared_ptr so that nobody //can destroy the value while constructing this const shared_ptr<T, A, D> &ref = r.lock(); - m_pn.set_pointer(ref.get()); + m_pn.set_pointer(ref.get()); } //!Effects: If r is empty, constructs an empty weak_ptr; otherwise, @@ -126,7 +126,7 @@ class weak_ptr //!implied guarantees) via different means, without creating a temporary. template<class Y> weak_ptr & operator=(weak_ptr<Y, A, D> const & r) // never throws - { + { //Construct a temporary shared_ptr so that nobody //can destroy the value while constructing this const shared_ptr<T, A, D> &ref = r.lock(); @@ -174,7 +174,7 @@ class weak_ptr //!testing purposes, not for production code. long use_count() const // never throws { return m_pn.use_count(); } - + //!Returns: Returns: use_count() == 0. //! //!Throws: nothing. @@ -196,10 +196,10 @@ class weak_ptr { ipcdetail::do_swap(m_pn, other.m_pn); } /// @cond - template<class T2, class A2, class D2> + template<class T2, class A2, class D2> bool _internal_less(weak_ptr<T2, A2, D2> const & rhs) const { return m_pn < rhs.m_pn; } - + template<class Y> void _internal_assign(const ipcdetail::shared_count<Y, A, D> & pn2) { @@ -216,7 +216,7 @@ class weak_ptr /// @endcond }; // weak_ptr -template<class T, class A, class D, class U, class A2, class D2> inline +template<class T, class A, class D, class U, class A2, class D2> inline bool operator<(weak_ptr<T, A, D> const & a, weak_ptr<U, A2, D2> const & b) { return a._internal_less(b); } |