From 97833f7d4af21c992583b650232af8a8c852064c Mon Sep 17 00:00:00 2001 From: khizmax Date: Tue, 23 Sep 2014 22:46:53 +0400 Subject: [PATCH] Remove CDS_RVALUE_SUPPORT, CDS_MOVE_SEMANTICS_SUPPORT macros and emulating code --- cds/compiler/clang/defs.h | 4 ---- cds/compiler/defs.h | 1 + cds/compiler/gcc/defs.h | 4 ---- cds/compiler/icl/defs.h | 4 ---- cds/compiler/vc/defs.h | 4 ---- cds/container/cuckoo_map.h | 2 -- cds/container/cuckoo_set.h | 2 -- cds/container/ellen_bintree_base.h | 2 -- cds/container/fcdeque.h | 8 -------- cds/container/fcpriority_queue.h | 4 ---- cds/container/fcqueue.h | 8 -------- cds/container/fcstack.h | 8 -------- cds/container/striped_map.h | 2 -- cds/container/striped_map/boost_flat_map.h | 2 -- cds/container/striped_map/boost_list.h | 4 ---- cds/container/striped_map/boost_map.h | 2 -- cds/container/striped_map/boost_slist.h | 4 ---- cds/container/striped_map/boost_unordered_map.h | 2 -- cds/container/striped_map/std_hash_map_std.h | 4 ---- cds/container/striped_map/std_hash_map_vc.h | 4 ---- cds/container/striped_map/std_list.h | 4 ---- cds/container/striped_map/std_map.h | 4 ---- cds/container/striped_set.h | 2 -- cds/container/striped_set/adapter.h | 12 ------------ cds/container/striped_set/boost_flat_set.h | 2 -- cds/container/striped_set/boost_list.h | 4 ---- cds/container/striped_set/boost_set.h | 2 -- cds/container/striped_set/boost_slist.h | 4 ---- cds/container/striped_set/boost_stable_vector.h | 4 ---- cds/container/striped_set/boost_unordered_set.h | 2 -- cds/container/striped_set/boost_vector.h | 4 ---- cds/container/striped_set/std_hash_set_std.h | 4 ---- cds/container/striped_set/std_hash_set_vc.h | 4 ---- cds/container/striped_set/std_list.h | 4 ---- cds/container/striped_set/std_set.h | 4 ---- cds/container/striped_set/std_vector.h | 4 ---- cds/details/defs.h | 4 +--- cds/details/marked_ptr.h | 2 +- cds/intrusive/cuckoo_set.h | 2 -- cds/intrusive/striped_set.h | 5 ++--- cds/intrusive/striped_set/resizing_policy.h | 8 ++------ cds/lock/array.h | 4 ---- cds/memory/michael/allocator.h | 4 ++-- cds/memory/pool_allocator.h | 9 +-------- cds/opt/hash.h | 4 ---- doxygen/cds.doxy | 2 -- tests/test-hdr/map/hdr_cuckoo_map.h | 2 -- tests/test-hdr/map/hdr_map.h | 2 -- tests/test-hdr/map/hdr_striped_map.h | 2 -- tests/test-hdr/set/hdr_cuckoo_set.h | 3 --- tests/test-hdr/set/hdr_set.h | 3 --- tests/test-hdr/set/hdr_striped_set.h | 3 --- tests/test-hdr/tree/hdr_ellenbintree_map.h | 2 -- tests/test-hdr/tree/hdr_intrusive_bintree.h | 4 ---- 54 files changed, 10 insertions(+), 194 deletions(-) diff --git a/cds/compiler/clang/defs.h b/cds/compiler/clang/defs.h index 4f724490..90757780 100644 --- a/cds/compiler/clang/defs.h +++ b/cds/compiler/clang/defs.h @@ -31,10 +31,6 @@ // Lambda #define CDS_CXX11_LAMBDA_SUPPORT -// RValue -#define CDS_RVALUE_SUPPORT -#define CDS_MOVE_SEMANTICS_SUPPORT - #define CDS_CONSTEXPR constexpr #define CDS_CONSTEXPR_CONST constexpr const diff --git a/cds/compiler/defs.h b/cds/compiler/defs.h index 227669a7..95290eae 100644 --- a/cds/compiler/defs.h +++ b/cds/compiler/defs.h @@ -5,6 +5,7 @@ /* Required C++11 features: + - move semantics [CDS_RVALUE_SUPPORT, CDS_MOVE_SEMANTICS_SUPPORT] - variadic template [CDS_CXX11_VARIADIC_TEMPLATE_SUPPORT] - template alias [CDS_CXX11_TEMPLATE_ALIAS_SUPPORT] - explicit conversion operator [CDS_CXX11_EXPLICIT_CONVERSION_OPERATOR_SUPPORT] diff --git a/cds/compiler/gcc/defs.h b/cds/compiler/gcc/defs.h index a739d3d3..de34765a 100644 --- a/cds/compiler/gcc/defs.h +++ b/cds/compiler/gcc/defs.h @@ -26,10 +26,6 @@ // *************************************** // C++11 features -// RValue -#define CDS_RVALUE_SUPPORT -#define CDS_MOVE_SEMANTICS_SUPPORT - // C++11 inline namespace #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT diff --git a/cds/compiler/icl/defs.h b/cds/compiler/icl/defs.h index 8094f321..50c7e490 100644 --- a/cds/compiler/icl/defs.h +++ b/cds/compiler/icl/defs.h @@ -87,10 +87,6 @@ // Lambda (ICL 12 +) #define CDS_CXX11_LAMBDA_SUPPORT -// RValue (ICL 10+) -#define CDS_RVALUE_SUPPORT -#define CDS_MOVE_SEMANTICS_SUPPORT - // C++11 inline namespace #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT diff --git a/cds/compiler/vc/defs.h b/cds/compiler/vc/defs.h index f359560a..84700abc 100644 --- a/cds/compiler/vc/defs.h +++ b/cds/compiler/vc/defs.h @@ -90,10 +90,6 @@ // Lambda (VC 10 +) #define CDS_CXX11_LAMBDA_SUPPORT -// RValue (VC 10+) -#define CDS_RVALUE_SUPPORT -#define CDS_MOVE_SEMANTICS_SUPPORT - // C++11 inline namespace //#define CDS_CXX11_INLINE_NAMESPACE_SUPPORT diff --git a/cds/container/cuckoo_map.h b/cds/container/cuckoo_map.h index 45c4b976..73b65873 100644 --- a/cds/container/cuckoo_map.h +++ b/cds/container/cuckoo_map.h @@ -499,7 +499,6 @@ namespace cds { namespace container { : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, h ) {} -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Constructs a map with given hash functor tuple (move semantics) /** The probe set size and threshold are set as default, see CuckooSet() @@ -523,7 +522,6 @@ namespace cds { namespace container { ) : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, std::forward(h) ) {} -# endif // ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Destructor clears the map ~CuckooMap() diff --git a/cds/container/cuckoo_set.h b/cds/container/cuckoo_set.h index c1ffe3d9..6b90d127 100644 --- a/cds/container/cuckoo_set.h +++ b/cds/container/cuckoo_set.h @@ -535,7 +535,6 @@ namespace cds { namespace container { : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, h ) {} -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Constructs the set object with given hash functor tuple (move semantics) /** The probe set size and threshold are set as default, see CuckooSet() @@ -559,7 +558,6 @@ namespace cds { namespace container { ) : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, std::forward(h) ) {} -# endif // ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Destructor clears the set ~CuckooSet() diff --git a/cds/container/ellen_bintree_base.h b/cds/container/ellen_bintree_base.h index cc99d3a2..6119780e 100644 --- a/cds/container/ellen_bintree_base.h +++ b/cds/container/ellen_bintree_base.h @@ -67,13 +67,11 @@ namespace cds { namespace container { : m_Value( args... ) {} -#ifdef CDS_RVALUE_SUPPORT /// Move constructor template node( Args&&... args) : m_Value( std::forward(args)... ) {} -#endif // CDS_RVALUE_SUPPORT }; /// EllenBinTreeMap leaf node diff --git a/cds/container/fcdeque.h b/cds/container/fcdeque.h index 452d7a51..39d0fc27 100644 --- a/cds/container/fcdeque.h +++ b/cds/container/fcdeque.h @@ -192,7 +192,6 @@ namespace cds { namespace container { return true; } -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Inserts a new element at the beginning of the deque container (move semantics) /** The function always returns \p true @@ -214,7 +213,6 @@ namespace cds { namespace container { m_FlatCombining.internal_statistics().onPushFrontMove(); return true; } -# endif /// Inserts a new element at the end of the deque container /** @@ -238,7 +236,6 @@ namespace cds { namespace container { return true; } -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Inserts a new element at the end of the deque container (move semantics) /** The function always returns \p true @@ -260,7 +257,6 @@ namespace cds { namespace container { m_FlatCombining.internal_statistics().onPushBackMove(); return true; } -# endif /// Removes the first element in the deque container /** @@ -366,22 +362,18 @@ namespace cds { namespace container { assert( pRec->pValPush ); m_Deque.push_front( *(pRec->pValPush) ); break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_push_front_move: assert( pRec->pValPush ); m_Deque.push_front( std::move( *(pRec->pValPush )) ); break; -# endif case op_push_back: assert( pRec->pValPush ); m_Deque.push_back( *(pRec->pValPush) ); break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_push_back_move: assert( pRec->pValPush ); m_Deque.push_back( std::move( *(pRec->pValPush )) ); break; -# endif case op_pop_front: assert( pRec->pValPop ); pRec->bEmpty = m_Deque.empty(); diff --git a/cds/container/fcpriority_queue.h b/cds/container/fcpriority_queue.h index 740b7c51..f2e18f34 100644 --- a/cds/container/fcpriority_queue.h +++ b/cds/container/fcpriority_queue.h @@ -167,7 +167,6 @@ namespace cds { namespace container { return true; } -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Inserts a new element in the priority queue (move semantics) /** The function always returns \p true @@ -186,7 +185,6 @@ namespace cds { namespace container { m_FlatCombining.internal_statistics().onPushMove(); return true; } -# endif /// Removes the top element from priority queue /** @@ -262,12 +260,10 @@ namespace cds { namespace container { assert( pRec->pValPush ); m_PQueue.push( *(pRec->pValPush) ); break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_push_move: assert( pRec->pValPush ); m_PQueue.push( std::move( *(pRec->pValPush )) ); break; -# endif case op_pop: assert( pRec->pValPop ); pRec->bEmpty = m_PQueue.empty(); diff --git a/cds/container/fcqueue.h b/cds/container/fcqueue.h index b9eb75b8..8b14a61a 100644 --- a/cds/container/fcqueue.h +++ b/cds/container/fcqueue.h @@ -184,7 +184,6 @@ namespace cds { namespace container { return enqueue( val ); } -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Inserts a new element at the end of the queue (move semantics) /** \p val is moved to inserted element @@ -211,7 +210,6 @@ namespace cds { namespace container { { return enqueue( val ); } -# endif /// Removes the next element from the queue /** @@ -298,12 +296,10 @@ namespace cds { namespace container { assert( pRec->pValEnq ); m_Queue.push( *(pRec->pValEnq ) ); break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_enq_move: assert( pRec->pValEnq ); m_Queue.push( std::move( *(pRec->pValEnq )) ); break; -# endif case op_deq: assert( pRec->pValDeq ); pRec->bEmpty = m_Queue.empty(); @@ -357,7 +353,6 @@ namespace cds { namespace container { goto collided; } break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_enq_move: if ( rec2.op() == op_deq ) { assert(rec1.pValEnq); @@ -367,13 +362,10 @@ namespace cds { namespace container { goto collided; } break; -# endif case op_deq: switch ( rec2.op() ) { case op_enq: -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_enq_move: -# endif return collide( rec2, rec1 ); } } diff --git a/cds/container/fcstack.h b/cds/container/fcstack.h index fb9cbbd5..2821c7b7 100644 --- a/cds/container/fcstack.h +++ b/cds/container/fcstack.h @@ -174,7 +174,6 @@ namespace cds { namespace container { return true; } -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Inserts a new element at the top of stack (move semantics) /** The content of the new element initialized to a copy of \p val. @@ -195,7 +194,6 @@ namespace cds { namespace container { m_FlatCombining.internal_statistics().onPushMove(); return true; } -# endif /// Removes the element on top of the stack /** @@ -277,12 +275,10 @@ namespace cds { namespace container { assert( pRec->pValPush ); m_Stack.push( *(pRec->pValPush ) ); break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_push_move: assert( pRec->pValPush ); m_Stack.push( std::move( *(pRec->pValPush )) ); break; -# endif case op_pop: assert( pRec->pValPop ); pRec->bEmpty = m_Stack.empty(); @@ -334,7 +330,6 @@ namespace cds { namespace container { goto collided; } break; -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_push_move: if ( rec2.op() == op_pop ) { assert(rec1.pValPush); @@ -344,13 +339,10 @@ namespace cds { namespace container { goto collided; } break; -# endif case op_pop: switch ( rec2.op() ) { case op_push: -# ifdef CDS_MOVE_SEMANTICS_SUPPORT case op_push_move: -# endif return collide( rec2, rec1 ); } } diff --git a/cds/container/striped_map.h b/cds/container/striped_map.h index 3bc41c8b..ec447233 100644 --- a/cds/container/striped_map.h +++ b/cds/container/striped_map.h @@ -601,7 +601,6 @@ namespace cds { namespace container { ) : base_class( nCapacity, resizingPolicy ) {} -#ifdef CDS_RVALUE_SUPPORT /// Ctor with resizing policy (move semantics) /** This constructor initializes m_ResizingPolicy member moving \p resizingPolicy parameter @@ -612,7 +611,6 @@ namespace cds { namespace container { ,resizing_policy&& resizingPolicy ///< Resizing policy ) : base_class( nCapacity, std::forward(resizingPolicy) ) {} -#endif /// Destructor destroys internal data ~StripedMap() diff --git a/cds/container/striped_map/boost_flat_map.h b/cds/container/striped_map/boost_flat_map.h index d16d89f2..50b98d5a 100644 --- a/cds/container/striped_map/boost_flat_map.h +++ b/cds/container/striped_map/boost_flat_map.h @@ -32,13 +32,11 @@ namespace cds { namespace container { : public details::boost_map_copy_policies >::swap_item_policy {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< boost::container::flat_map< Key, T, Traits, Alloc > > : public details::boost_map_copy_policies >::move_item_policy {}; -#endif } // namespace striped_set }} // namespace cds::container diff --git a/cds/container/striped_map/boost_list.h b/cds/container/striped_map/boost_list.h index df4c4d0f..10884098 100644 --- a/cds/container/striped_map/boost_list.h +++ b/cds/container/striped_map/boost_list.h @@ -48,7 +48,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< boost::container::list< std::pair< K const, T >, Alloc > > @@ -62,7 +61,6 @@ namespace cds { namespace container { list.insert( itInsert, std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds:container @@ -102,9 +100,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/container/striped_map/boost_map.h b/cds/container/striped_map/boost_map.h index 371cf9c7..e6d7956a 100644 --- a/cds/container/striped_map/boost_map.h +++ b/cds/container/striped_map/boost_map.h @@ -27,13 +27,11 @@ namespace cds { namespace container { : public details::boost_map_copy_policies >::swap_item_policy {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< boost::container::map< Key, T, Traits, Alloc > > : public details::boost_map_copy_policies >::move_item_policy {}; -#endif } // namespace striped_set }} // namespace cds::container diff --git a/cds/container/striped_map/boost_slist.h b/cds/container/striped_map/boost_slist.h index 52445979..e8722c23 100644 --- a/cds/container/striped_map/boost_slist.h +++ b/cds/container/striped_map/boost_slist.h @@ -47,7 +47,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< boost::container::slist< std::pair< K const, T >, Alloc > > @@ -61,7 +60,6 @@ namespace cds { namespace container { list.insert_after( itInsert, std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds:container @@ -101,9 +99,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; template diff --git a/cds/container/striped_map/boost_unordered_map.h b/cds/container/striped_map/boost_unordered_map.h index 05076e3b..b28de730 100644 --- a/cds/container/striped_map/boost_unordered_map.h +++ b/cds/container/striped_map/boost_unordered_map.h @@ -22,13 +22,11 @@ namespace cds { namespace container { : public details::boost_map_copy_policies >::swap_item_policy {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< boost::unordered_map< Key, T, Traits, Alloc > > : public details::boost_map_copy_policies >::move_item_policy {}; -#endif } // namespace striped_set }} // namespace cds::container diff --git a/cds/container/striped_map/std_hash_map_std.h b/cds/container/striped_map/std_hash_map_std.h index 404d1d9b..f12f6133 100644 --- a/cds/container/striped_map/std_hash_map_std.h +++ b/cds/container/striped_map/std_hash_map_std.h @@ -45,7 +45,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< std::unordered_map< Key, T, Hash, Pred, Alloc > > @@ -59,7 +58,6 @@ namespace cds { namespace container { map.insert( std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -97,9 +95,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; //@endcond diff --git a/cds/container/striped_map/std_hash_map_vc.h b/cds/container/striped_map/std_hash_map_vc.h index 34ede223..a9bebbac 100644 --- a/cds/container/striped_map/std_hash_map_vc.h +++ b/cds/container/striped_map/std_hash_map_vc.h @@ -46,7 +46,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< stdext::hash_map< Key, T, Traits, Alloc > > @@ -60,7 +59,6 @@ namespace cds { namespace container { map.insert( std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -98,9 +96,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; //@endcond diff --git a/cds/container/striped_map/std_list.h b/cds/container/striped_map/std_list.h index 8df61dcb..683c2d6f 100644 --- a/cds/container/striped_map/std_list.h +++ b/cds/container/striped_map/std_list.h @@ -43,7 +43,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< std::list< std::pair< K const, T >, Alloc > > @@ -57,7 +56,6 @@ namespace cds { namespace container { list.insert( itInsert, std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds:container @@ -98,9 +96,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/container/striped_map/std_map.h b/cds/container/striped_map/std_map.h index 728ebf08..294ec9e4 100644 --- a/cds/container/striped_map/std_map.h +++ b/cds/container/striped_map/std_map.h @@ -40,7 +40,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for map template struct move_item_policy< std::map< Key, T, Traits, Alloc > > @@ -54,7 +53,6 @@ namespace cds { namespace container { map.insert( std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -92,9 +90,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; //@endcond diff --git a/cds/container/striped_set.h b/cds/container/striped_set.h index 03b54640..7e338dfc 100644 --- a/cds/container/striped_set.h +++ b/cds/container/striped_set.h @@ -560,7 +560,6 @@ namespace cds { namespace container { ) : base_class( nCapacity, resizingPolicy ) {} -#ifdef CDS_RVALUE_SUPPORT /// Ctor with resizing policy (move semantics) /** This constructor initializes m_ResizingPolicy member moving \p resizingPolicy parameter @@ -571,7 +570,6 @@ namespace cds { namespace container { ,resizing_policy&& resizingPolicy ///< Resizing policy ) : base_class( nCapacity, std::forward(resizingPolicy) ) {} -#endif /// Destructor destroys internal data ~StripedSet() diff --git a/cds/container/striped_set/adapter.h b/cds/container/striped_set/adapter.h index 267305b3..6bd3927d 100644 --- a/cds/container/striped_set/adapter.h +++ b/cds/container/striped_set/adapter.h @@ -19,13 +19,9 @@ namespace cds { namespace container { template struct swap_item_policy; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT struct move_item ; // move_item_policy tag template struct move_item_policy; -#else - typedef copy_item move_item ; // if move semantics is not supported, move_item is synonym for copy_item -#endif //@endcond #ifdef CDS_DOXYGEN_INVOKED @@ -215,7 +211,6 @@ namespace cds { namespace container { typedef copy_item_policy swap_item_policy; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT struct move_item_policy { typedef Set set_type; @@ -226,7 +221,6 @@ namespace cds { namespace container { set.insert( std::move( *itWhat ) ); } }; -#endif }; template @@ -252,9 +246,7 @@ namespace cds { namespace container { >::copy_policy , cds::container::striped_set::copy_item, copy_item_policy , cds::container::striped_set::swap_item, swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, move_item_policy -#endif >::type copy_item; private: @@ -364,7 +356,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT struct move_item_policy { typedef Map map_type; typedef typename map_type::value_type pair_type; @@ -375,7 +366,6 @@ namespace cds { namespace container { map.insert( std::move( *itWhat ) ); } }; -#endif }; template @@ -403,9 +393,7 @@ namespace cds { namespace container { >::copy_policy , cds::container::striped_set::copy_item, copy_item_policy , cds::container::striped_set::swap_item, swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, move_item_policy -#endif >::type copy_item; private: diff --git a/cds/container/striped_set/boost_flat_set.h b/cds/container/striped_set/boost_flat_set.h index d1d88403..a00fc7e4 100644 --- a/cds/container/striped_set/boost_flat_set.h +++ b/cds/container/striped_set/boost_flat_set.h @@ -31,13 +31,11 @@ namespace cds { namespace container { : public details::boost_set_copy_policies< boost::container::flat_set< T, Traits, Alloc > >::swap_item_policy {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::container::flat_set template struct move_item_policy< boost::container::flat_set< T, Traits, Alloc > > : public details::boost_set_copy_policies< boost::container::flat_set< T, Traits, Alloc > >::move_item_policy {}; -#endif } // namespace striped_set }} // namespace cds::container diff --git a/cds/container/striped_set/boost_list.h b/cds/container/striped_set/boost_list.h index ffc661af..c72aad07 100644 --- a/cds/container/striped_set/boost_list.h +++ b/cds/container/striped_set/boost_list.h @@ -45,7 +45,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::container::list template struct move_item_policy< boost::container::list< T, Alloc > > @@ -58,7 +57,6 @@ namespace cds { namespace container { list.insert( itInsert, std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -96,9 +94,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/container/striped_set/boost_set.h b/cds/container/striped_set/boost_set.h index e26bf31f..c712fb2c 100644 --- a/cds/container/striped_set/boost_set.h +++ b/cds/container/striped_set/boost_set.h @@ -28,13 +28,11 @@ namespace cds { namespace container { // Swap policy is not defined for boost::container::set -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::container::set template struct move_item_policy< boost::container::set< T, Traits, Alloc > > : public details::boost_set_copy_policies< boost::container::set< T, Traits, Alloc > >::move_item_policy {}; -#endif } // namespace striped_set }} // namespace cds::container diff --git a/cds/container/striped_set/boost_slist.h b/cds/container/striped_set/boost_slist.h index fb8d65fc..3a390e5b 100644 --- a/cds/container/striped_set/boost_slist.h +++ b/cds/container/striped_set/boost_slist.h @@ -39,7 +39,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::container::slist template struct move_item_policy< boost::container::slist< T, Alloc > > @@ -52,7 +51,6 @@ namespace cds { namespace container { list.insert_after( itInsert, std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -91,9 +89,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; template diff --git a/cds/container/striped_set/boost_stable_vector.h b/cds/container/striped_set/boost_stable_vector.h index d83a55ab..a668ca92 100644 --- a/cds/container/striped_set/boost_stable_vector.h +++ b/cds/container/striped_set/boost_stable_vector.h @@ -46,7 +46,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::container::stable_vector template struct move_item_policy< boost::container::stable_vector< T, Alloc > > @@ -59,7 +58,6 @@ namespace cds { namespace container { vec.insert( itInsert, std::move( *itWhat )); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -97,9 +95,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/container/striped_set/boost_unordered_set.h b/cds/container/striped_set/boost_unordered_set.h index 5c9b98bc..24620878 100644 --- a/cds/container/striped_set/boost_unordered_set.h +++ b/cds/container/striped_set/boost_unordered_set.h @@ -21,13 +21,11 @@ namespace cds { namespace container { : public details::boost_set_copy_policies< boost::unordered_set< T, Traits, Alloc > >::swap_item_policy {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::unordered_set template struct move_item_policy< boost::unordered_set< T, Traits, Alloc > > : public details::boost_set_copy_policies< boost::unordered_set< T, Traits, Alloc > >::move_item_policy {}; -#endif } // namespace striped_set }} // namespace cds::container diff --git a/cds/container/striped_set/boost_vector.h b/cds/container/striped_set/boost_vector.h index 076bfd80..e4698776 100644 --- a/cds/container/striped_set/boost_vector.h +++ b/cds/container/striped_set/boost_vector.h @@ -46,7 +46,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for boost::container::vector template struct move_item_policy< boost::container::vector< T, Alloc > > @@ -59,7 +58,6 @@ namespace cds { namespace container { vec.insert( itInsert, std::move( *itWhat )); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -97,9 +95,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/container/striped_set/std_hash_set_std.h b/cds/container/striped_set/std_hash_set_std.h index c02d6dd5..fa4b6be0 100644 --- a/cds/container/striped_set/std_hash_set_std.h +++ b/cds/container/striped_set/std_hash_set_std.h @@ -31,7 +31,6 @@ namespace cds { namespace container { struct swap_item_policy< std::unordered_set< T, Hash, Pred, Alloc > >: public copy_item_policy< std::unordered_set< T, Hash, Pred, Alloc > > {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for std::unordered_set template struct move_item_policy< std::unordered_set< T, Hash, Pred, Alloc > > @@ -44,7 +43,6 @@ namespace cds { namespace container { set.insert( std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -80,9 +78,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy // not defined -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; //@endcond diff --git a/cds/container/striped_set/std_hash_set_vc.h b/cds/container/striped_set/std_hash_set_vc.h index 51f7d0b4..40b197f3 100644 --- a/cds/container/striped_set/std_hash_set_vc.h +++ b/cds/container/striped_set/std_hash_set_vc.h @@ -31,7 +31,6 @@ namespace cds { namespace container { struct swap_item_policy< stdext::hash_set< T, Traits, Alloc > >: public copy_item_policy< stdext::hash_set< T, Traits, Alloc > > {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for stdext::hash_set template struct move_item_policy< stdext::hash_set< T, Traits, Alloc > > @@ -44,7 +43,6 @@ namespace cds { namespace container { set.insert( std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -81,9 +79,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy // not defined -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; //@endcond diff --git a/cds/container/striped_set/std_list.h b/cds/container/striped_set/std_list.h index aa53fec0..c67270b7 100644 --- a/cds/container/striped_set/std_list.h +++ b/cds/container/striped_set/std_list.h @@ -40,7 +40,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for std::list template struct move_item_policy< std::list< T, Alloc > > @@ -53,7 +52,6 @@ namespace cds { namespace container { list.insert( itInsert, std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -92,9 +90,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/container/striped_set/std_set.h b/cds/container/striped_set/std_set.h index 96be8780..0df15cb7 100644 --- a/cds/container/striped_set/std_set.h +++ b/cds/container/striped_set/std_set.h @@ -27,7 +27,6 @@ namespace cds { namespace container { struct swap_item_policy< std::set< T, Traits, Alloc > >: public copy_item_policy< std::set< T, Traits, Alloc > > {}; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for std::set template struct move_item_policy< std::set< T, Traits, Alloc > > @@ -40,7 +39,6 @@ namespace cds { namespace container { set.insert( std::move( *itWhat ) ); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -76,9 +74,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; //@endcond diff --git a/cds/container/striped_set/std_vector.h b/cds/container/striped_set/std_vector.h index 37010e6f..39195693 100644 --- a/cds/container/striped_set/std_vector.h +++ b/cds/container/striped_set/std_vector.h @@ -41,7 +41,6 @@ namespace cds { namespace container { } }; -#ifdef CDS_MOVE_SEMANTICS_SUPPORT // Move policy for std::vector template struct move_item_policy< std::vector< T, Alloc > > @@ -54,7 +53,6 @@ namespace cds { namespace container { vec.insert( itInsert, std::move( *itWhat )); } }; -#endif } // namespace striped_set }} // namespace cds::container @@ -93,9 +91,7 @@ namespace cds { namespace intrusive { namespace striped_set { >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy -#ifdef CDS_MOVE_SEMANTICS_SUPPORT , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy -#endif >::type copy_item; struct find_predicate diff --git a/cds/details/defs.h b/cds/details/defs.h index 104b7ece..38340ae5 100644 --- a/cds/details/defs.h +++ b/cds/details/defs.h @@ -348,9 +348,7 @@ namespace cds {} # define CDS_NOEXCEPT_DEFAULTED_(expr) CDS_NOEXCEPT_( expr ) #endif -#if defined(CDS_MOVE_SEMANTICS_SUPPORT) -# define CDS_EMPLACE_SUPPORT -#endif +#define CDS_EMPLACE_SUPPORT #ifdef CDS_CXX11_INLINE_NAMESPACE_SUPPORT # define CDS_CXX11_INLINE_NAMESPACE inline diff --git a/cds/details/marked_ptr.h b/cds/details/marked_ptr.h index b38dec23..b8218a53 100644 --- a/cds/details/marked_ptr.h +++ b/cds/details/marked_ptr.h @@ -56,7 +56,7 @@ namespace cds { marked_ptr( marked_ptr const& src ) CDS_NOEXCEPT_DEFAULTED = default; /// Copy-assignment operator marked_ptr& operator =( marked_ptr const& p ) CDS_NOEXCEPT_DEFAULTED = default; -# if defined(CDS_MOVE_SEMANTICS_SUPPORT) && !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) +# if !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) //@cond marked_ptr( marked_ptr&& src ) CDS_NOEXCEPT_DEFAULTED = default; marked_ptr& operator =( marked_ptr&& p ) CDS_NOEXCEPT_DEFAULTED = default; diff --git a/cds/intrusive/cuckoo_set.h b/cds/intrusive/cuckoo_set.h index 89a9fd16..41af48ed 100644 --- a/cds/intrusive/cuckoo_set.h +++ b/cds/intrusive/cuckoo_set.h @@ -2327,7 +2327,6 @@ namespace cds { namespace intrusive { allocate_bucket_tables( nInitialSize ? cds::beans::ceil2( nInitialSize ) : c_nDefaultInitialSize ); } -# ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Constructs the set object with given hash functor tuple (move semantics) /** The probe set size and threshold are set as default, see CuckooSet() @@ -2367,7 +2366,6 @@ namespace cds { namespace intrusive { allocate_bucket_tables( nInitialSize ? cds::beans::ceil2( nInitialSize ) : c_nDefaultInitialSize ); } -# endif // ifdef CDS_MOVE_SEMANTICS_SUPPORT /// Destructor ~CuckooSet() diff --git a/cds/intrusive/striped_set.h b/cds/intrusive/striped_set.h index 54525ec7..0bf9cabc 100644 --- a/cds/intrusive/striped_set.h +++ b/cds/intrusive/striped_set.h @@ -456,11 +456,10 @@ namespace cds { namespace intrusive { alloc_bucket_table( m_nBucketMask + 1 ); } -#ifdef CDS_RVALUE_SUPPORT /// Ctor with resizing policy (move semantics) /** This constructor initializes m_ResizingPolicy member moving \p resizingPolicy parameter - Move semantics is used. Available only for the compilers that supports C++11 rvalue reference. + Move semantics is used. */ StripedSet( size_t nCapacity ///< Initial size of bucket table and lock array. Must be power of two, the minimum is 16. @@ -469,7 +468,7 @@ namespace cds { namespace intrusive { : m_Buckets( nullptr ) , m_nBucketMask( ( nCapacity ? calc_init_capacity(nCapacity) : c_nMinimalCapacity ) - 1 ) , m_MutexPolicy( m_nBucketMask + 1 ) - , m_ResizingPolicy( resizingPolicy ) + , m_ResizingPolicy( std::forward( resizingPolicy ) ) { alloc_bucket_table( m_nBucketMask + 1 ); } diff --git a/cds/intrusive/striped_set/resizing_policy.h b/cds/intrusive/striped_set/resizing_policy.h index 2ffdc33e..a82632e2 100644 --- a/cds/intrusive/striped_set/resizing_policy.h +++ b/cds/intrusive/striped_set/resizing_policy.h @@ -63,12 +63,10 @@ namespace cds { namespace intrusive { namespace striped_set { : m_nLoadFactor( src.m_nLoadFactor ) {} -# ifdef CDS_RVALUE_SUPPORT - /// Move ctor (for the compilers supporting rvalue reference) + /// Move ctor load_factor_resizing( load_factor_resizing&& src ) : m_nLoadFactor( src.m_nLoadFactor ) {} -# endif /// Main policy operator returns \p true when resizing is needed template @@ -137,12 +135,10 @@ namespace cds { namespace intrusive { namespace striped_set { : m_nThreshold( src.m_nThreshold ) {} -# ifdef CDS_RVALUE_SUPPORT - /// Move ctor (for the compilers supporting rvalue reference) + /// Move ctor single_bucket_size_threshold( single_bucket_size_threshold&& src ) : m_nThreshold( src.m_nThreshold ) {} -# endif /// Main policy operator returns \p true when resizing is needed template diff --git a/cds/lock/array.h b/cds/lock/array.h index 7a62c033..dabcaba3 100644 --- a/cds/lock/array.h +++ b/cds/lock/array.h @@ -66,12 +66,10 @@ namespace cds { namespace lock { : m_nMask( src.m_nMask ) {} -# ifdef CDS_RVALUE_SUPPORT /// Move constructor pow2_select_policy( pow2_select_policy&& src ) : m_nMask( src.m_nMask ) {} -# endif /// Returns nWhat & (nPow2 - 1) size_t operator()( size_t nWhat, size_t ) const @@ -181,7 +179,6 @@ namespace cds { namespace lock { m_arrLocks = create_lock_array( m_nCapacity ); } -# ifdef CDS_RVALUE_SUPPORT /// Constructs array of lock and move cell selection policy /** Allocates the array and initializes all locks as unlocked. @@ -196,7 +193,6 @@ namespace cds { namespace lock { { m_arrLocks = create_lock_array( m_nCapacity ); } -# endif /// Destructs array of locks and frees used memory ~array() diff --git a/cds/memory/michael/allocator.h b/cds/memory/michael/allocator.h index d25fa5ff..8681913a 100644 --- a/cds/memory/michael/allocator.h +++ b/cds/memory/michael/allocator.h @@ -970,7 +970,7 @@ namespace michael { active_tag( active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default; ~active_tag() CDS_NOEXCEPT_DEFAULTED = default; active_tag& operator=(active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default; -# if defined(CDS_MOVE_SEMANTICS_SUPPORT) && !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) +# if !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) active_tag( active_tag&& ) CDS_NOEXCEPT_DEFAULTED = default; active_tag& operator=(active_tag&&) CDS_NOEXCEPT_DEFAULTED = default; # endif @@ -1029,7 +1029,7 @@ namespace michael { active_tag( active_tag const& ) CDS_NOEXCEPT_DEFAULTED = default; ~active_tag() CDS_NOEXCEPT_DEFAULTED = default; active_tag& operator=(active_tag const&) CDS_NOEXCEPT_DEFAULTED = default; -# if defined(CDS_MOVE_SEMANTICS_SUPPORT) && !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) +# if !defined(CDS_DISABLE_DEFAULT_MOVE_CTOR) active_tag( active_tag&& ) CDS_NOEXCEPT_DEFAULTED = default; active_tag& operator=(active_tag&&) CDS_NOEXCEPT_DEFAULTED = default; # endif diff --git a/cds/memory/pool_allocator.h b/cds/memory/pool_allocator.h index c09955f9..c7aaadfa 100644 --- a/cds/memory/pool_allocator.h +++ b/cds/memory/pool_allocator.h @@ -102,19 +102,12 @@ namespace cds { namespace memory { return size_t(-1) / sizeof(value_type); } -# if defined(CDS_MOVE_SEMANTICS_SUPPORT) template void construct(U* p, Args&&... args) { new((void *)p) U( std::forward(args)...); } -# else - template - void construct(pointer p, Arg const& val ) - { - new((void *) p) value_type(val); - } -# endif + template void destroy(U* p) { diff --git a/cds/opt/hash.h b/cds/opt/hash.h index 2b460b56..18fe4bbb 100644 --- a/cds/opt/hash.h +++ b/cds/opt/hash.h @@ -81,11 +81,9 @@ namespace cds { namespace opt { hash_list( hash_tuple_type const& t) : hash_tuple( t ) {} -# ifdef CDS_MOVE_SEMANTICS_SUPPORT hash_list( hash_tuple_type&& t) : hash_tuple( std::forward(t) ) {} -# endif template typename std::enable_if< (I == sizeof...(Functors)) >::type apply( size_t * dest, T const& v ) const @@ -150,11 +148,9 @@ namespace cds { namespace opt { hash_list_wrapper( hash_tuple_type const& t) : m_wrappedList( t ) {} -# ifdef CDS_MOVE_SEMANTICS_SUPPORT hash_list_wrapper( hash_tuple_type&& t) : m_wrappedList( std::forward(t) ) {} -# endif void operator()( size_t * dest, wrapped_type const& what ) const { diff --git a/doxygen/cds.doxy b/doxygen/cds.doxy index fc59f713..066ccd04 100644 --- a/doxygen/cds.doxy +++ b/doxygen/cds.doxy @@ -1399,8 +1399,6 @@ PREDEFINED = CDS_BUILD_BITS=32 \ CDS_CXX11_INLINE_NAMESPACE_SUPPORT \ CDS_CXX11_INLINE_NAMESPACE=inline \ CDS_CXX11_DECLTYPE_SUPPORT \ - CDS_RVALUE_SUPPORT \ - CDS_MOVE_SEMANTICS_SUPPORT \ CDS_NOEXCEPT=noexcept() \ CDS_CONSTEXPR=constexpr \ CDS_ATOMIC=std \ diff --git a/tests/test-hdr/map/hdr_cuckoo_map.h b/tests/test-hdr/map/hdr_cuckoo_map.h index 71c09676..c88f1dac 100644 --- a/tests/test-hdr/map/hdr_cuckoo_map.h +++ b/tests/test-hdr/map/hdr_cuckoo_map.h @@ -34,7 +34,6 @@ namespace map { : m_val( n ) {} -#ifdef CDS_MOVE_SEMANTICS_SUPPORT value_type( value_type&& v ) : m_val( v.m_val ) {} @@ -48,7 +47,6 @@ namespace map { m_val = v.m_val; return *this; } -#endif }; typedef std::pair pair_type; diff --git a/tests/test-hdr/map/hdr_map.h b/tests/test-hdr/map/hdr_map.h index e48d3127..34fd8c42 100644 --- a/tests/test-hdr/map/hdr_map.h +++ b/tests/test-hdr/map/hdr_map.h @@ -35,7 +35,6 @@ namespace map { : m_val( n ) {} -#ifdef CDS_MOVE_SEMANTICS_SUPPORT value_type( value_type&& v ) : m_val( v.m_val ) {} @@ -49,7 +48,6 @@ namespace map { m_val = v.m_val; return *this; } -#endif }; typedef std::pair pair_type; diff --git a/tests/test-hdr/map/hdr_striped_map.h b/tests/test-hdr/map/hdr_striped_map.h index 2a65fa00..41c2c8c3 100644 --- a/tests/test-hdr/map/hdr_striped_map.h +++ b/tests/test-hdr/map/hdr_striped_map.h @@ -34,7 +34,6 @@ namespace map { : m_val( n ) {} -#ifdef CDS_MOVE_SEMANTICS_SUPPORT value_type( value_type&& v ) : m_val( v.m_val ) {} @@ -48,7 +47,6 @@ namespace map { m_val = v.m_val; return *this; } -#endif }; typedef std::pair pair_type; diff --git a/tests/test-hdr/set/hdr_cuckoo_set.h b/tests/test-hdr/set/hdr_cuckoo_set.h index f58f9f2e..bc8989c8 100644 --- a/tests/test-hdr/set/hdr_cuckoo_set.h +++ b/tests/test-hdr/set/hdr_cuckoo_set.h @@ -83,13 +83,10 @@ namespace set { return *this; } - -#ifdef CDS_MOVE_SEMANTICS_SUPPORT item( item&& i ) : nKey( i.nKey ) , nVal( i.nVal ) {} -#endif int key() const { diff --git a/tests/test-hdr/set/hdr_set.h b/tests/test-hdr/set/hdr_set.h index fc1e2ed2..5fd92b31 100644 --- a/tests/test-hdr/set/hdr_set.h +++ b/tests/test-hdr/set/hdr_set.h @@ -83,8 +83,6 @@ namespace set { return *this; } - -#ifdef CDS_MOVE_SEMANTICS_SUPPORT item( item&& i ) : nKey( i.nKey ) , nVal( i.nVal ) @@ -96,7 +94,6 @@ namespace set { // nVal = i.nVal; // return *this; //} -#endif int key() const { diff --git a/tests/test-hdr/set/hdr_striped_set.h b/tests/test-hdr/set/hdr_striped_set.h index 70e201a8..b76f18c8 100644 --- a/tests/test-hdr/set/hdr_striped_set.h +++ b/tests/test-hdr/set/hdr_striped_set.h @@ -83,8 +83,6 @@ namespace set { return *this; } - -#ifdef CDS_MOVE_SEMANTICS_SUPPORT item( item&& i ) : nKey( i.nKey ) , nVal( i.nVal ) @@ -96,7 +94,6 @@ namespace set { // nVal = i.nVal; // return *this; //} -#endif int key() const { diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map.h b/tests/test-hdr/tree/hdr_ellenbintree_map.h index da48bcd5..4105170f 100644 --- a/tests/test-hdr/tree/hdr_ellenbintree_map.h +++ b/tests/test-hdr/tree/hdr_ellenbintree_map.h @@ -50,11 +50,9 @@ namespace tree { : nVal( v.nVal ) {} -#ifdef CDS_MOVE_SEMANTICS_SUPPORT value_type( value_type&& v ) : nVal( v.nVal ) {} -#endif value_type& operator=( int n ) { diff --git a/tests/test-hdr/tree/hdr_intrusive_bintree.h b/tests/test-hdr/tree/hdr_intrusive_bintree.h index 67e56f9b..32ce3b1f 100644 --- a/tests/test-hdr/tree/hdr_intrusive_bintree.h +++ b/tests/test-hdr/tree/hdr_intrusive_bintree.h @@ -57,13 +57,11 @@ namespace tree { {} # ifdef _DEBUG -# ifdef CDS_MOVE_SEMANTICS_SUPPORT base_hook_value( base_hook_value&& s ) : Hook() , nKey(s.nKey) , nValue(s.nValue) {} -# endif base_hook_value& operator=( base_hook_value const& s ) { nKey = s.nKey; @@ -94,13 +92,11 @@ namespace tree { , nValue(val) {} # ifdef _DEBUG -# ifdef CDS_MOVE_SEMANTICS_SUPPORT member_hook_value( member_hook_value&& s ) : nKey(s.nKey) , nValue(s.nValue) , hook() {} -# endif member_hook_value& operator=( member_hook_value const& s ) { nKey = s.nKey; -- 2.34.1