Remove CDS_RVALUE_SUPPORT, CDS_MOVE_SEMANTICS_SUPPORT macros and emulating code
authorkhizmax <libcds.dev@gmail.com>
Tue, 23 Sep 2014 18:46:53 +0000 (22:46 +0400)
committerkhizmax <libcds.dev@gmail.com>
Tue, 23 Sep 2014 18:46:53 +0000 (22:46 +0400)
54 files changed:
cds/compiler/clang/defs.h
cds/compiler/defs.h
cds/compiler/gcc/defs.h
cds/compiler/icl/defs.h
cds/compiler/vc/defs.h
cds/container/cuckoo_map.h
cds/container/cuckoo_set.h
cds/container/ellen_bintree_base.h
cds/container/fcdeque.h
cds/container/fcpriority_queue.h
cds/container/fcqueue.h
cds/container/fcstack.h
cds/container/striped_map.h
cds/container/striped_map/boost_flat_map.h
cds/container/striped_map/boost_list.h
cds/container/striped_map/boost_map.h
cds/container/striped_map/boost_slist.h
cds/container/striped_map/boost_unordered_map.h
cds/container/striped_map/std_hash_map_std.h
cds/container/striped_map/std_hash_map_vc.h
cds/container/striped_map/std_list.h
cds/container/striped_map/std_map.h
cds/container/striped_set.h
cds/container/striped_set/adapter.h
cds/container/striped_set/boost_flat_set.h
cds/container/striped_set/boost_list.h
cds/container/striped_set/boost_set.h
cds/container/striped_set/boost_slist.h
cds/container/striped_set/boost_stable_vector.h
cds/container/striped_set/boost_unordered_set.h
cds/container/striped_set/boost_vector.h
cds/container/striped_set/std_hash_set_std.h
cds/container/striped_set/std_hash_set_vc.h
cds/container/striped_set/std_list.h
cds/container/striped_set/std_set.h
cds/container/striped_set/std_vector.h
cds/details/defs.h
cds/details/marked_ptr.h
cds/intrusive/cuckoo_set.h
cds/intrusive/striped_set.h
cds/intrusive/striped_set/resizing_policy.h
cds/lock/array.h
cds/memory/michael/allocator.h
cds/memory/pool_allocator.h
cds/opt/hash.h
doxygen/cds.doxy
tests/test-hdr/map/hdr_cuckoo_map.h
tests/test-hdr/map/hdr_map.h
tests/test-hdr/map/hdr_striped_map.h
tests/test-hdr/set/hdr_cuckoo_set.h
tests/test-hdr/set/hdr_set.h
tests/test-hdr/set/hdr_striped_set.h
tests/test-hdr/tree/hdr_ellenbintree_map.h
tests/test-hdr/tree/hdr_intrusive_bintree.h

index 4f7244904e13e954480e1d4ed1cbafb3f9dc2888..907577804942dd713769e4e4366e939f16d3cb7c 100644 (file)
 // 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
 
index 227669a75e1531815e8137954b0953ccff543b98..95290eae31311688eaa3d2a2a5de6dcf63621aad 100644 (file)
@@ -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]
index a739d3d396208613714a9b2065f56df5f06f20d1..de34765a6c55a9a067ba9d44d82c26de9333d0cb 100644 (file)
 // ***************************************
 // C++11 features
 
-// RValue
-#define CDS_RVALUE_SUPPORT
-#define CDS_MOVE_SEMANTICS_SUPPORT
-
 // C++11 inline namespace
 #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
 
index 8094f321ef882ddf48ab95442b192e1c7c183316..50c7e490e441abd1d7fe21bc98c65c5c28906827 100644 (file)
 // 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
 
index f359560a85fb7d294843ec77c92f2810c8fc581d..84700abc53579bb7da09983c7bb420d63d431464 100644 (file)
 // 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
 
index 45c4b9767fa4c2ccaaf27a617ccc230e54e94bd8..73b65873e8a04fc84aa0e162a9e0e8d213d8bddb 100644 (file)
@@ -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<hash_tuple_type>(h) )
         {}
-#   endif   // ifdef CDS_MOVE_SEMANTICS_SUPPORT
 
         /// Destructor clears the map
         ~CuckooMap()
index c1ffe3d995058a1dcdf3ec99060732adeaf9989a..6b90d127f95b8ea368dec69cdcb43bac427cfe2a 100644 (file)
@@ -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<hash_tuple_type>(h) )
         {}
-#   endif   // ifdef CDS_MOVE_SEMANTICS_SUPPORT
 
         /// Destructor clears the set
         ~CuckooSet()
