Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2008-06-12 09:47:34


Author: nesotto
Date: 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
New Revision: 46350
URL: http://svn.boost.org/trac/boost/changeset/46350

Log:
update for better RVO
Text files modified:
   trunk/boost/ptr_container/detail/associative_ptr_container.hpp | 24 +++--------------
   trunk/boost/ptr_container/detail/reversible_ptr_container.hpp | 54 ++++++++++++++++-----------------------
   trunk/boost/ptr_container/detail/serialize_reversible_cont.hpp | 6 ----
   trunk/boost/ptr_container/detail/serialize_xml_names.hpp | 6 ++++
   trunk/boost/ptr_container/ptr_array.hpp | 25 +++++-------------
   trunk/boost/ptr_container/ptr_circular_buffer.hpp | 17 ++---------
   trunk/boost/ptr_container/ptr_list.hpp | 18 ++++++++++++
   trunk/boost/ptr_container/ptr_map.hpp | 10 ++----
   trunk/boost/ptr_container/ptr_map_adapter.hpp | 34 +++++-------------------
   trunk/boost/ptr_container/ptr_sequence_adapter.hpp | 26 +++++++-----------
   trunk/boost/ptr_container/ptr_set.hpp | 4 ++
   trunk/boost/ptr_container/ptr_set_adapter.hpp | 16 +++--------
   trunk/boost/ptr_container/ptr_unordered_map.hpp | 10 ++----
   trunk/boost/ptr_container/ptr_unordered_set.hpp | 8 +++--
   14 files changed, 100 insertions(+), 158 deletions(-)

Modified: trunk/boost/ptr_container/detail/associative_ptr_container.hpp
==============================================================================
--- trunk/boost/ptr_container/detail/associative_ptr_container.hpp (original)
+++ trunk/boost/ptr_container/detail/associative_ptr_container.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -78,7 +78,7 @@
         template< class Compare, class Allocator >
         associative_ptr_container( const Compare& comp,
                                    const Allocator& a )
- : base_type( comp, a )
+ : base_type( comp, a, container_type() )
         { }
         
         template< class Hash, class Pred, class Allocator >
@@ -88,11 +88,6 @@
          : base_type( hash, pred, a )
         { }
 
- template< class InputIterator >
- associative_ptr_container( InputIterator first, InputIterator last )
- : base_type( first, last, container_type() )
- { }
-
         template< class InputIterator, class Compare, class Allocator >
         associative_ptr_container( InputIterator first, InputIterator last,
                                    const Compare& comp,
@@ -113,12 +108,12 @@
          : base_type( r )
         { }
 
- explicit associative_ptr_container( const associative_ptr_container& r )
+ associative_ptr_container( const associative_ptr_container& r )
          : base_type( r.begin(), r.end(), container_type() )
         { }
         
         template< class C, class V >
- explicit associative_ptr_container( const associative_ptr_container<C,V>& r )
+ associative_ptr_container( const associative_ptr_container<C,V>& r )
          : base_type( r.begin(), r.end(), container_type() )
         { }
         
@@ -129,18 +124,9 @@
            return *this;
         }
         
- template< class C, class V >
- associative_ptr_container& operator=( const associative_ptr_container<C,V>& r ) // strong
- {
- associative_ptr_container clone( r );
- this->swap( clone );
- return *this;
- }
-
- associative_ptr_container& operator=( const associative_ptr_container& r ) // strong
+ associative_ptr_container& operator=( associative_ptr_container r ) // strong
         {
- associative_ptr_container clone( r );
- this->swap( clone );
+ this->swap( r );
            return *this;
         }
 

Modified: trunk/boost/ptr_container/detail/reversible_ptr_container.hpp
==============================================================================
--- trunk/boost/ptr_container/detail/reversible_ptr_container.hpp (original)
+++ trunk/boost/ptr_container/detail/reversible_ptr_container.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -140,6 +140,7 @@
 
     public:
         Cont& base() { return c_; }
+ protected: // having this public could break encapsulation
         const Cont& base() const { return c_; }
         
     public: // typedefs
@@ -336,13 +337,13 @@
             swap( *clone );
         }
 
