Boost logo

Boost-Commit :

From: pdimov_at_[hidden]
Date: 2008-07-12 07:37:18


Author: pdimov
Date: 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
New Revision: 47345
URL: http://svn.boost.org/trac/boost/changeset/47345

Log:
Merged 44979, 45068, 45085, 45089, 45177, 45194, 45346, 45422, 45545, 46055 from trunk to release
Added:
   branches/release/boost/detail/sp_convertible.hpp
      - copied, changed from r45068, /trunk/boost/detail/sp_convertible.hpp
   branches/release/boost/make_shared.hpp
      - copied unchanged from r44979, /trunk/boost/make_shared.hpp
   branches/release/libs/smart_ptr/test/allocate_shared_test.cpp
      - copied unchanged from r45085, /trunk/libs/smart_ptr/test/allocate_shared_test.cpp
   branches/release/libs/smart_ptr/test/ip_convertible_test.cpp
      - copied unchanged from r45068, /trunk/libs/smart_ptr/test/ip_convertible_test.cpp
   branches/release/libs/smart_ptr/test/make_shared_test.cpp
      - copied, changed from r44979, /trunk/libs/smart_ptr/test/make_shared_test.cpp
   branches/release/libs/smart_ptr/test/sp_convertible_test.cpp
      - copied, changed from r45068, /trunk/libs/smart_ptr/test/sp_convertible_test.cpp
   branches/release/libs/smart_ptr/test/wp_convertible_test.cpp
      - copied unchanged from r45068, /trunk/libs/smart_ptr/test/wp_convertible_test.cpp
Text files modified:
   branches/release/boost/detail/lwm_win32_cs.hpp | 16 ++-
   branches/release/boost/detail/shared_count.hpp | 9 ++
   branches/release/boost/detail/sp_convertible.hpp | 16 ++++
   branches/release/boost/detail/spinlock_sync.hpp | 4 +
   branches/release/boost/detail/spinlock_w32.hpp | 2
   branches/release/boost/detail/yield_k.hpp | 2
   branches/release/boost/intrusive_ptr.hpp | 35 ++++++++-
   branches/release/boost/shared_ptr.hpp | 23 +++++
   branches/release/boost/weak_ptr.hpp | 22 +++++
   branches/release/libs/smart_ptr/intrusive_ptr.html | 6 +
   branches/release/libs/smart_ptr/test/Jamfile.v2 | 5 +
   branches/release/libs/smart_ptr/test/make_shared_test.cpp | 145 ----------------------------------------
   branches/release/libs/smart_ptr/test/smart_ptr_test.cpp | 4 +
   branches/release/libs/smart_ptr/test/sp_convertible_test.cpp | 5 +
   branches/release/libs/smart_ptr/test/sp_unary_addr_test.cpp | 5 +
   15 files changed, 137 insertions(+), 162 deletions(-)

Modified: branches/release/boost/detail/lwm_win32_cs.hpp
==============================================================================
--- branches/release/boost/detail/lwm_win32_cs.hpp (original)
+++ branches/release/boost/detail/lwm_win32_cs.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -29,7 +29,7 @@
 
 #ifndef BOOST_USE_WINDOWS_H
 
-struct CRITICAL_SECTION
+struct critical_section
 {
     struct critical_section_debug * DebugInfo;
     long LockCount;
@@ -43,10 +43,14 @@
 #endif
 };
 
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);
+
+#else
+
+typedef ::CRITICAL_SECTION critical_section;
 
 #endif // #ifndef BOOST_USE_WINDOWS_H
 
@@ -54,7 +58,7 @@
 {
 private:
 
- CRITICAL_SECTION cs_;
+ critical_section cs_;
 
     lightweight_mutex(lightweight_mutex const &);
     lightweight_mutex & operator=(lightweight_mutex const &);

Modified: branches/release/boost/detail/shared_count.hpp
==============================================================================
--- branches/release/boost/detail/shared_count.hpp (original)
+++ branches/release/boost/detail/shared_count.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -104,11 +104,18 @@
 #endif
     }
 