index cc99d3a234226b0a73afe078d8d20a8260e68d51..6119780ef68a3b86b06c412be2e2f68f1f068b12 100644 (file)
@@ -67,13 +67,11 @@ namespace cds { namespace container {
                 : m_Value( args... )
             {}
 
-#ifdef CDS_RVALUE_SUPPORT
             /// Move constructor
             template <typename... Args>
             node( Args&&... args)
                 : m_Value( std::forward<Args>(args)... )
             {}
-#endif  // CDS_RVALUE_SUPPORT
         };
 
         /// EllenBinTreeMap leaf node
index 452d7a5116da73ec041e07ed83da47b39df37087..39d0fc275beb14dae9b18d1b3f422741634e93a7 100644 (file)
@@ -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();
index 740b7c510986d7f484374ee8a532ec223070df0e..f2e18f34f9d52674d9692693b47b807ecd05ff18 100644 (file)
@@ -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();
index b9eb75b80038621a0ef7429ec380edb13fede296..8b14a61a44b13b1fc8bf61a9f60320944e6c1d22 100644 (file)
@@ -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 );
                     }
             }
index fb9cbbd51f25e9f1c51996ef02200e177a3eec7c..2821c7b71c5d15b422082ed8c14581b62a38579e 100644 (file)
@@ -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 );
                     }
             }
index 3bc41c8b3df1f55142e4b460d1b2cf59f6711a1b..ec4472337b3158fea175628fcd091906f7b37517 100644 (file)
@@ -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<resizing_policy>(resizingPolicy) )
         {}
-#endif
 
         /// Destructor destroys internal data
         ~StripedMap()
index d16d89f20b8cf784b40c0ebf4f0fc1267d978880..50b98d5aa952899128c703a29c4f64d70d6588a9 100644 (file)
@@ -32,13 +32,11 @@ namespace cds { namespace container {
             : public details::boost_map_copy_policies<boost::container::flat_map< Key, T, Traits, Alloc > >::swap_item_policy
         {};
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename Key, typename T, typename Traits, typename Alloc>
         struct move_item_policy< boost::container::flat_map< Key, T, Traits, Alloc > >
             : public details::boost_map_copy_policies<boost::container::flat_map< Key, T, Traits, Alloc > >::move_item_policy
         {};
-#endif
     }   // namespace striped_set
 }} // namespace cds::container
 
index df4c4d0faf972fd7a08cf08af704b8ed5d56bcfa..10884098e7e5e2b163f1844c9073b7d4af2753f3 100644 (file)
@@ -48,7 +48,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename K, typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index 371cf9c792b8c3986557cf5725ad0fb23d91cb4e..e6d7956add0f024a534ba8e0865dfadb52bff839 100644 (file)
@@ -27,13 +27,11 @@ namespace cds { namespace container {
             : public details::boost_map_copy_policies<boost::container::map< Key, T, Traits, Alloc > >::swap_item_policy
         {};
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename Key, typename T, typename Traits, typename Alloc>
         struct move_item_policy< boost::container::map< Key, T, Traits, Alloc > >
             : public details::boost_map_copy_policies<boost::container::map< Key, T, Traits, Alloc > >::move_item_policy
         {};
-#endif
     }   // namespace striped_set
 }} // namespace cds::container
 
index 52445979d3f1572c8b97886170d6adab8c758887..e8722c23cdc0763273e4395da3bcd388d2c68a41 100644 (file)
@@ -47,7 +47,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename K, typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             template <typename Q>
index 05076e3bf445bca22ef0b85bfe69b8185b1abb5e..b28de730c06cd8e7466b6a97fd5561bc191799c1 100644 (file)
@@ -22,13 +22,11 @@ namespace cds { namespace container {
             : public details::boost_map_copy_policies<boost::unordered_map< Key, T, Traits, Alloc > >::swap_item_policy
         {};
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename Key, typename T, typename Traits, typename Alloc>
         struct move_item_policy< boost::unordered_map< Key, T, Traits, Alloc > >
             : public details::boost_map_copy_policies<boost::unordered_map< Key, T, Traits, Alloc > >::move_item_policy
         {};
-#endif
     }   // namespace striped_set
 }} // namespace cds::container
 
index 404d1d9b76a3809a0dabb9af468bc4fd8a33266c..f12f6133e00a054168a6ee3a16d65e24de89ee3c 100644 (file)
@@ -45,7 +45,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename Key, typename T, typename Hash, typename Pred, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
             //@endcond
 
index 34ede22315a58be14172cf96e47a258bca7ffa1a..a9bebbac71b8273fedd4333f50b94b245737b231 100644 (file)
@@ -46,7 +46,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename Key, typename T, typename Traits, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
             //@endcond
 
index 8df61dcb18d2b67263ec59603ed1d764cad2c252..683c2d6f63415a087172143b8663d11cbfe18a6c 100644 (file)
@@ -43,7 +43,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename K, typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index 728ebf08d7f2b1d4f46e5dfdec68ea2236212273..294ec9e413e74f6bce115986bbd9e7ed5aaff9db 100644 (file)
@@ -40,7 +40,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for map
         template <typename Key, typename T, typename Traits, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
             //@endcond
 
index 03b5464060cec83f07ac5747f8143227e48b6d62..7e338dfc661fd8e6850628d7ebe26a3837274b3d 100644 (file)
@@ -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<resizing_policy>(resizingPolicy) )
         {}
-#endif
 
         /// Destructor destroys internal data
         ~StripedSet()
index 267305b3dd55664c84e6d7b0232289dfdc22917f..6bd3927d297797980885faaabf6152132b59ecfb 100644 (file)
@@ -19,13 +19,9 @@ namespace cds { namespace container {
         template <typename Container>
         struct swap_item_policy;
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         struct move_item    ;   // move_item_policy tag
         template <typename Container>
         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 <class Set, CDS_SPEC_OPTIONS>
@@ -252,9 +246,7 @@ namespace cds { namespace container {
                     >::copy_policy
                     , cds::container::striped_set::copy_item, copy_item_policy<container_type>
                     , cds::container::striped_set::swap_item, swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                     , cds::container::striped_set::move_item, move_item_policy<container_type>
-#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 <class Map, CDS_SPEC_OPTIONS>
@@ -403,9 +393,7 @@ namespace cds { namespace container {
                     >::copy_policy
                     , cds::container::striped_set::copy_item, copy_item_policy<container_type>
                     , cds::container::striped_set::swap_item, swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                     , cds::container::striped_set::move_item, move_item_policy<container_type>
-#endif
                 >::type copy_item;
 
             private:
index d1d88403c91aa863bc8eccb5b9057c8e3679e625..a00fc7e4ab3862e966cc9086340789468eefd0f6 100644 (file)
@@ -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 <typename T, typename Traits, typename Alloc>
         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
index ffc661afaad199fbd91687a57f536dfa5af53d12..c72aad0742a277710e2807e703e5bf806151ee56 100644 (file)
@@ -45,7 +45,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for boost::container::list
         template <typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index e26bf31f094c735071811635bd02a6750c8d26a5..c712fb2cf12c5712f23b58f87b59e42d6885e6b0 100644 (file)
@@ -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 <typename T, typename Traits, typename Alloc>
         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
index fb8d65fcb4c5413191b8dbee7b37a1c0678be710..3a390e5bb75d093e82165a81dde4143f679fe5c8 100644 (file)
@@ -39,7 +39,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for boost::container::slist
         template <typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             template <typename Q>
index d83a55aba7aefa0425ac9f4c56a2e12e345ec3c5..a668ca92c7f526dfb0efa4094a8bb82488195e28 100644 (file)
@@ -46,7 +46,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for boost::container::stable_vector
         template <typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index 5c9b98bc82687d4f48b3804351e853dfb17f536d..246208786637712935762aa861fa6b4b787b1409 100644 (file)
@@ -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 <typename T, typename Traits, typename Alloc>
         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
 
index 076bfd805ce2fbb7cc814803ffe963e35989bb1b..e4698776cc8f4c2610afa9baceb7b8d50146cdc0 100644 (file)
@@ -46,7 +46,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for boost::container::vector
         template <typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index c02d6dd57597f5a3e963934b670c61760a14627c..fa4b6be06fef49e2425d538e9919e686cf2bc600 100644 (file)
@@ -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 <typename T, typename Hash, typename Pred, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type> // not defined
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
             //@endcond
 
index 51f7d0b42124da670003a17154df1ed9e3af9e8f..40b197f38bcb788674119743229f39dec9e09ac2 100644 (file)
@@ -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 <typename T, typename Hash, typename Pred, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type> // not defined
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
             //@endcond
 
index aa53fec047de24404e774434db65003d4a00eded..c67270b7b15544ccb055bf984aeaf67838b38368 100644 (file)
@@ -40,7 +40,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for std::list
         template <typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index 96be8780d2982ade9e0ee356f3d05d5bec01c520..0df15cb723dc7a1833af9690f3667d27814ef685 100644 (file)
@@ -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 <typename T, typename Traits, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
             //@endcond
 
index 37010e6fecf6d698ff091aa06c8573da65bec8e3..391956933971515927997d78afbe01223b192e55 100644 (file)
@@ -41,7 +41,6 @@ namespace cds { namespace container {
             }
         };
 
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
         // Move policy for std::vector
         template <typename T, typename Alloc>
         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<container_type>
                 , cds::container::striped_set::swap_item, cds::container::striped_set::swap_item_policy<container_type>
-#ifdef CDS_MOVE_SEMANTICS_SUPPORT
                 , cds::container::striped_set::move_item, cds::container::striped_set::move_item_policy<container_type>
-#endif
             >::type copy_item;
 
             struct find_predicate
index 104b7eceeb23f12c7f163342ff97fd7903b9afd1..38340ae59df29f2d14de155e921ec087ddd94eb5 100644 (file)
@@ -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
index b38dec23c8f0b913d664616b493d69b7ee576698..b8218a530096848a52b0086d6c9604fbf3c38f88 100644 (file)
@@ -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;
index 89a9fd167bd3718143bfe679197d05001d427f94..41af48ed4c188ccd0ef1134afdf33c49a138fbdb 100644 (file)
@@ -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()
index 54525ec7b688a80366323bfa115df878983cd981..0bf9cabc81be7253b530ff251532079276d6bdd6 100644 (file)
@@ -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<resizing_policy>( resizingPolicy ) )
         {
             alloc_bucket_table( m_nBucketMask + 1 );
         }
index 2ffdc33ef1df755f9c594bcdfeaa053e4d2c4d65..a82632e248170b63eb5c3172d6f0fd9453a8058b 100644 (file)
@@ -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 <typename Container, typename Bucket>
@@ -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 <typename Container, typename Bucket>
index 7a62c0333ee84bf5b0da9c3fd77c5b210af81573..dabcaba34c14a9a8703c6e892877ab7597439ed3 100644 (file)
@@ -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 <tt>nWhat & (nPow2 - 1)</tt>
         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()
index d25fa5ffa50f24bbbb7dab4f505f3c3b87374ee5..8681913a55d208ccd3452334dde3fa202a522ab8 100644 (file)
@@ -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
index c09955f952bf91e3c6af868fd681f7ec0bb203f3..c7aaadfad6ea95164beeee407fe73701a0172535 100644 (file)
@@ -102,19 +102,12 @@ namespace cds { namespace memory {
             return size_t(-1) / sizeof(value_type);
         }
 
-#   if defined(CDS_MOVE_SEMANTICS_SUPPORT)
         template <class U, class... Args>
         void construct(U* p, Args&&... args)
         {
             new((void *)p) U( std::forward<Args>(args)...);
         }
-#   else
-        template <typename Arg>
-        void construct(pointer p, Arg const& val )
-        {
-            new((void *) p) value_type(val);
-        }
-#   endif
+
         template <class U>
         void destroy(U* p)
         {
index 2b460b56d540f8b70086f31b34e4c39fbcf6c912..18fe4bbb339dc3f0dc52449ae69c7e3a9f48c04c 100644 (file)
@@ -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<hash_tuple_type>(t) )
             {}
-#       endif
 
             template <size_t I, typename T>
             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<hash_tuple_type>(t) )
             {}
-#       endif
 
             void operator()( size_t * dest, wrapped_type const& what ) const
             {
index fc59f7133dc24df75377736f3f1b77d7f9b56d31..066ccd04b5ae3ab2ae3d5e7a0675a5fb6ce1e4e9 100644 (file)
@@ -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 \
index 71c09676c4726714ec6f3480fdcc4c5f809facee..c88f1dac661b93a443d32a8443f444cbb3280002 100644 (file)
@@ -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<key_type const, value_type> pair_type;
index e48d3127206eea6083a4734196e69c51b3723239..34fd8c428c28677577b2de5493c2c811ac563a20 100644 (file)
@@ -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<key_type const, value_type> pair_type;
index 2a65fa004f336cc811836e700d1624fe70b77168..41c2c8c354441e2607c891af94efe9cd65ae30c4 100644 (file)
@@ -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<key_type const, value_type> pair_type;
index f58f9f2e7194a47fdf9465f4a60d2356803e868d..bc8989c8e560e3ee7097c36a8cb65a527671e4b6 100644 (file)
@@ -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
             {
index fc1e2ed2cc9688a4ae911658aa831e06d4a1c2bd..5fd92b31155f6590ad641ddeb4be5cb123191ed3 100644 (file)
@@ -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
             {
index 70e201a83cabdc9beb3ab5858b6c106685d5987a..b76f18c85a0c5c5262fc8d9d78773406930329a1 100644 (file)
@@ -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
             {
index da48bcd5e143c2360c01c1defeef18e9b8b23238..4105170fa4aff7774ba66b88fef65376a88d6b52 100644 (file)
@@ -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 )
             {
index 67e56f9b2064228cee2aae85e56d30fdc36b63a6..32ce3b1f0caf91c2cfb1a30ad91d52c161e33946 100644 (file)
@@ -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;