- explicit reversible_ptr_container( const reversible_ptr_container& r )
+ reversible_ptr_container( const reversible_ptr_container& r )
         {
             constructor_impl( r.begin(), r.end(), std::forward_iterator_tag() );
         }
 
         template< class C, class V >
- explicit reversible_ptr_container( const reversible_ptr_container<C,V>& r )
+ reversible_ptr_container( const reversible_ptr_container<C,V>& r )
         {
             constructor_impl( r.begin(), r.end(), std::forward_iterator_tag() );
         }
@@ -354,18 +355,9 @@
             return *this;
         }
 
- reversible_ptr_container& operator=( const reversible_ptr_container& r ) // strong
+ reversible_ptr_container& operator=( reversible_ptr_container r ) // strong
         {
- reversible_ptr_container clone( r );
- swap( clone );
- return *this;
- }
-
- template< class C, class V >
- reversible_ptr_container& operator=( const reversible_ptr_container<C,V>& r ) // strong
- {
- reversible_ptr_container clone( r );
- swap( clone );
+ swap( r );
             return *this;
         }
         
@@ -375,7 +367,7 @@
         reversible_ptr_container( InputIterator first,
                                   InputIterator last,
                                   const allocator_type& a = allocator_type() ) // basic, strong
- : c_( a )
+ : c_( a )
         {
             constructor_impl( first, last,
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
@@ -388,7 +380,7 @@
         template< class Compare >
         reversible_ptr_container( const Compare& comp,
                                   const allocator_type& a )
- : c_( comp, a ) {}
+ : c_( comp, a ) {}
 
         template< class ForwardIterator >
         reversible_ptr_container( ForwardIterator first,
@@ -414,6 +406,13 @@
 #endif
                               iterator_category<InputIterator>::type() );
         }
+
+ template< class Compare >
+ reversible_ptr_container( const Compare& comp,
+ const allocator_type& a,
+ associative_container_tag )
+ : c_( comp, a )
+ { }
                 
         template< class InputIterator >
         reversible_ptr_container( InputIterator first,
@@ -429,19 +428,19 @@
                                   const Compare& comp,
                                   const allocator_type& a,
                                   associative_container_tag )
- : c_( comp, a )
+ : c_( comp, a )
         {
             associative_constructor_impl( first, last );
         }
 
         explicit reversible_ptr_container( size_type n )
- : c_( n ) {}
+ : c_( n ) {}
 
         template< class Hash, class Pred >
         reversible_ptr_container( const Hash& hash,
                                   const Pred& pred,
                                   const allocator_type& a )
- : c_( hash, pred, a ) {}
+ : c_( hash, pred, a ) {}
 
         template< class InputIterator, class Hash, class Pred >
         reversible_ptr_container( InputIterator first,
@@ -449,7 +448,7 @@
                                   const Hash& hash,
                                   const Pred& pred,
                                   const allocator_type& a )
- : c_( hash, pred, a )
+ : c_( hash, pred, a )
         {
             associative_constructor_impl( first, last );
         }
@@ -697,24 +696,15 @@
 
 #define BOOST_PTR_CONTAINER_DEFINE_COPY_CONSTRUCTORS( PC, base_type ) \
                                                                       \
- explicit PC( const PC& r ) : base_type( r ) { } \
- \
     template< class U > \
- explicit PC( const PC<U>& r ) : base_type( r ) { } \
+ PC( const PC<U>& r ) : base_type( r ) { } \
                                                                       \
- PC& operator=( const PC& r ) \
+ PC& operator=( PC r ) \
     { \
- base_type::operator=( r ); \
+ this->swap( r ); \
         return *this; \
     } \
- \
- template< class U > \
- PC& operator=( const PC<U>& r ) \
- { \
- base_type::operator=( r ); \
- return *this; \
- }
-
+
 
 #define BOOST_PTR_CONTAINER_DEFINE_CONSTRUCTORS( PC, base_type ) \
     typedef BOOST_DEDUCED_TYPENAME base_type::iterator iterator; \

Modified: trunk/boost/ptr_container/detail/serialize_reversible_cont.hpp
==============================================================================
--- trunk/boost/ptr_container/detail/serialize_reversible_cont.hpp (original)
+++ trunk/boost/ptr_container/detail/serialize_reversible_cont.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -16,12 +16,6 @@
 namespace ptr_container_detail
 {
 
-template<class T>
-inline T const& serialize_as_const(T const& r)
-{
- return r;
-}
-
 template<class Archive, class Config, class CloneAllocator>
 void save_helper(Archive& ar, const ptr_container_detail::reversible_ptr_container<Config, CloneAllocator>& c)
 {

Modified: trunk/boost/ptr_container/detail/serialize_xml_names.hpp
==============================================================================
--- trunk/boost/ptr_container/detail/serialize_xml_names.hpp (original)
+++ trunk/boost/ptr_container/detail/serialize_xml_names.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -20,6 +20,12 @@
         inline const char* item() { return "item"; }
         inline const char* first() { return "first"; }
         inline const char* second() { return "second"; }
+
+ template<class T>
+ inline T const& serialize_as_const(T const& r)
+ {
+ return r;
+ }
     }
 }
 #endif

Modified: trunk/boost/ptr_container/ptr_array.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_array.hpp (original)
+++ trunk/boost/ptr_container/ptr_array.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -83,41 +83,30 @@
         ptr_array() : base_class()
         { }
 
- explicit ptr_array( const ptr_array& r )
+ ptr_array( const ptr_array& r )
         {
             size_t i = 0;
             for( ; i != N; ++i )
                 this->base()[i] = this->null_policy_allocate_clone(
- static_cast<T*>( r.base()[i] ) );
+ static_cast<const T*>( &r[i] ) );
         }
 
         template< class U >