- template<class P, class D> shared_count(P p, D d): pi_(0)
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
+ template<class Y, class D> shared_count( Y * p, D d ): pi_(0)
+#else
+ template<class P, class D> shared_count( P p, D d ): pi_(0)
+#endif
 #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
         , id_(shared_count_id)
 #endif
     {
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
+ typedef Y* P;
+#endif
 #ifndef BOOST_NO_EXCEPTIONS
 
         try

Copied: branches/release/boost/detail/sp_convertible.hpp (from r45068, /trunk/boost/detail/sp_convertible.hpp)
==============================================================================
--- /trunk/boost/detail/sp_convertible.hpp (original)
+++ branches/release/boost/detail/sp_convertible.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -17,6 +17,20 @@
 
 #include <boost/config.hpp>
 
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x600 )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
 namespace boost
 {
 
@@ -57,4 +71,6 @@
 
 } // namespace boost
 
+#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
 #endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED

Modified: branches/release/boost/detail/spinlock_sync.hpp
==============================================================================
--- branches/release/boost/detail/spinlock_sync.hpp (original)
+++ branches/release/boost/detail/spinlock_sync.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -17,6 +17,10 @@
 
 #include <boost/detail/yield_k.hpp>
 
+#if defined( __ia64__ ) && defined( __INTEL_COMPILER )
+# include <ia64intrin.h>
+#endif
+
 namespace boost
 {
 

Modified: branches/release/boost/detail/spinlock_w32.hpp
==============================================================================
--- branches/release/boost/detail/spinlock_w32.hpp (original)
+++ branches/release/boost/detail/spinlock_w32.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -33,7 +33,7 @@
 
 #elif defined(__GNUC__)
 
-#define BOOST_COMPILER_FENCE __asm__ __volatile__( "" ::: "memory" );
+#define BOOST_COMPILER_FENCE __asm__ __volatile__( "" : : : "memory" );
 
 #else
 

Modified: branches/release/boost/detail/yield_k.hpp
==============================================================================
--- branches/release/boost/detail/yield_k.hpp (original)
+++ branches/release/boost/detail/yield_k.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -36,7 +36,7 @@
 
 #elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )
 
-#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" ::: "memory" );
+#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );
 
 #endif
 

Modified: branches/release/boost/intrusive_ptr.hpp
==============================================================================
--- branches/release/boost/intrusive_ptr.hpp (original)
+++ branches/release/boost/intrusive_ptr.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -22,9 +22,17 @@
 
 #include <boost/assert.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/detail/sp_convertible.hpp>
 
-#include <functional> // for std::less
+#include <boost/config/no_tr1/functional.hpp> // for std::less
+
+#if !defined(BOOST_NO_IOSTREAM)
+#if !defined(BOOST_NO_IOSFWD)
 #include <iosfwd> // for std::basic_ostream
+#else
+#include <ostream>
+#endif
+#endif
 
 
 namespace boost
@@ -66,9 +74,19 @@
 
 #if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES)
 
- template<class U> intrusive_ptr(intrusive_ptr<U> const & rhs): p_(rhs.get())
+ template<class U>
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ intrusive_ptr( intrusive_ptr<U> const & rhs, typename detail::sp_enable_if_convertible<U,T>::type = detail::sp_empty() )
+
+#else
+
+ intrusive_ptr( intrusive_ptr<U> const & rhs )
+
+#endif
+ : p_( rhs.get() )
     {
- if(p_ != 0) intrusive_ptr_add_ref(p_);
+ if( p_ != 0 ) intrusive_ptr_add_ref( p_ );
     }
 
 #endif
@@ -105,6 +123,11 @@
         return *this;
     }
 
+ void reset()
+ {
+ this_type().swap( *this );
+ }
+
     void reset( T * rhs )
     {
         this_type( rhs ).swap( *this );
@@ -246,7 +269,9 @@
 
 // operator<<
 
-#if defined(__GNUC__) && (__GNUC__ < 3)
+#if !defined(BOOST_NO_IOSTREAM)
+
+#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) )
 
 template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y> const & p)
 {
@@ -275,6 +300,8 @@
 
 #endif // __GNUC__ < 3
 
+#endif // !defined(BOOST_NO_IOSTREAM)
+
 } // namespace boost
 
 #ifdef BOOST_MSVC

Modified: branches/release/boost/shared_ptr.hpp
==============================================================================
--- branches/release/boost/shared_ptr.hpp (original)
+++ branches/release/boost/shared_ptr.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -31,6 +31,7 @@
 #include <boost/throw_exception.hpp>
 #include <boost/detail/shared_count.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/detail/sp_convertible.hpp>
 
 #include <algorithm> // for std::swap
 #include <functional> // for std::less
