From 2fa9dd84c03ad7825f5ac90a4cd7ebb7322dfabd Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 18 Dec 2017 20:01:52 +0200 Subject: [PATCH] Remove trailing whitespace --- .../detail/associative_ptr_container.hpp | 4 +-- .../detail/reversible_ptr_container.hpp | 34 +++++++++---------- include/boost/ptr_container/ptr_array.hpp | 2 +- .../ptr_container/ptr_circular_buffer.hpp | 8 ++--- .../boost/ptr_container/ptr_map_adapter.hpp | 18 +++++----- .../ptr_container/ptr_sequence_adapter.hpp | 4 +-- .../boost/ptr_container/ptr_set_adapter.hpp | 8 ++--- test/associative_test_data.hpp | 2 +- 8 files changed, 40 insertions(+), 40 deletions(-) diff --git a/include/boost/ptr_container/detail/associative_ptr_container.hpp b/include/boost/ptr_container/detail/associative_ptr_container.hpp index adebd59..a170fb7 100644 --- a/include/boost/ptr_container/detail/associative_ptr_container.hpp +++ b/include/boost/ptr_container/detail/associative_ptr_container.hpp @@ -109,7 +109,7 @@ namespace ptr_container_detail : base_type( first, last, hash, pred, a ) { } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class PtrContainer > explicit associative_ptr_container( std::auto_ptr r ) : base_type( r ) @@ -131,7 +131,7 @@ namespace ptr_container_detail : base_type( r.begin(), r.end(), container_type() ) { } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class PtrContainer > associative_ptr_container& operator=( std::auto_ptr r ) // nothrow { diff --git a/include/boost/ptr_container/detail/reversible_ptr_container.hpp b/include/boost/ptr_container/detail/reversible_ptr_container.hpp index 83ff634..37cb9bb 100644 --- a/include/boost/ptr_container/detail/reversible_ptr_container.hpp +++ b/include/boost/ptr_container/detail/reversible_ptr_container.hpp @@ -352,18 +352,18 @@ namespace ptr_container_detail : c_( a ) { } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class PtrContainer > - explicit reversible_ptr_container( std::auto_ptr clone ) - { - swap( *clone ); + explicit reversible_ptr_container( std::auto_ptr clone ) + { + swap( *clone ); } #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class PtrContainer > - explicit reversible_ptr_container( std::unique_ptr clone ) - { - swap( *clone ); + explicit reversible_ptr_container( std::unique_ptr clone ) + { + swap( *clone ); } #endif @@ -378,7 +378,7 @@ namespace ptr_container_detail constructor_impl( r.begin(), r.end(), std::forward_iterator_tag() ); } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class PtrContainer > reversible_ptr_container& operator=( std::auto_ptr clone ) // nothrow { @@ -613,7 +613,7 @@ namespace ptr_container_detail return res; } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class U > iterator insert( iterator before, std::auto_ptr x ) { @@ -684,18 +684,18 @@ namespace ptr_container_detail return boost::ptr_container_detail::move( old ); } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class U > auto_type replace( iterator where, std::auto_ptr x ) { - return replace( where, x.release() ); + return replace( where, x.release() ); } #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class U > auto_type replace( iterator where, std::unique_ptr x ) { - return replace( where, x.release() ); + return replace( where, x.release() ); } #endif @@ -712,7 +712,7 @@ namespace ptr_container_detail return boost::ptr_container_detail::move( old ); } -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR template< class U > auto_type replace( size_type idx, std::auto_ptr x ) { @@ -742,7 +742,7 @@ namespace ptr_container_detail using base_type::release; #endif -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR #define BOOST_PTR_CONTAINER_COPY_AND_ASSIGN_AUTO( PC, base_type, this_type ) \ explicit PC( std::auto_ptr r ) \ : base_type ( r ) { } \ @@ -770,7 +770,7 @@ namespace ptr_container_detail #define BOOST_PTR_CONTAINER_COPY_AND_ASSIGN_UNIQUE( PC, base_type, this_type ) #endif -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR #define BOOST_PTR_CONTAINER_RELEASE_AND_CLONE( this_type ) \ std::auto_ptr release() \ { \ @@ -799,9 +799,9 @@ namespace ptr_container_detail #else #define BOOST_PTR_CONTAINER_RELEASE_AND_CLONE( this_type ) #endif - + // - // two-phase lookup of template functions + // two-phase lookup of template functions // is buggy on most compilers, so we use a macro instead // #define BOOST_PTR_CONTAINER_DEFINE_RELEASE_AND_CLONE( PC, base_type, this_type ) \ diff --git a/include/boost/ptr_container/ptr_array.hpp b/include/boost/ptr_container/ptr_array.hpp index b697c57..cf9d4d4 100644 --- a/include/boost/ptr_container/ptr_array.hpp +++ b/include/boost/ptr_container/ptr_array.hpp @@ -173,7 +173,7 @@ namespace boost for( size_t i = 0; i != N; ++i ) { if( !this->is_null(i) ) - pa.replace( i, pa.null_policy_allocate_clone( &(*this)[i] ) ); + pa.replace( i, pa.null_policy_allocate_clone( &(*this)[i] ) ); } } diff --git a/include/boost/ptr_container/ptr_circular_buffer.hpp b/include/boost/ptr_container/ptr_circular_buffer.hpp index 3bffc23..fa5b78d 100644 --- a/include/boost/ptr_container/ptr_circular_buffer.hpp +++ b/include/boost/ptr_container/ptr_circular_buffer.hpp @@ -305,14 +305,14 @@ namespace boost template< class U > void push_back( std::auto_ptr ptr ) // nothrow { - push_back( ptr.release() ); + push_back( ptr.release() ); } #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class U > void push_back( std::unique_ptr ptr ) // nothrow { - push_back( ptr.release() ); + push_back( ptr.release() ); } #endif @@ -331,14 +331,14 @@ namespace boost template< class U > void push_front( std::auto_ptr ptr ) // nothrow { - push_front( ptr.release() ); + push_front( ptr.release() ); } #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class U > void push_front( std::unique_ptr ptr ) // nothrow { - push_front( ptr.release() ); + push_front( ptr.release() ); } #endif diff --git a/include/boost/ptr_container/ptr_map_adapter.hpp b/include/boost/ptr_container/ptr_map_adapter.hpp index 24868a7..04caf87 100644 --- a/include/boost/ptr_container/ptr_map_adapter.hpp +++ b/include/boost/ptr_container/ptr_map_adapter.hpp @@ -267,12 +267,12 @@ namespace ptr_container_detail #ifndef BOOST_NO_AUTO_PTR template< class PtrContainer > - explicit ptr_map_adapter_base( std::auto_ptr clone ) + explicit ptr_map_adapter_base( std::auto_ptr clone ) : base_type( clone ) { } - + template< typename PtrContainer > - ptr_map_adapter_base& operator=( std::auto_ptr clone ) + ptr_map_adapter_base& operator=( std::auto_ptr clone ) { base_type::operator=( clone ); return *this; @@ -280,16 +280,16 @@ namespace ptr_container_detail #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class PtrContainer > - explicit ptr_map_adapter_base( std::unique_ptr clone ) + explicit ptr_map_adapter_base( std::unique_ptr clone ) : base_type( std::move( clone ) ) { } - + template< typename PtrContainer > - ptr_map_adapter_base& operator=( std::unique_ptr clone ) + ptr_map_adapter_base& operator=( std::unique_ptr clone ) { base_type::operator=( std::move( clone ) ); return *this; - } + } #endif iterator find( const key_type& x ) @@ -538,7 +538,7 @@ namespace ptr_container_detail #ifndef BOOST_NO_AUTO_PTR template< class U > ptr_map_adapter& operator=( std::auto_ptr r ) - { + { base_type::operator=( r ); return *this; } @@ -546,7 +546,7 @@ namespace ptr_container_detail #ifndef BOOST_NO_CXX11_SMART_PTR template< class U > ptr_map_adapter& operator=( std::unique_ptr r ) - { + { base_type::operator=( std::move( r ) ); return *this; } diff --git a/include/boost/ptr_container/ptr_sequence_adapter.hpp b/include/boost/ptr_container/ptr_sequence_adapter.hpp index 80e5620..bb7a4d9 100644 --- a/include/boost/ptr_container/ptr_sequence_adapter.hpp +++ b/include/boost/ptr_container/ptr_sequence_adapter.hpp @@ -246,7 +246,7 @@ namespace ptr_container_detail #ifndef BOOST_NO_AUTO_PTR template< class PtrContainer > - ptr_sequence_adapter& operator=( std::auto_ptr clone ) + ptr_sequence_adapter& operator=( std::auto_ptr clone ) { base_type::operator=( clone ); return *this; @@ -254,7 +254,7 @@ namespace ptr_container_detail #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class PtrContainer > - ptr_sequence_adapter& operator=( std::unique_ptr clone ) + ptr_sequence_adapter& operator=( std::unique_ptr clone ) { base_type::operator=( std::move( clone ) ); return *this; diff --git a/include/boost/ptr_container/ptr_set_adapter.hpp b/include/boost/ptr_container/ptr_set_adapter.hpp index 3ee2c01..c4d99d1 100644 --- a/include/boost/ptr_container/ptr_set_adapter.hpp +++ b/include/boost/ptr_container/ptr_set_adapter.hpp @@ -209,7 +209,7 @@ namespace ptr_container_detail #ifndef BOOST_NO_AUTO_PTR template< typename PtrContainer > - ptr_set_adapter_base& operator=( std::auto_ptr clone ) + ptr_set_adapter_base& operator=( std::auto_ptr clone ) { base_type::operator=( clone ); return *this; @@ -217,7 +217,7 @@ namespace ptr_container_detail #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< typename PtrContainer > - ptr_set_adapter_base& operator=( std::unique_ptr clone ) + ptr_set_adapter_base& operator=( std::unique_ptr clone ) { base_type::operator=( std::move( clone ) ); return *this; @@ -439,14 +439,14 @@ namespace ptr_container_detail #ifndef BOOST_NO_AUTO_PTR template< class T > - void operator=( std::auto_ptr r ) + void operator=( std::auto_ptr r ) { base_type::operator=( r ); } #endif #ifndef BOOST_NO_CXX11_SMART_PTR template< class T > - void operator=( std::unique_ptr r ) + void operator=( std::unique_ptr r ) { base_type::operator=( std::move( r ) ); } diff --git a/test/associative_test_data.hpp b/test/associative_test_data.hpp index 1a35fac..e636863 100644 --- a/test/associative_test_data.hpp +++ b/test/associative_test_data.hpp @@ -112,7 +112,7 @@ void ptr_set_test() T* t = new T; c.insert( c.end(), t ); c.insert( new T ); -#ifndef BOOST_NO_AUTO_PTR +#ifndef BOOST_NO_AUTO_PTR c.insert( c.end(), std::auto_ptr( new T ) ); std::auto_ptr ap( new T ); c.insert( ap );