- explicit ptr_array( const ptr_array<U,N>& r )
+ ptr_array( const ptr_array<U,N>& r )
         {
             size_t i = 0;
             for( ; i != N; ++i )
                 this->base()[i] = this->null_policy_allocate_clone(
- static_cast<U*>( r.base()[i] ) );
+ static_cast<const T*>( &r[i] ) );
         }
 
         explicit ptr_array( std::auto_ptr<this_type> r )
         : base_class( r ) { }
 
- ptr_array& operator=( const ptr_array& r )
+ ptr_array& operator=( ptr_array r )
         {
- ptr_array clone( r );
- this->swap( clone );
- return *this;
-
- }
-
- template< class U >
- ptr_array& operator=( const ptr_array<U,N>& r )
- {
- ptr_array clone( r );
- this->swap( clone );
- return *this;
-
+ this->swap( r );
+ return *this;
         }
 
         ptr_array& operator=( std::auto_ptr<this_type> r )

Modified: trunk/boost/ptr_container/ptr_circular_buffer.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_circular_buffer.hpp (original)
+++ trunk/boost/ptr_container/ptr_circular_buffer.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -78,29 +78,20 @@
           : base_type( n, first, last, ptr_container_detail::fixed_length_sequence_tag() )
         { }
 
- explicit ptr_circular_buffer( const ptr_circular_buffer& r )
+ ptr_circular_buffer( const ptr_circular_buffer& r )
           : base_type( r.size(), r.begin(), r.end(),
                        ptr_container_detail::fixed_length_sequence_tag() )
         { }
 
         template< class U >
- explicit ptr_circular_buffer( const ptr_circular_buffer<U>& r )
+ ptr_circular_buffer( const ptr_circular_buffer<U>& r )
           : base_type( r.size(), r.begin(), r.end(),
                        ptr_container_detail::fixed_length_sequence_tag() )
         { }
 
- ptr_circular_buffer& operator=( const ptr_circular_buffer& r )
+ ptr_circular_buffer& operator=( ptr_circular_buffer r )
         {
- ptr_circular_buffer clone( r );
- clone.swap( *this );
- return *this;
- }
-
- template< class U >
- ptr_circular_buffer& operator=( const ptr_circular_buffer<U>& r )
- {
- ptr_circular_buffer clone( r );
- clone.swap( *this );
+ this->swap( r );
             return *this;
         }
 

Modified: trunk/boost/ptr_container/ptr_list.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_list.hpp (original)
+++ trunk/boost/ptr_container/ptr_list.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -38,12 +38,14 @@
                                          CloneAllocator >
             base_class;
 
- typedef ptr_list<T,CloneAllocator,Allocator> this_type;
+ typedef ptr_list<T,CloneAllocator,Allocator> this_type;
         
     public:
         BOOST_PTR_CONTAINER_DEFINE_SEQEUENCE_MEMBERS( ptr_list,
                                                       base_class,
                                                       this_type )
+
+ typedef BOOST_DEDUCED_TYPENAME base_class::value_type value_type;
         
     public:
         using base_class::merge;
@@ -69,6 +71,20 @@
             this->base().sort( void_ptr_indirect_fun<Compare,T>( comp ) );
         }
 
+ template< class Pred >
+ void erase_if( iterator first, iterator last, Pred pred )
+ {
+ base_class::erase_if( first, last, pred );
+ }
+
+ template< class Pred >
+ void erase_if( Pred pred )
+ {
+ this->base().remove_if( BOOST_DEDUCED_TYPENAME base_class::
+ BOOST_NESTED_TEMPLATE void_ptr_delete_if<Pred,value_type>
+ (pred) );
+ }
+
     }; // class 'ptr_list'
 
     //////////////////////////////////////////////////////////////////////////////

Modified: trunk/boost/ptr_container/ptr_map.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_map.hpp (original)
+++ trunk/boost/ptr_container/ptr_map.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -67,10 +67,9 @@
         ptr_map( const ptr_map<Key,U>& r ) : base_type( r )
         { }
 
- template< class U >
- ptr_map& operator=( const ptr_map<Key,U>& r )
+ ptr_map& operator=( ptr_map r )
         {
- base_type::operator=( r );
+ this->swap( r );
             return *this;
         }
     };
@@ -123,10 +122,9 @@
         ptr_multimap( const ptr_multimap<Key,U>& r ) : base_type( r )
         { }
 
- template< class U >
- ptr_multimap& operator=( const ptr_multimap<Key,U>& r )
+ ptr_multimap& operator=( ptr_multimap r )
         {
- base_type::operator=( r );
+ this->swap( r );
             return *this;
         }
     };

Modified: trunk/boost/ptr_container/ptr_map_adapter.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_map_adapter.hpp (original)
+++ trunk/boost/ptr_container/ptr_map_adapter.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -476,13 +476,13 @@
             map_basic_clone_and_insert( first, last );
         }
                 
- explicit ptr_map_adapter( const ptr_map_adapter& r )
+ ptr_map_adapter( const ptr_map_adapter& r )
         {
             map_basic_clone_and_insert( r.begin(), r.end() );
         }
         
         template< class Key, class U, class CA, bool b >
- explicit ptr_map_adapter( const ptr_map_adapter<Key,U,CA,b>& r )
+ ptr_map_adapter( const ptr_map_adapter<Key,U,CA,b>& r )
         {
             map_basic_clone_and_insert( r.begin(), r.end() );
         }
@@ -491,18 +491,9 @@
         ptr_map_adapter( std::auto_ptr<U> r ) : base_type( r )
         { }
 
- ptr_map_adapter& operator=( const ptr_map_adapter& r )
+ ptr_map_adapter& operator=( ptr_map_adapter r )
         {
- ptr_map_adapter clone( r );
- this->swap( clone );
- return *this;
- }
-
- template< class Key, class U, class CA, bool b >
- ptr_map_adapter& operator=( const ptr_map_adapter<Key,U,CA,b>& r )
- {
- ptr_map_adapter clone( r );
- this->swap( clone );
+ this->swap( r );
             return *this;
         }
 
@@ -734,13 +725,13 @@
             map_basic_clone_and_insert( first, last );
         }
 
- explicit ptr_multimap_adapter( const ptr_multimap_adapter& r )
+ ptr_multimap_adapter( const ptr_multimap_adapter& r )
         {
             map_basic_clone_and_insert( r.begin(), r.end() );
         }
         
         template< class Key, class U, class CA, bool b >
- explicit ptr_multimap_adapter( const ptr_multimap_adapter<Key,U,CA,b>& r )
+ ptr_multimap_adapter( const ptr_multimap_adapter<Key,U,CA,b>& r )
         {
             map_basic_clone_and_insert( r.begin(), r.end() );
         }
@@ -749,21 +740,12 @@
         explicit ptr_multimap_adapter( std::auto_ptr<U> r ) : base_type( r )
         { }
 
- ptr_multimap_adapter& operator=( const ptr_multimap_adapter& r )
+ ptr_multimap_adapter& operator=( ptr_multimap_adapter r )
         {
- ptr_multimap_adapter clone( r );
- this->swap( clone );
+ this->swap( r );
             return *this;
         }
 
- template< class Key, class U, class CA, bool b >
- ptr_multimap_adapter& operator=( const ptr_multimap_adapter<Key,U,CA,b>& r )
- {
- ptr_multimap_adapter clone( r );
- this->swap( clone );
- return *this;
- }
-
         template< class U >
         ptr_multimap_adapter& operator=( std::auto_ptr<U> r )
         {

Modified: trunk/boost/ptr_container/ptr_sequence_adapter.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_sequence_adapter.hpp (original)
+++ trunk/boost/ptr_container/ptr_sequence_adapter.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -199,23 +199,23 @@
           : base_type( n, first, last, tag )
         { }
 
- explicit ptr_sequence_adapter( const ptr_sequence_adapter& r )
+ ptr_sequence_adapter( const ptr_sequence_adapter& r )
           : base_type( r )
         { }
         
         template< class U >
- explicit ptr_sequence_adapter( const ptr_sequence_adapter<U,VoidPtrSeq,CloneAllocator>& r )
+ ptr_sequence_adapter( const ptr_sequence_adapter<U,VoidPtrSeq,CloneAllocator>& r )
           : base_type( r )
         { }
         
- explicit ptr_sequence_adapter( const ptr_sequence_adapter& r,
- ptr_container_detail::fixed_length_sequence_tag tag )
+ ptr_sequence_adapter( const ptr_sequence_adapter& r,
+ ptr_container_detail::fixed_length_sequence_tag tag )
           : base_type( r, tag )
         { }
         
         template< class U >
- explicit ptr_sequence_adapter( const ptr_sequence_adapter<U,VoidPtrSeq,CloneAllocator>& r,
- ptr_container_detail::fixed_length_sequence_tag tag )
+ ptr_sequence_adapter( const ptr_sequence_adapter<U,VoidPtrSeq,CloneAllocator>& r,
+ ptr_container_detail::fixed_length_sequence_tag tag )
           : base_type( r, tag )
         { }
         
@@ -224,19 +224,12 @@
           : base_type( clone )
         { }
 
- ptr_sequence_adapter& operator=( const ptr_sequence_adapter& r )
+ ptr_sequence_adapter& operator=( const ptr_sequence_adapter r )
         {
- base_type::operator=( r );
+ this->swap( r );
             return *this;
         }
         
- template< class U >
- ptr_sequence_adapter& operator=( const ptr_sequence_adapter<U,VoidPtrSeq,CloneAllocator>& r )
- {
- base_type::operator=( r );
- return *this;
- }
-
         template< class PtrContainer >
         ptr_sequence_adapter& operator=( std::auto_ptr<PtrContainer> clone )
         {
@@ -634,6 +627,7 @@
             }
         };
 
+ protected:
         template< class Fun, class Arg1 >
         class void_ptr_delete_if
         {
@@ -659,9 +653,9 @@
             }
         };
 
+ private:
         void compact_and_erase_nulls( iterator first, iterator last ) // nothrow
         {
-
             typename base_type::ptr_iterator p = std::stable_partition(
                                                     first.base(),
                                                     last.base(),

Modified: trunk/boost/ptr_container/ptr_set.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_set.hpp (original)
+++ trunk/boost/ptr_container/ptr_set.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -65,6 +65,7 @@
         BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( ptr_set,
                                                       base_type,
                                                       this_type )
+
         BOOST_PTR_CONTAINER_DEFINE_COPY_CONSTRUCTORS( ptr_set, base_type )
                 
     };
@@ -113,8 +114,9 @@
         BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( ptr_multiset,
                                                       base_type,
                                                       this_type )
+
         BOOST_PTR_CONTAINER_DEFINE_COPY_CONSTRUCTORS( ptr_multiset,
- base_type );
+ base_type )
 
     };
 

Modified: trunk/boost/ptr_container/ptr_set_adapter.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_set_adapter.hpp (original)
+++ trunk/boost/ptr_container/ptr_set_adapter.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -158,11 +158,6 @@
          : base_type( hash, pred, a )
         { }
 
- template< class InputIterator >
- ptr_set_adapter_base( InputIterator first, InputIterator last )
- : base_type( first, last )
- { }
-
         template< class InputIterator, class Compare, class Allocator >
         ptr_set_adapter_base( InputIterator first, InputIterator last,
                               const Compare& comp,
@@ -179,11 +174,11 @@
         { }
                
         template< class U, class Set, class CA, bool b >
- explicit ptr_set_adapter_base( const ptr_set_adapter_base<U,Set,CA,b>& r )
+ ptr_set_adapter_base( const ptr_set_adapter_base<U,Set,CA,b>& r )
           : base_type( r )
         { }
 
- explicit ptr_set_adapter_base( const ptr_set_adapter_base& r )
+ ptr_set_adapter_base( const ptr_set_adapter_base& r )
           : base_type( r )
         { }
                 
@@ -191,11 +186,10 @@
         explicit ptr_set_adapter_base( std::auto_ptr<PtrContainer> clone )
          : base_type( clone )
         { }
-
- template< class U, class Set, class CA, bool b >
- ptr_set_adapter_base& operator=( const ptr_set_adapter_base<U,Set,CA,b>& r )
+
+ ptr_set_adapter_base& operator=( ptr_set_adapter_base r )
         {
- base_type::operator=( r );
+ this->swap( r );
             return *this;
         }
         

Modified: trunk/boost/ptr_container/ptr_unordered_map.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_unordered_map.hpp (original)
+++ trunk/boost/ptr_container/ptr_unordered_map.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -107,10 +107,9 @@
         ptr_unordered_map( const ptr_unordered_map<Key,U>& r ) : base_type( r )
         { }
 
- template< class U >
- ptr_unordered_map& operator=( const ptr_unordered_map<Key,U>& r )
+ ptr_unordered_map& operator=( ptr_unordered_map r )
         {
- base_type::operator=( r );
+ this->swap( r );
             return *this;
         }
     };
@@ -202,10 +201,9 @@
         ptr_unordered_multimap( const ptr_unordered_multimap<Key,U>& r ) : base_type( r )
         { }
 
- template< class U >
- ptr_unordered_multimap& operator=( const ptr_unordered_multimap<Key,U>& r )
+ ptr_unordered_multimap& operator=( ptr_unordered_multimap r )
         {
- base_type::operator=( r );
+ this->swap( r );
             return *this;
         }
     };

Modified: trunk/boost/ptr_container/ptr_unordered_set.hpp
==============================================================================
--- trunk/boost/ptr_container/ptr_unordered_set.hpp (original)
+++ trunk/boost/ptr_container/ptr_unordered_set.hpp 2008-06-12 09:47:32 EDT (Thu, 12 Jun 2008)
@@ -106,12 +106,13 @@
         BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( ptr_unordered_set,
                                                       base_type,
                                                       this_type )
- BOOST_PTR_CONTAINER_DEFINE_COPY_CONSTRUCTORS( ptr_unordered_set, base_type )
+
+ BOOST_PTR_CONTAINER_DEFINE_COPY_CONSTRUCTORS( ptr_unordered_set,
+ base_type )
                 
     };
         
         
-
     template
     <
         class Key,
@@ -193,7 +194,8 @@
 
         BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( ptr_unordered_multiset,
                                                       base_type,
- this_type )
+ this_type )
+
         BOOST_PTR_CONTAINER_DEFINE_COPY_CONSTRUCTORS( ptr_unordered_multiset,
                                                       base_type )
 


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