@@ -228,7 +229,16 @@
     }
 
     template<class Y>
- shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ shared_ptr( shared_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+
+#else
+
+ shared_ptr( shared_ptr<Y> const & r )
+
+#endif
+ : px( r.px ), pn( r.pn ) // never throws
     {
     }
 
@@ -337,7 +347,16 @@
     }
 
     template<class Y>
- shared_ptr( shared_ptr<Y> && r ): px( r.px ), pn() // never throws
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ shared_ptr( shared_ptr<Y> && r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+
+#else
+
+ shared_ptr( shared_ptr<Y> && r )
+
+#endif
+ : px( r.px ), pn() // never throws
     {
         pn.swap( r.pn );
         r.px = 0;

Modified: branches/release/boost/weak_ptr.hpp
==============================================================================
--- branches/release/boost/weak_ptr.hpp (original)
+++ branches/release/boost/weak_ptr.hpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -61,13 +61,31 @@
 //
 
     template<class Y>
- weak_ptr(weak_ptr<Y> const & r): pn(r.pn) // never throws
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ weak_ptr( weak_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+
+#else
+
+ weak_ptr( weak_ptr<Y> const & r )
+
+#endif
+ : pn(r.pn) // never throws
     {
         px = r.lock().get();
     }
 
     template<class Y>
- weak_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ weak_ptr( shared_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+
+#else
+
+ weak_ptr( shared_ptr<Y> const & r )
+
+#endif
+ : px( r.px ), pn( r.pn ) // never throws
     {
     }
 

Modified: branches/release/libs/smart_ptr/intrusive_ptr.html
==============================================================================
--- branches/release/libs/smart_ptr/intrusive_ptr.html (original)
+++ branches/release/libs/smart_ptr/intrusive_ptr.html 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -62,6 +62,8 @@
       intrusive_ptr &amp; operator=(intrusive_ptr const &amp; r);
       template&lt;class Y&gt; intrusive_ptr &amp; operator=(intrusive_ptr&lt;Y&gt; const &amp; r);
       intrusive_ptr &amp; operator=(T * r);
+
+ void reset();
       void reset(T * r);
 
       T &amp; operator*() const; // never throws
@@ -148,6 +150,10 @@
                         <P><B>Returns:</B> <code>*this</code>.</P>
                 </BLOCKQUOTE>
                 <H3><a name="reset">reset</a></H3>
+ <pre>void reset();</pre>
+ <BLOCKQUOTE>
+ <P><B>Effects:</B> Equivalent to <code>intrusive_ptr().swap(*this)</code>.</P>
+ </BLOCKQUOTE>
                 <pre>void reset(T * r);</pre>
                 <BLOCKQUOTE>
                         <P><B>Effects:</B> Equivalent to <code>intrusive_ptr(r).swap(*this)</code>.</P>

Modified: branches/release/libs/smart_ptr/test/Jamfile.v2
==============================================================================
--- branches/release/libs/smart_ptr/test/Jamfile.v2 (original)
+++ branches/release/libs/smart_ptr/test/Jamfile.v2 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -42,5 +42,10 @@
           [ run spinlock_try_test.cpp ]
           [ run spinlock_try_test.cpp : : : <threading>multi : spinlock_try_test.mt ]
           [ run spinlock_pool_test.cpp ]
+ [ run make_shared_test.cpp ]
+ [ run sp_convertible_test.cpp ]
+ [ run wp_convertible_test.cpp ]
+ [ run ip_convertible_test.cpp ]
+ [ run allocate_shared_test.cpp ]
         ;
 }

Copied: branches/release/libs/smart_ptr/test/make_shared_test.cpp (from r44979, /trunk/libs/smart_ptr/test/make_shared_test.cpp)
==============================================================================
--- /trunk/libs/smart_ptr/test/make_shared_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/make_shared_test.cpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -47,26 +47,12 @@
     }
 
     {
- boost::shared_ptr< int > pi = boost::allocate_shared< int >( std::allocator<int>() );
-
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( *pi == 0 );
- }
-
- {
         boost::shared_ptr< int > pi = boost::make_shared< int >( 5 );
 
         BOOST_TEST( pi.get() != 0 );
         BOOST_TEST( *pi == 5 );
     }
 
- {
- boost::shared_ptr< int > pi = boost::allocate_shared< int >( std::allocator<int>(), 5 );
-
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( *pi == 5 );
- }
-
     BOOST_TEST( X::instances == 0 );
 
     {
@@ -82,20 +68,6 @@
         BOOST_TEST( X::instances == 0 );
     }
 
-
- {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>() );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 0 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
     {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1 );
         boost::weak_ptr<X> wp( pi );
@@ -110,19 +82,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2 );
         boost::weak_ptr<X> wp( pi );
 
@@ -136,19 +95,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3 );
         boost::weak_ptr<X> wp( pi );
 
@@ -162,19 +108,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3, 4 );
         boost::weak_ptr<X> wp( pi );
 
@@ -188,19 +121,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3, 4 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3+4 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3, 4, 5 );
         boost::weak_ptr<X> wp( pi );
 
@@ -214,19 +134,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3, 4, 5 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3+4+5 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3, 4, 5, 6 );
         boost::weak_ptr<X> wp( pi );
 
@@ -240,19 +147,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3, 4, 5, 6 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3+4+5+6 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3, 4, 5, 6, 7 );
         boost::weak_ptr<X> wp( pi );
 
@@ -266,19 +160,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3, 4, 5, 6, 7 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3+4+5+6+7 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3, 4, 5, 6, 7, 8 );
         boost::weak_ptr<X> wp( pi );
 
@@ -292,19 +173,6 @@
     }
 
     {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3, 4, 5, 6, 7, 8 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3+4+5+6+7+8 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
- {
         boost::shared_ptr< X > pi = boost::make_shared< X >( 1, 2, 3, 4, 5, 6, 7, 8, 9 );
         boost::weak_ptr<X> wp( pi );
 
@@ -317,18 +185,5 @@
         BOOST_TEST( X::instances == 0 );
     }
 
- {
- boost::shared_ptr< X > pi = boost::allocate_shared< X >( std::allocator<void>(), 1, 2, 3, 4, 5, 6, 7, 8, 9 );
- boost::weak_ptr<X> wp( pi );
-
- BOOST_TEST( X::instances == 1 );
- BOOST_TEST( pi.get() != 0 );
- BOOST_TEST( pi->v == 1+2+3+4+5+6+7+8+9 );
-
- pi.reset();
-
- BOOST_TEST( X::instances == 0 );
- }
-
     return boost::report_errors();
 }

Modified: branches/release/libs/smart_ptr/test/smart_ptr_test.cpp
==============================================================================
--- branches/release/libs/smart_ptr/test/smart_ptr_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/smart_ptr_test.cpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -196,6 +196,10 @@
     BOOST_TEST( cp.use_count() == 3 );
     BOOST_TEST( *cp == 87654 );
 
+#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP )
+ using boost::swap;
+#endif
+
     boost::shared_ptr<int> cp4;
     swap( cp2, cp4 );
     BOOST_TEST( cp4.use_count() == 3 );

Copied: branches/release/libs/smart_ptr/test/sp_convertible_test.cpp (from r45068, /trunk/libs/smart_ptr/test/sp_convertible_test.cpp)
==============================================================================
--- /trunk/libs/smart_ptr/test/sp_convertible_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/sp_convertible_test.cpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -59,7 +59,12 @@
 
 int main()
 {
+ boost::shared_ptr<double> p1;
+ BOOST_TEST( 1 == f( p1 ) );
     BOOST_TEST( 1 == f( boost::shared_ptr<double>() ) );
+
+ boost::shared_ptr<Z> p2;
+ BOOST_TEST( 4 == g( p2 ) );
     BOOST_TEST( 4 == g( boost::shared_ptr<Z>() ) );
 
     return boost::report_errors();

Modified: branches/release/libs/smart_ptr/test/sp_unary_addr_test.cpp
==============================================================================
--- branches/release/libs/smart_ptr/test/sp_unary_addr_test.cpp (original)
+++ branches/release/libs/smart_ptr/test/sp_unary_addr_test.cpp 2008-07-12 07:37:16 EDT (Sat, 12 Jul 2008)
@@ -49,6 +49,9 @@
         BOOST_TEST( q != 0 && q->data == 17041 );
     }
 
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
+#else
+
     {
         boost::shared_ptr<X> p( &x, deleter(), std::allocator<X>() );
 
@@ -58,5 +61,7 @@
         BOOST_TEST( q != 0 && q->data == 17041 );
     }
 
+#endif
+
     return boost::report_errors();
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk