Remove CDS_EMPLACE_SUPPORT macro and unused code
authorkhizmax <libcds.dev@gmail.com>
Tue, 23 Sep 2014 19:15:36 +0000 (23:15 +0400)
committerkhizmax <libcds.dev@gmail.com>
Tue, 23 Sep 2014 19:15:36 +0000 (23:15 +0400)
90 files changed:
cds/container/basket_queue.h
cds/container/cuckoo_map.h
cds/container/cuckoo_set.h
cds/container/details/make_lazy_kvlist.h
cds/container/details/make_lazy_list.h
cds/container/details/make_michael_kvlist.h
cds/container/details/make_michael_list.h
cds/container/details/make_skip_list_map.h
cds/container/details/make_skip_list_set.h
cds/container/ellen_bintree_map_impl.h
cds/container/ellen_bintree_map_rcu.h
cds/container/ellen_bintree_set_impl.h
cds/container/ellen_bintree_set_rcu.h
cds/container/lazy_kvlist_impl.h
cds/container/lazy_kvlist_nogc.h
cds/container/lazy_kvlist_rcu.h
cds/container/lazy_list_impl.h
cds/container/lazy_list_nogc.h
cds/container/lazy_list_rcu.h
cds/container/michael_kvlist_impl.h
cds/container/michael_kvlist_nogc.h
cds/container/michael_kvlist_rcu.h
cds/container/michael_list_impl.h
cds/container/michael_list_nogc.h
cds/container/michael_list_rcu.h
cds/container/michael_map.h
cds/container/michael_map_nogc.h
cds/container/michael_map_rcu.h
cds/container/michael_set.h
cds/container/michael_set_nogc.h
cds/container/michael_set_rcu.h
cds/container/moir_queue.h
cds/container/mspriority_queue.h
cds/container/msqueue.h
cds/container/optimistic_queue.h
cds/container/rwqueue.h
cds/container/segmented_queue.h
cds/container/skip_list_base.h
cds/container/skip_list_map_impl.h
cds/container/skip_list_map_nogc.h
cds/container/skip_list_map_rcu.h
cds/container/skip_list_set_impl.h
cds/container/skip_list_set_nogc.h
cds/container/skip_list_set_rcu.h
cds/container/split_list_map.h
cds/container/split_list_map_nogc.h
cds/container/split_list_map_rcu.h
cds/container/split_list_set.h
cds/container/split_list_set_nogc.h
cds/container/split_list_set_rcu.h
cds/container/striped_map.h
cds/container/striped_map/boost_list.h
cds/container/striped_map/boost_slist.h
cds/container/striped_map/std_hash_map_std.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_list.h
cds/container/striped_set/boost_slist.h
cds/container/striped_set/boost_stable_vector.h
cds/container/striped_set/boost_vector.h
cds/container/striped_set/std_hash_set_std.h
cds/container/striped_set/std_list.h
cds/container/striped_set/std_set.h
cds/container/striped_set/std_vector.h
cds/container/treiber_stack.h
cds/container/tsigas_cycle_queue.h
cds/container/vyukov_mpmc_cycle_queue.h
cds/details/allocator.h
cds/details/defs.h
doxygen/cds.doxy
tests/test-hdr/map/hdr_cuckoo_map.h
tests/test-hdr/map/hdr_map.h
tests/test-hdr/map/hdr_skiplist_map.h
tests/test-hdr/map/hdr_striped_map.h
tests/test-hdr/ordered_list/hdr_lazy.h
tests/test-hdr/ordered_list/hdr_lazy_kv.h
tests/test-hdr/ordered_list/hdr_michael.h
tests/test-hdr/ordered_list/hdr_michael_kv.h
tests/test-hdr/priority_queue/hdr_pqueue.h
tests/test-hdr/queue/hdr_segmented_queue.h
tests/test-hdr/queue/queue_test_header.h
tests/test-hdr/set/hdr_cuckoo_set.h
tests/test-hdr/set/hdr_set.h
tests/test-hdr/set/hdr_skiplist_set.h
tests/test-hdr/set/hdr_striped_set.h
tests/test-hdr/stack/hdr_treiber_stack.h
tests/test-hdr/tree/hdr_ellenbintree_map.h
tests/test-hdr/tree/hdr_ellenbintree_set.h

index 4bed44527b9296f2d3e73edad2db1911809a33e0..05ccee61972bdbc2ea93d34c43e733a41f5bfaf5 100644 (file)
@@ -41,15 +41,10 @@ namespace cds { namespace container {
                 node_type( const value_type& val )
                     : m_value( val )
                 {}
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_value( std::forward<Args>(args)...)
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             typedef typename options::allocator::template rebind<node_type>::other allocator_type;
@@ -193,13 +188,11 @@ namespace cds { namespace container {
         {
             return cxx_allocator().New( val );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node_move( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
         static void free_node( node_type * p )
         {
             node_deallocator()( p );
@@ -283,12 +276,7 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -299,8 +287,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
-
 
         /// Dequeues a value using copy functor
         /**
index 73b65873e8a04fc84aa0e162a9e0e8d213d8bddb..f9ae03c7a8fb5570346444bdfee40dbcb3976dda 100644 (file)
@@ -36,15 +36,10 @@ namespace cds { namespace container {
                     : m_val( std::make_pair( key_type(key), mapped_type(v) ))
                 {}
 
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename K, typename... Args>
                 node_type( K&& key, Args&&... args )
                     : m_val( std::forward<K>(key), std::move( mapped_type(std::forward<Args>(args)...)) )
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             /*
@@ -356,13 +351,11 @@ namespace cds { namespace container {
         {
             return cxx_node_allocator().New( key );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         static node_type * alloc_node( K&& key, Args&&... args )
         {
             return cxx_node_allocator().MoveNew( std::forward<K>( key ), std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -618,13 +611,9 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -636,8 +625,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
-
 
         /// Ensures that the \p key exists in the map
         /**
index 6b90d127f95b8ea368dec69cdcb43bac427cfe2a..8c24b107ab922b479a1486c19c2429bf60119733 100644 (file)
@@ -28,15 +28,10 @@ namespace cds { namespace container {
                     : m_val(v)
                 {}
 
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_val( std::forward<Args>(args)...)
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             struct value_accessor {
@@ -401,13 +396,11 @@ namespace cds { namespace container {
         {
             return cxx_node_allocator().New( v );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_node_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -623,13 +616,9 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -641,7 +630,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Ensures that the \p val exists in the set
         /**
index 89351f757ca84a84dd7688ea4797e809b411e23d..870ab5f06cd78b538744436403be68865e3f31f5 100644 (file)
@@ -39,12 +39,10 @@ namespace cds { namespace container {
                     : m_Data( key, value )
                 {}
 
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename Ky, typename... Args>
                 node_type( Ky&& key, Args&&... args )
                     : m_Data( std::forward<Ky>(key), std::move( value_type( std::forward<Args>(args)...)))
                 {}
-#           endif
             };
 
             typedef typename original_type_traits::allocator::template rebind<node_type>::other  allocator_type;
index 30b30c6f11b5b8e04a621c001db6b1dba98afca5..06506c5e9bb4a16aa2075337dbaf6cdb5103c33e 100644 (file)
@@ -28,12 +28,10 @@ namespace cds { namespace container {
                 node_type( Q const& v )
                     : m_Value(v)
                 {}
-#       ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_Value( std::forward<Args>(args)...)
                 {}
-#       endif
             };
 
             typedef typename original_type_traits::allocator::template rebind<node_type>::other  allocator_type;
index 9d0bcf23b6256bb2eaa1278898d21488bd2161d1..64a9d9b434323a1d79eff80ddc92bef1d0d4f58c 100644 (file)
@@ -39,12 +39,10 @@ namespace cds { namespace container {
                     : m_Data( key, value )
                 {}
 
-#       ifdef CDS_EMPLACE_SUPPORT
                 template< typename Ky, typename... Args>
                 node_type( Ky&& key, Args&&... args )
                     : m_Data( std::forward<Ky>(key), std::move( value_type( std::forward<Args>(args)...)))
                 {}
-#       endif
             };
 
             typedef typename original_type_traits::allocator::template rebind<node_type>::other  allocator_type;
index 8d65e28baaffefb04f080a6e894fbc1396b6387b..2c5939eb3b1f8dda2df2179ad9ddca451383b0ee 100644 (file)
@@ -28,12 +28,10 @@ namespace cds { namespace container {
                     : m_Value(v)
                 {}
 
-#       ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_Value( std::forward<Args>(args)... )
                 {}
-#       endif
             };
 
             typedef Traits original_type_traits;
index af1076fa0833b3c2dad9f3c11c24fa9eb382538c..69c72a4761fb39ff6b4984181c0107925c94c5f3 100644 (file)
@@ -42,14 +42,12 @@ namespace cds { namespace container { namespace details {
                 init_tower( nHeight, pTower );
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename Q, typename... Args>
             node_type( unsigned int nHeight, atomic_marked_ptr * pTower, Q&& key, Args&&... args )
                 : m_Value( std::forward<Q>(key), std::move( mapped_type( std::forward<Args>(args)... )))
             {
                 init_tower( nHeight, pTower );
             }
-#       endif
 
         private:
             node_type() ;   // no default ctor
@@ -82,7 +80,6 @@ namespace cds { namespace container { namespace details {
                         key, val
                     );
             }
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             node_type * New( unsigned int nHeight, Args&&... args )
             {
@@ -93,7 +90,6 @@ namespace cds { namespace container { namespace details {
                         std::forward<Args>(args)...
                     );
             }
-#       endif
         };
 
         struct node_deallocator {
index e88ee5c04cfb57a43adfcf370e6b3411dc85e2d4..061d24b603d4e6dcb7c96ce356743109c40668df 100644 (file)
@@ -36,7 +36,6 @@ namespace cds { namespace container { namespace details {
                 }
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename Q, typename... Args>
             node_type( unsigned int nHeight, atomic_marked_ptr * pTower, Q&& q, Args&&... args )
                 : m_Value( std::forward<Q>(q), std::forward<Args>(args)... )
@@ -46,7 +45,6 @@ namespace cds { namespace container { namespace details {
                     base_class::make_tower( nHeight, pTower );
                 }
             }
-#       endif
 
         private:
             node_type() ;   // no default ctor
index c499754882bfe41cf0092a666cb1cf35d8517577..a71b7857b68dc06a4ec496f613fa9b736415b7fb 100644 (file)
@@ -327,13 +327,9 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -345,7 +341,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Ensures that the \p key exists in the map
         /**
index 1f968d3c7452eec4b13c463f0c074ce11d7a9062..4bab281a6f74c0b3770c7bc292aaece6decd36a1 100644 (file)
@@ -332,15 +332,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             RCU \p synchronize method can be called. RCU should not be locked.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -352,7 +348,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Ensures that the \p key exists in the map
         /**
index 90421ae04f3f2852ddc55a8ab8f7f9516874d0f2..ea2a0071fbf1f8317c1fca0e6a9d586b514f8ba7 100644 (file)
@@ -357,13 +357,9 @@ namespace cds { namespace container {
             return bRes;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -375,7 +371,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Delete \p key from the set
         /** \anchor cds_nonintrusive_EllenBinTreeSet_erase_val
index 11ea6f5259efb039f86add6db44d4c2f9818002d..579da7a99e32a872648778f6527580ae330aba35 100644 (file)
@@ -362,15 +362,11 @@ namespace cds { namespace container {
             return bRes;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             RCU \p synchronize method can be called. RCU should not be locked.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -382,7 +378,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Delete \p key from the set
         /** \anchor cds_nonintrusive_EllenBinTreeSet_rcu_erase_val
index 66179fe0d94820c56c7c316fa14b33690fef748e..7589cbbe1d12aa3f356d5c3a8314499fb6aad1a8 100644 (file)
@@ -216,13 +216,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( key, val );
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#endif
 
         static void free_node( node_type * pNode )
         {
@@ -504,20 +502,15 @@ namespace cds { namespace container {
             return insert_key_at( head(), key, func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return emplace_at( head(), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Ensures that the \p key exists in the list
         /**
@@ -846,13 +839,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         bool emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)... ));
         }
-#   endif
 
         template <typename K, typename Compare>
         bool erase_at( head_type& refHead, K const& key, Compare cmp )
index d2d36e97410dd2975daa1e950888a3580102a13e..eba231af4eca2d017843d02fa23e9ccb56ecdea4 100644 (file)
@@ -141,13 +141,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( key, val );
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#endif
 
         static void free_node( node_type * pNode )
         {
@@ -461,20 +459,15 @@ namespace cds { namespace container {
             return std::make_pair( node_to_iterator( ret.first ), ret.second );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns an iterator pointed to inserted value, or \p end() if inserting is failed
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         iterator emplace( Args&&... args )
         {
             return node_to_iterator( emplace_at( head(), std::forward<Args>(args)... ));
         }
-#   endif
 
         /// Find the key \p key
         /** \anchor cds_nonintrusive_LazyKVList_nogc_find
@@ -587,13 +580,11 @@ namespace cds { namespace container {
             return std::make_pair( pItemFound, ret.second );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         node_type * emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)... ));
         }
-#endif
 
         template <typename K, typename Compare>
         node_type * find_at( head_type& refHead, const K& key, Compare cmp )
index 20d2f475f2cb3262f3f352884c97dfb2a5bccda0..6dfb17e89e215c4fbdcc1a6a6bb32c0deceed51e 100644 (file)
@@ -227,13 +227,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( key, val );
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#endif
 
         static void free_node( node_type * pNode )
         {
@@ -494,22 +492,17 @@ namespace cds { namespace container {
             return insert_key_at( head(), key, func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             The function makes RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return emplace_at( head(), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Ensures that the \p key exists in the list
         /**
@@ -862,13 +855,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         bool emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)... ));
         }
-#   endif
 
         template <typename K, typename Compare>
         bool erase_at( head_type& refHead, K const& key, Compare cmp )
index 1ed6fcb0e9a3505290f1f623637dc7ceee7d796e..51784f6fae10376475c915f5fadbf5edd5395e6b 100644 (file)
@@ -229,13 +229,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -467,20 +465,15 @@ namespace cds { namespace container {
             return insert_at( head(), key, func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return emplace_at( head(), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Ensures that the \p key exists in the list
         /**
@@ -842,13 +835,11 @@ namespace cds { namespace container {
             return insert_node_at( refHead, alloc_node( val ));
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         bool emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)... ));
         }
-#   endif
 
         template <typename Q, typename Func>
         bool insert_at( head_type& refHead, const Q& key, Func f )
index 5c08d1f83592faec9f45d0dbea03de6d999d7abe..24bc15526f4eb3144ba757c7399aa02f9f88ea65 100644 (file)
@@ -107,13 +107,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -323,20 +321,15 @@ namespace cds { namespace container {
             return node_to_iterator( insert_at( head(), val ) );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Return an iterator pointing to inserted item if success \ref end() otherwise
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         iterator emplace( Args&&... args )
         {
             return node_to_iterator( emplace_at( head(), std::forward<Args>(args)... ));
         }
-#   endif
 
         /// Ensures that the item \p val exists in the list
         /**
@@ -425,13 +418,12 @@ namespace cds { namespace container {
             return insert_node_at( refHead, alloc_node( val ));
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         node_type * emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)... ));
         }
-#   endif
+
         template <typename Q>
         std::pair< node_type *, bool > ensure_at( head_type& refHead, Q const& val )
         {
index e9bc4dfeeb596fbf9e9733a6a60def1d52dde7a8..0f95f58dd2a419d7aeaada061162dfb81f247795 100644 (file)
@@ -240,13 +240,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -469,22 +467,17 @@ namespace cds { namespace container {
             return insert_at( head(), key, func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             The function makes RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return emplace_at( head(), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Ensures that the \p key exists in the list
         /**
@@ -871,13 +864,11 @@ namespace cds { namespace container {
             return insert_node_at( refHead, alloc_node( val ));
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         bool emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)... ));
         }
-#   endif
 
         template <typename Q, typename Func>
         bool insert_at( head_type& refHead, Q const& key, Func f )
index 92e31592b89c0983d0b235109527db6ec7cd7815..589260798baa559ac2e627a1c2501d8b7de016b1 100644 (file)
@@ -216,13 +216,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( key, val );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         static node_type * alloc_node( K&& key, Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<K>(key), std::forward<Args>(args)...);
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -523,20 +521,15 @@ namespace cds { namespace container {
             return ensure_at( head(), key, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
         {
             return emplace_at( head(), std::forward<K>(key), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Deletes \p key from the list
         /** \anchor cds_nonintrusive_MichaelKVList_hp_erase_val
@@ -832,13 +825,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         bool emplace_at( head_type& refHead, K&& key, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<K>(key), std::forward<Args>(args)... ));
         }
-#   endif
 
         template <typename K, typename Func>
         std::pair<bool, bool> ensure_at( head_type& refHead, const K& key, Func f )
index a9575b293f873d9945078357fe7008e6cd8777ad..d9407d0c2b6987b70a5ec825236c4fb5cc16f122 100644 (file)
@@ -142,13 +142,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( key, val );
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         static node_type * alloc_node( K&& key, Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<K>(key), std::forward<Args>(args)... );
         }
-#endif
 
         static void free_node( node_type * pNode )
         {
@@ -444,20 +442,15 @@ namespace cds { namespace container {
             return std::make_pair( node_to_iterator( ret.first ), ret.second );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns an iterator pointed to inserted value, or \p end() if inserting is failed
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         iterator emplace( K&& key, Args&&... args )
         {
             return node_to_iterator( emplace_at( head(), std::forward<K>(key), std::forward<Args>(args)... ));
         }
-#   endif
 
         /// Find the key \p key
         /** \anchor cds_nonintrusive_MichaelKVList_nogc_find
@@ -568,13 +561,11 @@ namespace cds { namespace container {
             return std::make_pair( pItemFound, ret.second );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         node_type * emplace_at( head_type& refHead, K&& key, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<K>(key), std::forward<Args>(args)... ));
         }
-#endif
 
         template <typename K, typename Compare>
         node_type * find_at( head_type& refHead, K const& key, Compare cmp )
index e606c56872871ec0d95a30ab7cbc8f454154541d..c0d2cb99d3fe2b6a6f205e6ac338d0ff657babaa 100644 (file)
@@ -228,13 +228,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( key, val );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         static node_type * alloc_node( K&& key, Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<K>(key), std::forward<Args>(args)...);
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -516,22 +514,17 @@ namespace cds { namespace container {
             return ensure_at( head(), key, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             The function makes RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
         {
             return emplace_at( head(), std::forward<K>(key), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Deletes \p key from the list
         /** \anchor cds_nonintrusive_MichaelKVList_rcu_erase
@@ -844,13 +837,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename K, typename... Args>
         bool emplace_at( head_type& refHead, K&& key, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<K>(key), std::forward<Args>(args)... ));
         }
-#   endif
 
         template <typename K, typename Func>
         std::pair<bool, bool> ensure_at( head_type& refHead, const K& key, Func f )
index de7897381c079aefb6fa696c786b461d45ad3f0c..d139ef782670c2066676c51af557179ef66dc304 100644 (file)
@@ -219,13 +219,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -475,20 +473,15 @@ namespace cds { namespace container {
             return ensure_at( head(), key, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return emplace_at( head(), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Delete \p key from the list
         /** \anchor cds_nonintrusive_MichealList_hp_erase_val
@@ -839,13 +832,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         bool emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args) ... ));
         }
-#   endif
 
         template <typename Q, typename Compare, typename Func>
         bool erase_at( head_type& refHead, Q const& key, Compare cmp, Func f )
index 41a023b069819001cbba1636d0a511d819c176df..512d61737a997a62ba10caf01fcaeccf58efb3f8 100644 (file)
@@ -106,13 +106,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -323,20 +321,15 @@ namespace cds { namespace container {
             return std::make_pair( node_to_iterator( ret.first ), ret.second );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Return an iterator pointing to inserted item if success \ref end() otherwise
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         iterator emplace( Args&&... args )
         {
             return node_to_iterator( emplace_at( head(), std::forward<Args>(args)... ));
         }
-#   endif
 
         /// Find the key \p val
         /** \anchor cds_nonintrusive_MichaelList_nogc_find_val
@@ -429,13 +422,11 @@ namespace cds { namespace container {
             return std::make_pair( pItemFound, ret.second );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         node_type * emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args)...));
         }
-#   endif
 
         template <typename Q, typename Compare>
         node_type * find_at( head_type& refHead, Q const& key, Compare cmp )
index 2ee4d7dc90256aef243243ba47b94841aa32f060..6d8ba10286a6ab4f33a60860376bef53f3bb4796 100644 (file)
@@ -231,13 +231,11 @@ namespace cds { namespace container {
             return cxx_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>(args)... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -477,22 +475,17 @@ namespace cds { namespace container {
             return ensure_at( head(), key, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             The function makes RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics.
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return emplace_at( head(), std::forward<Args>(args)... );
         }
-#   endif
 
         /// Deletes \p key from the list
         /** \anchor cds_nonintrusive_MichealList_rcu_erase_val
@@ -866,13 +859,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         bool emplace_at( head_type& refHead, Args&&... args )
         {
             return insert_node_at( refHead, alloc_node( std::forward<Args>(args) ... ));
         }
-#   endif
 
         template <typename Q, typename Compare, typename Func>
         bool erase_at( head_type& refHead, Q const& key, Compare cmp, Func f )
index 762267d31d97b8a1d72c7307ee2649ea6bc3576e..605d6af83e9954a6dac786637beca49bb0132c88 100644 (file)
@@ -516,15 +516,11 @@ namespace cds { namespace container {
             return bRet;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \p mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
 
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -534,7 +530,6 @@ namespace cds { namespace container {
                 ++m_ItemCounter;
             return bRet;
         }
-#   endif
 
         /// Deletes \p key from the map
         /** \anchor cds_nonintrusive_MichaelMap_erase_val
index 908806660856817b57cf1db47b02cc915425f690..c77d7f93e6f0cce5c7ddaee84bdfa88373a7fa55 100644 (file)
@@ -371,15 +371,11 @@ namespace cds { namespace container {
             return end();
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
 
             Returns an iterator pointed to inserted value, or \p end() if inserting is failed
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         iterator emplace( K&& key, Args&&... args )
@@ -394,7 +390,6 @@ namespace cds { namespace container {
 
             return end();
         }
-#   endif
 
         /// Ensures that the key \p key exists in the map
         /**
index d3e0510cd6d75b9c0f82e345c08906ed6d8871cd..4df00403ff163f3d8ab90829c99f18b7cebd7f66 100644 (file)
@@ -448,17 +448,11 @@ namespace cds { namespace container {
             return bRet;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
 
             Returns \p true if inserting successful, \p false otherwise.
-
-            The function applies RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -468,7 +462,6 @@ namespace cds { namespace container {
                 ++m_ItemCounter;
             return bRet;
         }
-#   endif
 
         /// Deletes \p key from the map
         /** \anchor cds_nonintrusive_MichaelMap_rcu_erase_val
index 2b1ebbf6c6a2fb34ed6ba43699d7445a404e5c7b..a41554860feceee66d754eec2c10c2579b7a00e7 100644 (file)
@@ -407,13 +407,9 @@ namespace cds { namespace container {
             return bRet;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -423,7 +419,6 @@ namespace cds { namespace container {
                 ++m_ItemCounter;
             return bRet;
         }
-#   endif
 
         /// Deletes \p key from the set
         /** \anchor cds_nonintrusive_MichaelSet_erase_val
index 46b6058e73e4d10edc9a036c3829eecb398ab27e..8cbe4f5786877eebafaea7a68fb8ce47801e6bcd 100644 (file)
@@ -197,13 +197,9 @@ namespace cds { namespace container {
             return end();
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Return an iterator pointing to inserted item if success \ref end() otherwise
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         iterator emplace( Args&&... args )
@@ -218,7 +214,6 @@ namespace cds { namespace container {
 
             return end();
         }
-#endif
 
         /// Ensures that the item \p val exists in the set
         /**
index 152fbf9b977eb6fc50f958fcca45caa75104baa1..65e086329901e05523290d5b02520566e92b9bc3 100644 (file)
@@ -360,15 +360,11 @@ namespace cds { namespace container {
             return bRet;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             The function applies RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -378,7 +374,6 @@ namespace cds { namespace container {
                 ++m_ItemCounter;
             return bRet;
         }
-#   endif
 
         /// Deletes \p key from the set
         /** \anchor cds_nonintrusive_MichealSet_rcu_erase_val
index be75ba3e2667f0d2578effcece62ee2c2fef5f24..f8d23811c436c7cdc10f943189fb2979e5e46943 100644 (file)
@@ -41,15 +41,11 @@ namespace cds { namespace container {
                 node_type( const value_type& val )
                     : m_value( val )
                 {}
-#           ifdef CDS_EMPLACE_SUPPORT
+
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_value( std::forward<Args>(args)...)
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             typedef typename options::allocator::template rebind<node_type>::other allocator_type;
@@ -137,13 +133,11 @@ namespace cds { namespace container {
         {
             return cxx_allocator().New( val );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node_move( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
         static void free_node( node_type * p )
         {
             node_deallocator()( p );
@@ -282,12 +276,7 @@ namespace cds { namespace container {
             return enqueue( data, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -298,8 +287,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
-
 
         /// Synonym for \ref dequeue function
         bool pop( value_type& dest )
index a451b4cd5ced6725e6c8331c2d35687c398301a6..bd3d8cecf815e51d0ad47cd88b72aa244119263e 100644 (file)
@@ -193,16 +193,12 @@ namespace cds { namespace container {
             return false;
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         /// Inserts a item into priority queue
         /**
             If the priority queue is full, the function returns \p false,
             no item has been added.
             Otherwise, the function inserts a new item created from \p args arguments
             into the heap and returns \p true.
-
-            The function is available only for compilers supporting variable template
-            and move semantics C++11 feature.
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -214,7 +210,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#endif
 
         /// Extracts item with high priority
         /**
index 37f605aebffb39faa916224b2572fd862781a899..822faea3df6d1b86337b06646a17144695f22fd7 100644 (file)
@@ -39,15 +39,11 @@ namespace cds { namespace container {
                 node_type( const value_type& val )
                     : m_value( val )
                 {}
-#           ifdef CDS_EMPLACE_SUPPORT
+
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_value( std::forward<Args>(args)...)
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             typedef typename options::allocator::template rebind<node_type>::other allocator_type;
@@ -148,13 +144,11 @@ namespace cds { namespace container {
         {
             return cxx_allocator().New( val );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node_move( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
         static void free_node( node_type * p )
         {
             node_deallocator()( p );
@@ -306,12 +300,7 @@ namespace cds { namespace container {
             return dequeue( dest, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -322,7 +311,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Checks if the queue is empty
         bool empty() const
index 931213767d368be83c7c9d5acaec1d572f714529..85492d437e808ab5c7175920a19189c63193f6c2 100644 (file)
@@ -40,15 +40,11 @@ namespace cds { namespace container {
                 node_type( value_type const& val )
                     : m_value( val )
                 {}
-#           ifdef CDS_EMPLACE_SUPPORT
+
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_value( std::forward<Args>(args)...)
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             typedef typename options::allocator::template rebind<node_type>::other allocator_type;
@@ -157,13 +153,11 @@ namespace cds { namespace container {
         {
             return cxx_allocator().New( val );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node_move( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
         static void free_node( node_type * p )
         {
             node_deallocator()( p );
@@ -245,12 +239,7 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -261,7 +250,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Dequeues a value using copy functor
         /**
index 754ec3ed022705ef6cc3f99831dd5c08acb391cd..b64d3e7ea5e0721d7a642a0472c488c5c7a9d410 100644 (file)
@@ -90,13 +90,11 @@ namespace cds { namespace container {
                 : m_pNext( nullptr )
             {}
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             node_type( Args&&... args )
                 : m_pNext( nullptr )
                 , m_value( std::forward<Args>(args)...)
             {}
-#       endif
         };
         //@endcond
 
@@ -132,13 +130,11 @@ namespace cds { namespace container {
             return node_allocator().New( data );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node_move( Args&&... args )
         {
             return node_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -225,12 +221,7 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -241,7 +232,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Dequeues a value using copy functor
         /**
index 3026019c8f32fccf496812e751dbaae4843accc2..ecd0b20d1fd51e8807f73643e9f002fb093acbfb 100644 (file)
@@ -206,13 +206,11 @@ namespace cds { namespace container {
             return cxx_node_allocator().New();
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static value_type * alloc_node_move( Args&&... args )
         {
             return cxx_node_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
 
         struct dummy_disposer {
             void operator()( value_type * p )
@@ -289,12 +287,7 @@ namespace cds { namespace container {
             return enqueue( data, f );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -305,7 +298,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Removes an element from first segment of the queue
         /**
index c753e1ce1a13143119b74418d891384864734ec5..9d50da06ac9b2ac1302947c4089d53b16db3f6c0 100644 (file)
@@ -182,7 +182,6 @@ namespace cds { namespace container {
                         node_type( nHeight, nHeight > 1 ? reinterpret_cast<node_tower_item *>(pMem + c_nNodeSize) : nullptr, v );
                 }
 
-#       ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 node_type * New( unsigned int nHeight, Args&&... args )
                 {
@@ -191,7 +190,6 @@ namespace cds { namespace container {
                         node_type( nHeight, nHeight > 1 ? reinterpret_cast<node_tower_item *>(pMem + c_nNodeSize) : nullptr,
                         std::forward<Args>(args)... );
                 }
-#       endif
 
                 void Delete( node_type * p )
                 {
index 0f9ccea6b7c5b7a59d10a1782afe81a6c606b3bb..736692cd0e0c823b71de9795c8a6eacc7e63d081 100644 (file)
@@ -397,13 +397,9 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -415,8 +411,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
-
 
         /// Ensures that the \p key exists in the map
         /**
index 2ab08886081fc46df169cebcac8b0602f6ec383d..76644e65bcbc2fc98d93b1bf8be7fb2651d400c4 100644 (file)
@@ -262,22 +262,17 @@ namespace cds { namespace container {
             return it;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
 
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         iterator emplace( K&& key, Args&&... args )
         {
             return base_class::emplace( std::forward<K>(key), std::move(mapped_type(std::forward<Args>(args)...)));
         }
-#   endif
 
         /// Ensures that the key \p key exists in the map
         /**
index 42b6d62f109a882cc8e8c3b1a38f9abb48681a9c..46ce635a882bf9b56fd42281f4a9c0b00f500cbf 100644 (file)
@@ -425,15 +425,11 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             RCU \p synchronize method can be called. RCU should not be locked.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -445,8 +441,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
-
 
         /// Ensures that the \p key exists in the map
         /**
index 1a38e989245da3cb1c21fd2fb265030e8394f198..e92b56704a101d30378e382f1e259ac57fc80e85 100644 (file)
@@ -394,13 +394,9 @@ namespace cds { namespace container {
             return bRes;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref cds_containewr_SkipListSet_value_type "value_type" constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -412,7 +408,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Delete \p key from the set
         /** \anchor cds_nonintrusive_SkipListSet_erase_val
index 17d22fbcb220898d47bbcbe4c1ff870440ddc841..b549bc15fd14f5802c63301fed02edb532b63b9c 100644 (file)
@@ -51,7 +51,6 @@ namespace cds { namespace container {
                     }
                 }
 
-#       ifdef CDS_EMPLACE_SUPPORT
                 template <typename Q, typename... Args>
                 node_type( unsigned int nHeight, atomic_ptr * pTower, Q&& q, Args&&... args )
                     : m_Value( std::forward<Q>(q), std::forward<Args>(args)... )
@@ -61,10 +60,8 @@ namespace cds { namespace container {
                         base_class::make_tower( nHeight, pTower );
                     }
                 }
-#       endif
 
-            private:
-                node_type() ;   // no default ctor
+                node_type() = delete;   // no default ctor
             };
 
             typedef skip_list::details::node_allocator< node_type, type_traits> node_allocator;
@@ -274,13 +271,9 @@ namespace cds { namespace container {
             return end();
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Return an iterator pointing to inserted item if success \ref end() otherwise
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         iterator emplace( Args&&... args )
@@ -291,7 +284,6 @@ namespace cds { namespace container {
             }
             return end();
         }
-#endif
 
         /// Ensures that the item \p val exists in the set
         /**
index fa3f22bb1d5ddcfbd9e24efba1f06808dfaf9fc3..2ea9f4970937d56e994f66c945e73308708404c2 100644 (file)
@@ -455,15 +455,11 @@ namespace cds { namespace container {
             return bRes;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             RCU \p synchronize method can be called. RCU should not be locked.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -475,7 +471,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Delete \p key from the set
         /** \anchor cds_nonintrusive_SkipListSet_rcu_erase_val
index d033d24cb83f6a3ebab43c0c8b5bd468861d34b0..2e8b2b67973e121f82f7ffa7da39b5f1f3886bc2 100644 (file)
@@ -330,23 +330,17 @@ namespace cds { namespace container {
             return base_class::insert( std::make_pair( key, mapped_type() ), func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
 
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
         {
             return base_class::emplace( std::forward<K>(key), std::move(mapped_type(std::forward<Args>(args)...)));
         }
-#   endif
-
 
         /// Ensures that the \p key exists in the map
         /**
index af963c6a1da550bad96aa7942c54a700a9ef1aed..f7cbac3bfe50ea9b9a19539f7699452805ca9646 100644 (file)
@@ -208,22 +208,17 @@ namespace cds { namespace container {
             return it;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
 
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         iterator emplace( K&& key, Args&&... args )
         {
             return base_class::emplace( std::forward<K>(key), std::move(mapped_type(std::forward<Args>(args)...)));
         }
-#   endif
 
         /// Ensures that the key \p key exists in the map
         /**
index b42ee5bc6bc5cd14e22e2fd3a9588d5f902376a9..b8bc6638dd2f06a5a153d1cfd08040a680608131 100644 (file)
@@ -372,7 +372,6 @@ namespace cds { namespace container {
             return base_class::insert( std::make_pair( key, mapped_type() ), func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             \p key_type should be constructible from type \p K
@@ -380,16 +379,12 @@ namespace cds { namespace container {
             The function applies RCU lock internally.
 
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
         {
             return base_class::emplace( std::forward<K>(key), std::move(mapped_type(std::forward<Args>(args)...)));
         }
-#   endif
 
         /// Ensures that the \p key exists in the map
         /**
index ff176fd8b350c908cf9b464422e7e2900dd2da15..cfbe04bdb731c012d12eec89b03dc83a2799edf6 100644 (file)
@@ -192,13 +192,11 @@ namespace cds { namespace container {
 #       endif
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_node_allocator().MoveNew( std::forward<Args>(args)...);
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -483,20 +481,15 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \p %value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return insert_node( alloc_node( std::forward<Args>(args)...));
         }
-#   endif
 
         /// Ensures that the \p item exists in the set
         /**
index ccee6600bfb455aa9ae8dee155cbfcbbd015238d..11a90ed1f30c6c67d0c1ee053174e6b2d41fc4d9 100644 (file)
@@ -63,13 +63,11 @@ namespace cds { namespace container {
             return cxx_node_allocator().New( v );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_node_allocator().MoveNew( std::forward<Args>(args)...);
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -269,20 +267,15 @@ namespace cds { namespace container {
             return insert_node( alloc_node( val ) );
         }
 
-#ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Return an iterator pointing to inserted item if success \ref end() otherwise
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         iterator emplace( Args&&... args )
         {
             return insert_node( alloc_node( std::forward<Args>(args)... ) );
         }
-#endif
 
         /// Ensures that the item \p val exists in the set
         /**
index 0cd2506dde328c7aaf1e2a2ac99288429768868c..444756425f840d61571e1dcdc69b9dea0433e4eb 100644 (file)
@@ -238,13 +238,11 @@ namespace cds { namespace container {
         }
 
 
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node( Args&&... args )
         {
             return cxx_node_allocator().MoveNew( std::forward<Args>(args)...);
         }
-#   endif
 
         static void free_node( node_type * pNode )
         {
@@ -537,22 +535,17 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \p value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
 
             The function applies RCU lock internally.
-
-            @note This function is available only for compiler that supports
-            variadic template and move semantics.
         */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
             return insert_node( alloc_node( std::forward<Args>(args)...));
         }
-#   endif
 
         /// Ensures that the \p item exists in the set
         /**
index ec4472337b3158fea175628fcd091906f7b37517..81be3321d36693e6de8235cec568dda9a0b93dab 100644 (file)
@@ -694,13 +694,9 @@ namespace cds { namespace container {
             return base_class::insert( key, func );
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// For key \p key inserts data of type \ref mapped_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename K, typename... Args>
         bool emplace( K&& key, Args&&... args )
@@ -722,7 +718,6 @@ namespace cds { namespace container {
 
             return bOk;
         }
-#   endif
 
         /// Ensures that the \p key exists in the map
         /**
index 10884098e7e5e2b163f1844c9073b7d4af2753f3..5f9a021926e7cc4d71445b93ada610472c66a94c 100644 (file)
@@ -149,7 +149,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename K, typename... Args>
             bool emplace( K&& key, Args&&... args )
             {
@@ -160,7 +159,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& key, Func func )
index e8722c23cdc0763273e4395da3bcd388d2c68a41..0785ccf6ac5093f76f47c926f6c62fc2262111e3 100644 (file)
@@ -160,7 +160,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename K, typename... Args>
             bool emplace( K&& key, Args&&... args )
             {
@@ -171,7 +170,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& key, Func func )
index f12f6133e00a054168a6ee3a16d65e24de89ee3c..4aec8052385cf5fc8107a24df21eb78c92dc624c 100644 (file)
@@ -114,19 +114,12 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return res.second;
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename Q, typename... Args>
             bool emplace( Q&& key, Args&&... args )
             {
-#           if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION < 40800 || CDS_COMPILER == CDS_COMPILER_CLANG && !defined(__LIBCPP_VERSION)
-                // GCC < 4.8: std::map has no "emplace" member function. Emulate it
-                std::pair<iterator, bool> res = m_Map.insert( value_type( std::forward<Q>(key), mapped_type( std::forward<Args>(args)...)));
-#           else
                 std::pair<iterator, bool> res = m_Map.emplace( std::forward<Q>(key), std::move( mapped_type(std::forward<Args>(args)...)) );
-#           endif
                 return res.second;
             }
-#       endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& key, Func func )
index 683c2d6f63415a087172143b8663d11cbfe18a6c..06cf2107f54f6bf8c23af749ad86af91bec63cf7 100644 (file)
@@ -157,7 +157,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename K, typename... Args>
             bool emplace( K&& key, Args&&... args )
             {
@@ -173,7 +172,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& key, Func func )
index 294ec9e413e74f6bce115986bbd9e7ed5aaff9db..7aeeb3f00dbe20585df30da718c50abd74241efa 100644 (file)
@@ -110,19 +110,12 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return res.second;
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename Q, typename... Args>
             bool emplace( Q&& key, Args&&... args )
             {
-#           if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION < 40800 || CDS_COMPILER == CDS_COMPILER_CLANG && !defined(__LIBCPP_VERSION)
-                // GCC < 4.8: std::map has no "emplace" member function. Emulate it
-                std::pair<iterator, bool> res = m_Map.insert( value_type( std::forward<Q>(key), mapped_type( std::forward<Args>(args)...)));
-#           else
                 std::pair<iterator, bool> res = m_Map.emplace( std::forward<Q>(key), std::move(mapped_type( std::forward<Args>(args)...)));
-#           endif
                 return res.second;
             }
-#       endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& key, Func func )
index 7e338dfc661fd8e6850628d7ebe26a3837274b3d..13a1be434cee354f1aca9cec7d3452b16384f4a3 100644 (file)
@@ -635,13 +635,9 @@ namespace cds { namespace container {
             return bOk;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Inserts data of type \p %value_type constructed with <tt>std::forward<Args>(args)...</tt>
         /**
             Returns \p true if inserting successful, \p false otherwise.
-
-            This function is available only for compiler that supports
-            variadic template and move semantics
         */
         template <typename... Args>
         bool emplace( Args&&... args )
@@ -662,7 +658,6 @@ namespace cds { namespace container {
                 base_class::resize();
             return bOk;
         }
-#   endif
 
         /// Ensures that the \p val exists in the set
         /**
index 6bd3927d297797980885faaabf6152132b59ecfb..707f2b4e64b1b369496fabaed198824ef38be54c 100644 (file)
@@ -270,14 +270,12 @@ namespace cds { namespace container {
                     return res.second;
                 }
 
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 bool emplace( Args&&... args )
                 {
                     std::pair<iterator, bool> res = m_Set.emplace( std::forward<Args>(args)... );
                     return res.second;
                 }
-#           endif
 
                 template <typename Q, typename Func>
                 std::pair<bool, bool> ensure( const Q& val, Func func )
@@ -409,14 +407,12 @@ namespace cds { namespace container {
                     return res.second;
                 }
 
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename Q, typename... Args>
                 bool emplace( Q&& key, Args&&... args )
                 {
                     std::pair<iterator, bool> res = m_Map.emplace( std::forward<Q>(key), std::move( mapped_type( std::forward<Args>(args)...)));
                     return res.second;
                 }
-#           endif
 
                 template <typename Q, typename Func>
                 std::pair<bool, bool> ensure( const Q& val, Func func )
index c72aad0742a277710e2807e703e5bf806151ee56..a9f38c43dcd8090f28d35a634c2cfcbc57b621dc 100644 (file)
@@ -143,7 +143,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
@@ -155,7 +154,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( Q const& val, Func func )
index 3a390e5bb75d093e82165a81dde4143f679fe5c8..c45ab4ec03a16833e717f24696248f0948d1419c 100644 (file)
@@ -151,7 +151,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
@@ -163,7 +162,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& val, Func func )
index a668ca92c7f526dfb0efa4094a8bb82488195e28..142699a69cad240ceb52b3e7a163c11e2d1672ea 100644 (file)
@@ -158,7 +158,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
@@ -170,7 +169,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             /// Ensures that the \p item exists in the container
             /**
index e4698776cc8f4c2610afa9baceb7b8d50146cdc0..3979e8fedccc4108a72eeba592123694ecd1f94e 100644 (file)
@@ -138,7 +138,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
@@ -150,7 +149,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& val, Func func )
index fa4b6be06fef49e2425d538e9919e686cf2bc600..dc1b8f731af3942c858f6f7977903c873072892e 100644 (file)
@@ -97,19 +97,12 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return res.second;
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
-#           if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION < 40800 || CDS_COMPILER == CDS_COMPILER_CLANG && !defined(__LIBCPP_VERSION)
-                // GCC < 4.8:  std::set has no "emplace" member function. Emulate it
-                std::pair<iterator, bool> res = m_Set.insert( value_type( std::forward<Args>(args)...));
-#           else
                 std::pair<iterator, bool> res = m_Set.emplace( std::forward<Args>(args)... );
-#           endif
                 return res.second;
             }
-#       endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& val, Func func )
index c67270b7b15544ccb055bf984aeaf67838b38368..4453238520f6b1f733db389d2727b4e1071cad04 100644 (file)
@@ -151,7 +151,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
@@ -172,7 +171,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& val, Func func )
index 0df15cb723dc7a1833af9690f3667d27814ef685..913f95eca5612f400f6e3eafadabb12674c14655 100644 (file)
@@ -94,19 +94,12 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return res.second;
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
-#           if CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION < 40800 || CDS_COMPILER == CDS_COMPILER_CLANG && !defined(__LIBCPP_VERSION)
-                // GCC < 4.8: std::set has no "emplace" member function. Emulate it
-                std::pair<iterator, bool> res = m_Set.insert( value_type( std::forward<Args>(args)...));
-#           else
                 std::pair<iterator, bool> res = m_Set.emplace( std::forward<Args>(args)... );
-#           endif
                 return res.second;
             }
-#       endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& val, Func func )
index 391956933971515927997d78afbe01223b192e55..a6d977bf3bc98d95c424a77e2ba88a7e9a2364a2 100644 (file)
@@ -135,7 +135,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 return false;
             }
 
-#           ifdef CDS_EMPLACE_SUPPORT
             template <typename... Args>
             bool emplace( Args&&... args )
             {
@@ -153,7 +152,6 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 return false;
             }
-#           endif
 
             template <typename Q, typename Func>
             std::pair<bool, bool> ensure( const Q& val, Func func )
index 0360ad9e82205d681326acb28c74b9c54d9d7d0a..15465403ac3877f87fbb19a30ac28a744f922642 100644 (file)
@@ -49,15 +49,10 @@ namespace cds { namespace container {
                 node_type( const value_type& val )
                     : m_value( val )
                 {}
-#           ifdef CDS_EMPLACE_SUPPORT
                 template <typename... Args>
                 node_type( Args&&... args )
                     : m_value( std::forward<Args>(args)...)
                 {}
-#           else
-                node_type()
-                {}
-#           endif
             };
 
             typedef typename options::allocator::template rebind<node_type>::other allocator_type;
@@ -167,13 +162,11 @@ namespace cds { namespace container {
         {
             return cxx_allocator().New( val );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static node_type * alloc_node_move( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
 
         static void free_node( node_type * p )
         {
@@ -223,12 +216,7 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
-        /// Pushes data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
+        /// Pushes data of type \ref value_type created from <tt>std::forward<Args>(args)...</tt>
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -239,7 +227,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Pop an item from the stack
         /**
index 64fe4804f250e9b84a6df13a2afa015768c3ddf0..2fd81cb13200e381619e616ae649baaedb8be63a 100644 (file)
@@ -141,13 +141,11 @@ namespace cds { namespace container {
         {
             return cxx_allocator().New( val );
         }
-#   ifdef CDS_EMPLACE_SUPPORT
         template <typename... Args>
         static value_type * alloc_node_move( Args&&... args )
         {
             return cxx_allocator().MoveNew( std::forward<Args>( args )... );
         }
-#   endif
         static void free_node( value_type * p )
         {
             node_deallocator()( p );
@@ -234,12 +232,7 @@ namespace cds { namespace container {
             return false;
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -250,7 +243,6 @@ namespace cds { namespace container {
             }
             return false;
         }
-#   endif
 
         /// Dequeues a value using copy functor
         /**
index 8f5f8e57c2877becac787bc8a8f8d20c5e84c7a6..5ca4a94bce862dbbd4a90505a43f1a74af66ec1b 100644 (file)
@@ -221,12 +221,7 @@ namespace cds { namespace container {
 #       endif
         }
 
-#   ifdef CDS_EMPLACE_SUPPORT
         /// Enqueues data of type \ref cds_container_VyukovMPMCCycleQueue_value_type "value_type" constructed with <tt>std::forward<Args>(args)...</tt>
-        /**
-            This function is available only for compiler that supports
-            variadic template and move semantics
-        */
         template <typename... Args>
         bool emplace( Args&&... args )
         {
@@ -257,9 +252,7 @@ namespace cds { namespace container {
             ++m_ItemCounter;
 
             return true;
-
         }
-#   endif
 
         /// Dequeues an item from queue
         /** @anchor cds_container_VyukovMPMCCycleQueue_dequeue_func
index c621b9f5381dd35d59d853b2174a91295031d63a..9936cdac21db00a142b42142b91ed3f759af7fb4 100644 (file)
@@ -50,19 +50,12 @@ namespace cds {
                 return Construct( allocator_type::allocate(1), src... );
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             /// Analogue of <tt>operator new T( std::forward<Args>(args)... )</tt> (move semantics)
-            /**
-                This function is available only for compiler that supports
-                variadic template and move semantics
-            */
             template <typename... Args>
             value_type * MoveNew( Args&&... args )
             {
                 return MoveConstruct( allocator_type::allocate(1), std::forward<Args>(args)... );
             }
-#       endif
-
 
             /// Analogue of operator new T[\p nCount ]
             value_type * NewArray( size_t nCount )
@@ -137,18 +130,12 @@ namespace cds {
                 return new( p ) value_type( src... );
             }
 
-#       ifdef CDS_EMPLACE_SUPPORT
             /// Analogue of placement <tt>operator new( p ) T( std::forward<Args>(args)... )</tt>
-            /**
-                This function is available only for compiler that supports
-                variadic template and move semantics
-            */
             template <typename... Args>
             value_type * MoveConstruct( void * p, Args&&... args )
             {
                 return new( p ) value_type( std::forward<Args>(args)... );
             }
-#       endif
 
             /// Rebinds allocator to other type \p Q instead of \p T
             template <typename Q>
index 38340ae59df29f2d14de155e921ec087ddd94eb5..e7d164b0897c3a5835659bc70bed5e946093f11a 100644 (file)
@@ -348,8 +348,6 @@ namespace cds {}
 #   define CDS_NOEXCEPT_DEFAULTED_(expr)  CDS_NOEXCEPT_( expr )
 #endif
 
-#define CDS_EMPLACE_SUPPORT
-
 #ifdef CDS_CXX11_INLINE_NAMESPACE_SUPPORT
 #   define CDS_CXX11_INLINE_NAMESPACE   inline
 #else
index 066ccd04b5ae3ab2ae3d5e7a0675a5fb6ce1e4e9..9efb5c8d7ee2632bf780c3cbd717278506a280ed 100644 (file)
@@ -1404,7 +1404,6 @@ PREDEFINED             = CDS_BUILD_BITS=32 \
                          CDS_ATOMIC=std \
                          CDS_DELETE_SPECIFIER="=delete"\
                          CDS_DEFAULT_SPECIFIER="=default"  \
-                         CDS_EMPLACE_SUPPORT \
                          CDS_DECL_OPTIONS="typename... Options" \
                          CDS_DECL_OPTIONS1="typename... Options" \
                          CDS_DECL_OPTIONS2="typename... Options" \
index c88f1dac661b93a443d32a8443f444cbb3280002..ccc7cfa910d72d2570299818bd4f44ed65627cdf 100644 (file)
@@ -321,7 +321,6 @@ namespace map {
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
@@ -346,8 +345,6 @@ namespace map {
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
-
-#       endif
         }
 
         template <class Map>
index 34fd8c428c28677577b2de5493c2c811ac563a20..08a3fa6c27269790393dde167897a040eabcb0d2 100644 (file)
@@ -442,7 +442,6 @@ namespace map {
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
@@ -467,8 +466,6 @@ namespace map {
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
-
-#       endif
         }
 
 
@@ -540,7 +537,6 @@ namespace map {
                 CPPUNIT_ASSERT( it->second.m_val == 120 * 5 );
                 CPPUNIT_ASSERT( m.find_with(120, less()) == m.find(120) );
 
-#           ifdef CDS_EMPLACE_SUPPORT
                 // emplace test
                 it = m.emplace( 151 ) ;  // key = 151,  val = 0
                 CPPUNIT_ASSERT( it != m.end() );
@@ -574,7 +570,6 @@ namespace map {
                 CPPUNIT_ASSERT( it != m.end() );
                 CPPUNIT_ASSERT( it->first == 151 );
                 CPPUNIT_ASSERT( it->second.m_val == 0 );
-#           endif
             }
 
             // iterator test
index 52cc8f4767df39534bfdb606b63156a7465b2807..7c6f6a4db7e3983b9a5e41e872e14f620ace82cc 100644 (file)
@@ -289,7 +289,6 @@ namespace map {
             CPPUNIT_ASSERT( it != m.end() );
             CPPUNIT_ASSERT( it->second.m_val == 120 * 5 );
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             it = m.emplace( 151 ) ;  // key = 151,  val = 0
             CPPUNIT_ASSERT( it != m.end() );
@@ -323,7 +322,6 @@ namespace map {
             CPPUNIT_ASSERT( it != m.end() );
             CPPUNIT_ASSERT( it->first == 151 );
             CPPUNIT_ASSERT( it->second.m_val == 0 );
-#       endif
 
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
index 41c2c8c354441e2607c891af94efe9cd65ae30c4..352c26ef204a9979bf3301132f241617f948189a 100644 (file)
@@ -271,7 +271,6 @@ namespace map {
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
@@ -296,8 +295,6 @@ namespace map {
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
-
-#       endif
         }
 
         template <class Map>
@@ -477,7 +474,6 @@ namespace map {
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
@@ -502,8 +498,6 @@ namespace map {
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
-
-#       endif
         }
 
         template <class Map>
index dfa95896b94ca44ff91e1754bc80faed245fdf39..2ef4073fc03b6939e3563cd50c7a06c798240cc6 100644 (file)
@@ -363,7 +363,6 @@ namespace ordlist {
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
             {
                 int i;
                 // insert test
@@ -385,7 +384,6 @@ namespace ordlist {
                 l.clear();
                 CPPUNIT_ASSERT( l.empty() );
             }
-#endif
 
             // Iterator test
             {
@@ -647,7 +645,6 @@ namespace ordlist {
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
             // insert test
             CPPUNIT_ASSERT( l.emplace( 501 ) != l.end());
             CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
@@ -674,8 +671,6 @@ namespace ordlist {
 
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
-#endif
-
         }
 
         void HP_cmp();
index 5d9fdaa0f2811f8c9d5fde26319157a628c8c02d..34804647092afddda50884b6af32d93473c913ad 100644 (file)
@@ -193,7 +193,6 @@ namespace ordlist {
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
             // insert test
             CPPUNIT_ASSERT( l.emplace( 501 ) );
             CPPUNIT_ASSERT( l.emplace( 251, 152 ));
@@ -209,7 +208,6 @@ namespace ordlist {
 
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
-#endif
 
             // Iterator test
             {
@@ -512,7 +510,6 @@ namespace ordlist {
                 l.clear();
                 CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
                 // insert test
                 CPPUNIT_ASSERT( l.emplace( 501 ) != l.end());
                 CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
@@ -533,7 +530,6 @@ namespace ordlist {
 
                 l.clear();
                 CPPUNIT_ASSERT( l.empty() );
-#endif
 
                 // Iterator test
                 {
index d77b7219bed87042af901ad6cb6c2ebd4c82da39..a0fe03e06fd89d3428a4965af61c596ea2c94cc2 100644 (file)
@@ -363,7 +363,6 @@ namespace ordlist {
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
             {
                 int i;
 
@@ -386,7 +385,6 @@ namespace ordlist {
                 l.clear();
                 CPPUNIT_ASSERT( l.empty() );
             }
-#endif
 
             // Iterator test
             {
@@ -648,7 +646,6 @@ namespace ordlist {
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
             // insert test
             CPPUNIT_ASSERT( l.emplace( 501 ) != l.end() );
             CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
@@ -675,7 +672,6 @@ namespace ordlist {
 
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
-#endif
         }
 
         void HP_cmp();
index 8f701c795b02cff22987078e7cd60b51716effea..9d5f3e95bb601d4f98e9ea90ecc30e971c0fc654 100644 (file)
@@ -193,7 +193,6 @@ namespace ordlist {
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
             // insert test
             CPPUNIT_ASSERT( l.emplace( 501 ) );
             CPPUNIT_ASSERT( l.emplace( 251, 152 ));
@@ -209,7 +208,6 @@ namespace ordlist {
 
             l.clear();
             CPPUNIT_ASSERT( l.empty() );
-#endif
 
             // Iterator test
             {
@@ -523,7 +521,6 @@ namespace ordlist {
                 l.clear();
                 CPPUNIT_ASSERT( l.empty() );
 
-#ifdef CDS_EMPLACE_SUPPORT
                 // insert test
                 CPPUNIT_ASSERT( l.emplace( 501 ) != l.end());
                 CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
@@ -544,7 +541,6 @@ namespace ordlist {
 
                 l.clear();
                 CPPUNIT_ASSERT( l.empty() );
-#endif
 
                 // Iterator test
                 {
index 33c17cd1ede7d0cc0cf07a509ef313d452326918..cb8025b45585b3ff2440c767b361508d28c2b4e8 100644 (file)
@@ -140,7 +140,6 @@ namespace priority_queue {
 
             // Push test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-#ifdef CDS_EMPLACE_SUPPORT
                 switch ( pq.size() & 3 ) {
                     case 1:
                         CPPUNIT_ASSERT( pq.emplace( p->k, p->v ));
@@ -151,9 +150,6 @@ namespace priority_queue {
                     default:
                         CPPUNIT_ASSERT( pq.push( *p ));
                 }
-#else
-                CPPUNIT_ASSERT( pq.push( *p ));
-#endif
                 CPPUNIT_ASSERT( !pq.empty() );
                 CPPUNIT_ASSERT( pq.size() == ++nSize );
             }
index acb415c0b306798a60569c839836bad940f5adb1..d1e42919b08e0ff6f814b8334346a115efd5492a 100644 (file)
@@ -146,7 +146,6 @@ namespace queue {
                 }
 
                 //emplace
-#       ifdef CDS_EMPLACE_SUPPORT
                 {
                     size_t nMajor = 0;
                     size_t nMinor = 0;
@@ -183,7 +182,6 @@ namespace queue {
                     CPPUNIT_CHECK( q.empty() );
                     CPPUNIT_CHECK( misc::check_size( q, 0 ));
                 }
-#       endif
 
                 // pop from empty queue
                 {
index be392663981d7f30d1475a5a621a77866e2d09b7..bd374fd4de5db64cf11432717d529a1496480f3d 100644 (file)
@@ -61,7 +61,6 @@ namespace queue {
         template <class Queue>
         void test_emplace( Queue& q )
         {
-#   ifdef CDS_EMPLACE_SUPPORT
             int     it;
             for ( size_t i = 0; i < 3; ++i ) {
                 CPPUNIT_ASSERT( q.emplace( static_cast<int>( i * 42 )) );
@@ -71,7 +70,6 @@ namespace queue {
                 CPPUNIT_ASSERT( it == static_cast<int>( i * 42 ));
                 CPPUNIT_ASSERT( q.empty() );
             }
-#   endif
         }
 
         template <class Queue>
@@ -128,7 +126,6 @@ namespace queue {
         template <class Queue>
         void test_emplace_ic( Queue& q )
         {
-#   ifdef CDS_EMPLACE_SUPPORT
             int     it = 0;
             for ( size_t i = 0; i < 3; ++i ) {
                 CPPUNIT_ASSERT( q.emplace( (int) i * 10 ) );
@@ -139,7 +136,6 @@ namespace queue {
                 CPPUNIT_ASSERT( q.empty() );
                 CPPUNIT_ASSERT( q.size() == 0 );
             }
-#   endif
         }
 
     public:
index bc8989c8e560e3ee7097c36a8cb65a527671e4b6..442dd7dec3298126d54a091446cc524d21792479 100644 (file)
@@ -456,7 +456,6 @@ namespace set {
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( s.emplace( 151 )) ;  // key = 151,  val = 151
             CPPUNIT_ASSERT( s.emplace( 174, 471 )) ;    // key = 174, val = 471
@@ -489,7 +488,6 @@ namespace set {
             s.clear();
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
-#       endif
         }
 
         template <class Set, class Predicate>
index 5fd92b31155f6590ad641ddeb4be5cb123191ed3..c8e1e06f158cd39b923904300c670132abd33ae4 100644 (file)
@@ -615,7 +615,6 @@ namespace set {
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( s.emplace( 151 )) ;  // key = 151,  val = 151
             CPPUNIT_ASSERT( s.emplace( 174, 471 )) ;    // key = 174, val = 471
@@ -648,7 +647,6 @@ namespace set {
             s.clear();
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
-#       endif
         }
 
 
@@ -734,7 +732,6 @@ namespace set {
                 CPPUNIT_ASSERT( it->key() == 50 );
                 CPPUNIT_ASSERT( it->val() == 25 );
 
-#       ifdef CDS_EMPLACE_SUPPORT
                 // emplace test
                 it = s.emplace( 151 ) ;  // key = 151,  val = 151
                 CPPUNIT_ASSERT( it != s.end() );
@@ -765,7 +762,6 @@ namespace set {
                 CPPUNIT_ASSERT( it != s.end() );
                 CPPUNIT_ASSERT( it->key() == 151 );
                 CPPUNIT_ASSERT( it->val() == 151 );
-#       endif
 
                 //s.clear();
                 //CPPUNIT_ASSERT( s.empty() );
index 706e3c8d86c3c720d5943b8a8338e98ae4a03ca6..c593a0cf4256b62f6992334b8c4b4429e180f2ad 100644 (file)
@@ -329,7 +329,6 @@ namespace set {
             CPPUNIT_ASSERT( it->key() == 50 );
             CPPUNIT_ASSERT( it->val() == 25 );
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             it = s.emplace( 151 ) ;  // key = 151,  val = 151
             CPPUNIT_ASSERT( it != s.end() );
@@ -360,7 +359,6 @@ namespace set {
             CPPUNIT_ASSERT( it != s.end() );
             CPPUNIT_ASSERT( it->key() == 151 );
             CPPUNIT_ASSERT( it->val() == 151 );
-#       endif
 
             CPPUNIT_ASSERT( !s.empty() );
             s.clear();
index b76f18c85a0c5c5262fc8d9d78773406930329a1..1535615a76df6fc3c711b33d84f472cf9c448cfa 100644 (file)
@@ -471,7 +471,6 @@ namespace set {
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( s.emplace( 151 )) ;  // key = 151,  val = 151
             CPPUNIT_ASSERT( s.emplace( 174, 471 )) ;    // key = 174, val = 471
@@ -504,7 +503,6 @@ namespace set {
             s.clear();
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
-#       endif
         }
 
         template <class Set>
@@ -665,7 +663,6 @@ namespace set {
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( s.emplace( 151 )) ;  // key = 151,  val = 151
             CPPUNIT_ASSERT( s.emplace( 174, 471 )) ;    // key = 174, val = 471
@@ -698,7 +695,6 @@ namespace set {
             s.clear();
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
-#       endif
         }
 
         void Striped_list();
index 789c9e8491f0c5cf1ba01332286b47a26c0b136f..51ad47e90816e0ec818f66bbcd0e3dce77b2432f 100644 (file)
@@ -54,11 +54,9 @@ namespace stack {
             CPPUNIT_ASSERT( stack.push(30));
             CPPUNIT_ASSERT( !stack.empty());
 
-#ifdef CDS_EMPLACE_SUPPORT
             CPPUNIT_ASSERT( stack.emplace(100));
             CPPUNIT_ASSERT( stack.pop(v));
             CPPUNIT_ASSERT( v == 100 );
-#endif
 
             stack.clear();
             CPPUNIT_ASSERT( stack.empty() );
index 4105170fa4aff7774ba66b88fef65376a88d6b52..0a20d07b2c6c8bd074c26d45368466dd43cdabad 100644 (file)
@@ -326,7 +326,6 @@ namespace tree {
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
@@ -351,7 +350,6 @@ namespace tree {
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
-#       endif
         }
 
         template <typename Map>
index b8726e9db9c7f9f7083bdfcf6cfe5f0c281a0213..06e916d48ccfd508070424ea585a574a25ec3cf6 100644 (file)
@@ -426,7 +426,6 @@ namespace tree {
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
-#       ifdef CDS_EMPLACE_SUPPORT
             // emplace test
             CPPUNIT_ASSERT( s.emplace( 151 )) ;  // key = 151,  val = 1510
             CPPUNIT_ASSERT( s.emplace( 174, 471 )) ;    // key = 174, val = 471
@@ -460,7 +459,6 @@ namespace tree {
             s.clear();
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
-#       endif
         }
 
         template <typename Set>