Update of /cvsroot/boost/boost/boost/interprocess/smart_ptr
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17930/smart_ptr
Modified Files:
enable_shared_from_this.hpp intrusive_ptr.hpp scoped_ptr.hpp
shared_ptr.hpp unique_ptr.hpp weak_ptr.hpp
Log Message:
Changes for official inclusion in the regression tests
Index: enable_shared_from_this.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/interprocess/smart_ptr/enable_shared_from_this.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- enable_shared_from_this.hpp 12 Jun 2006 17:23:17 -0000 1.1
+++ enable_shared_from_this.hpp 4 May 2007 20:53:08 -0000 1.2
@@ -27,8 +27,8 @@
template<class T, class A, class D>
class enable_shared_from_this
{
+ /// @cond
protected:
-
enable_shared_from_this()
{}
@@ -40,9 +40,9 @@
~enable_shared_from_this()
{}
+ /// @endcond
public:
-
shared_ptr<T, A, D> shared_from_this()
{
shared_ptr<T, A, D> p(_internal_weak_this);
@@ -57,8 +57,11 @@
return p;
}
+ private:
+ /// @cond
typedef T element_type;
mutable weak_ptr<element_type, A, D> _internal_weak_this;
+ /// @endcond
};
} // namespace interprocess
Index: intrusive_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/smart_ptr/intrusive_ptr.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- intrusive_ptr.hpp 7 Aug 2006 14:01:54 -0000 1.2
+++ intrusive_ptr.hpp 4 May 2007 20:53:08 -0000 1.3
@@ -55,11 +55,13 @@
/*!Provides the type of the stored pointer.*/
typedef T element_type;
+ /// @cond
private:
typedef VoidPointer VP;
typedef intrusive_ptr this_type;
typedef pointer this_type::*unspecified_bool_type;
-
+ /// @endcond
+
public:
/*!Constructor. Initializes internal pointer to 0. Does not throw*/
intrusive_ptr(): m_ptr(0)
@@ -154,8 +156,10 @@
void swap(intrusive_ptr & rhs)
{ detail::do_swap(m_ptr, rhs.m_ptr); }
+ /// @cond
private:
pointer m_ptr;
+ /// @endcond
};
/*Returns a.get() == b.get(). Does not throw*/
@@ -253,8 +257,19 @@
*/
} // namespace interprocess
+
+/// @cond
+#if defined(_MSC_VER) && (_MSC_VER < 1400)
+/*Returns p.get(). Does not throw*/
+template<class T, class VP>
+inline T *get_pointer(boost::interprocess::intrusive_ptr<T, VP> p)
+{ return p.get(); }
+#endif
+/// @endcond
+
} // namespace boost
+/// @cond
namespace boost{
namespace interprocess{
@@ -279,6 +294,7 @@
static intrusive_ptr<T, VP> using_dynamic_cast(const intrusive_ptr<S, VP>
&s)
{ return intrusive_ptr<T, VP>(s, detail::dynamic_cast_tag()); }
};
+/// @endcond
} //namespace interprocess{
} //namespace boost{
Index: scoped_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/smart_ptr/scoped_ptr.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- scoped_ptr.hpp 7 Aug 2006 14:01:54 -0000 1.2
+++ scoped_ptr.hpp 4 May 2007 20:53:08 -0000 1.3
@@ -35,11 +35,13 @@
class scoped_ptr
: private Deleter
{
+ /// @cond
scoped_ptr(scoped_ptr const &);
scoped_ptr & operator=(scoped_ptr const &);
typedef scoped_ptr<T, Deleter> this_type;
typedef typename workaround::random_it<T>::reference reference;
+ /// @endcond
public:
@@ -117,8 +119,10 @@
void swap(scoped_ptr & b) // never throws
{ detail::do_swap<Deleter>(*this, b); detail::do_swap(m_ptr, b.m_ptr); }
+ /// @cond
private:
pointer m_ptr;
+ /// @endcond
};
/*!Exchanges the internal pointer and deleter with other scoped_ptr
@@ -133,6 +137,16 @@
{ return p.get(); }
} // namespace interprocess
+
+/// @cond
+#if defined(_MSC_VER) && (_MSC_VER < 1400)
+/*!Returns a copy of the stored pointer*/
+template<class T, class D> inline
+T *get_pointer(boost::interprocess::scoped_ptr<T, D> const & p)
+{ return p.get(); }
+#endif
+/// @endcond
+
} // namespace boost
#include <boost/interprocess/detail/config_end.hpp>
Index: shared_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/smart_ptr/shared_ptr.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- shared_ptr.hpp 7 Aug 2006 14:01:54 -0000 1.2
+++ shared_ptr.hpp 4 May 2007 20:53:08 -0000 1.3
@@ -71,9 +71,10 @@
template<class T, class VA, class D>
class shared_ptr
{
+ /// @cond
private:
-
typedef shared_ptr<T, VA, D> this_type;
+ /// @endcond
public:
/*!Provides the type of the stored pointer.*/
@@ -218,12 +219,14 @@
const_allocator_pointer get_allocator() const
{ return m_pn.get_allocator(); }
+ /// @cond
private:
template<class T2, class A2, class D2> friend class shared_ptr;
template<class T2, class A2, class D2> friend class weak_ptr;
detail::shared_count<T, VA, D> m_pn; // reference counter
+ /// @endcond
}; // shared_ptr
template<class T, class VA, class D, class U, class VA2, class D2> inline
@@ -272,8 +275,19 @@
{ return static_cast<D *>(p._internal_get_deleter(typeid(D))); }
*/
} // namespace interprocess
+
+/// @cond
+#if defined(_MSC_VER) && (_MSC_VER < 1400)
+// get_pointer() enables boost::mem_fn to recognize shared_ptr
+template<class T, class VA, class D> inline
+T * get_pointer(boost::interprocess::shared_ptr<T, VA, D> const & p)
+{ return p.get(); }
+#endif
+/// @endcond
+
} // namespace boost
+/// @cond
namespace boost{
namespace interprocess{
@@ -298,6 +312,7 @@
static shared_ptr<T, VA, D> using_dynamic_cast(const shared_ptr<S, VA, D>
&s)
{ return shared_ptr<T, VA, D>(s, detail::dynamic_cast_tag()); }
};
+/// @endcond
} //namespace interprocess{
} //namespace boost{
Index: unique_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/smart_ptr/unique_ptr.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- unique_ptr.hpp 15 Oct 2006 13:11:07 -0000 1.2
+++ unique_ptr.hpp 4 May 2007 20:53:08 -0000 1.3
@@ -63,6 +63,7 @@
}
};
+/// @cond
template <class T, class D> class unique_ptr;
namespace detail {
@@ -76,13 +77,17 @@
};
} //namespace detail {
+/// @endcond
template <class T, class D = default_delete<T> >
class unique_ptr
{
+ /// @cond
struct nat {int for_bool_;};
typedef typename boost::add_reference<D>::type deleter_reference;
typedef typename boost::add_reference<const D>::type
deleter_const_reference;
+ /// @endcond
+
public:
typedef T element_type;
typedef D deleter_type;
@@ -212,6 +217,7 @@
void swap(detail::moved_object<unique_ptr> mu)
{ ptr_.swap(mu.get().ptr_); }
+ /// @cond
private:
boost::compressed_pair<pointer, D> ptr_;
@@ -224,6 +230,7 @@
unique_ptr& operator=(unique_ptr&);
template <class U, class E> unique_ptr& operator=(unique_ptr<U, E>&);
template <class U> typename detail::unique_ptr_error<U>::type operator=(U&);
+ /// @endcond
};
/*
template <class T, class D>
@@ -411,13 +418,14 @@
bool operator>=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y)
{ return x.get() >= y.get(); }
+/// @cond
/*!This class has move constructor*/
-
template <class T, class D>
struct is_movable<unique_ptr<T, D> >
{
enum { value = true };
};
+/// @endcond
} //namespace interprocess{
} //namespace boost{
Index: weak_ptr.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/smart_ptr/weak_ptr.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- weak_ptr.hpp 12 Jun 2006 17:23:17 -0000 1.1
+++ weak_ptr.hpp 4 May 2007 20:53:08 -0000 1.2
@@ -25,17 +25,17 @@
template<class T, class A, class D>
class weak_ptr
{
+ /// @cond
private:
-
// Borland 5.5.1 specific workarounds
typedef weak_ptr<T, A, D> this_type;
typedef typename detail::pointer_to_other
<typename A::pointer, T>::type pointer;
typedef typename workaround::random_it<T>::reference reference;
typedef typename workaround::random_it<T>::const_reference const_reference;
+ /// @endcond
public:
-
typedef T element_type;
typedef T value_type;
@@ -125,12 +125,14 @@
void _internal_assign(const detail::shared_count<Y, A, D> & pn2)
{ m_pn = pn2; }
+ /// @cond
private:
template<class T2, class A2, class D2> friend class shared_ptr;
template<class T2, class A2, class D2> friend class weak_ptr;
detail::weak_count<T, A, D> m_pn; // reference counter
+ /// @endcond
}; // weak_ptr
template<class T, class A, class D, class U, class A2, class D2> inline
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs