From 92506eed552aa483a54a97bb622d92d2bd0d9538 Mon Sep 17 00:00:00 2001 From: khizmax Date: Fri, 19 Sep 2014 11:56:38 +0400 Subject: [PATCH] Remove cds/details/std/memory.h, use STL instead --- cds/container/basket_queue.h | 3 +- cds/container/lazy_kvlist_impl.h | 2 +- cds/container/lazy_kvlist_nogc.h | 2 +- cds/container/lazy_kvlist_rcu.h | 2 +- cds/container/lazy_list_impl.h | 2 +- cds/container/lazy_list_nogc.h | 2 +- cds/container/lazy_list_rcu.h | 2 +- cds/container/michael_deque.h | 2 +- cds/container/michael_kvlist_impl.h | 2 +- cds/container/michael_kvlist_nogc.h | 2 +- cds/container/michael_kvlist_rcu.h | 2 +- cds/container/michael_list_impl.h | 2 +- cds/container/michael_list_nogc.h | 2 +- cds/container/michael_list_rcu.h | 2 +- cds/container/moir_queue.h | 2 +- cds/container/mspriority_queue.h | 2 +- cds/container/msqueue.h | 2 +- cds/container/optimistic_queue.h | 2 +- cds/container/rwqueue.h | 2 +- cds/container/segmented_queue.h | 2 +- cds/container/treiber_stack.h | 2 +- cds/container/tsigas_cycle_queue.h | 2 +- cds/details/std/memory.h | 108 -------------------- cds/intrusive/cuckoo_set.h | 2 +- cds/intrusive/ellen_bintree_impl.h | 2 +- cds/intrusive/ellen_bintree_rcu.h | 2 +- cds/intrusive/skip_list_impl.h | 2 +- cds/intrusive/skip_list_nogc.h | 2 +- cds/intrusive/skip_list_rcu.h | 2 +- cds/intrusive/striped_set/striping_policy.h | 2 +- cds/memory/michael/bound_check.h | 2 +- cds/urcu/dispose_thread.h | 2 +- tests/unit/pqueue/pop.cpp | 2 +- tests/unit/pqueue/push.cpp | 2 +- tests/unit/pqueue/push_pop.cpp | 2 +- 35 files changed, 35 insertions(+), 142 deletions(-) delete mode 100644 cds/details/std/memory.h diff --git a/cds/container/basket_queue.h b/cds/container/basket_queue.h index 991b3cb3..b0425e0a 100644 --- a/cds/container/basket_queue.h +++ b/cds/container/basket_queue.h @@ -3,11 +3,12 @@ #ifndef __CDS_CONTAINER_BASKET_QUEUE_H #define __CDS_CONTAINER_BASKET_QUEUE_H +#include #include #include #include #include -#include + namespace cds { namespace container { diff --git a/cds/container/lazy_kvlist_impl.h b/cds/container/lazy_kvlist_impl.h index 4b09260f..97a53e54 100644 --- a/cds/container/lazy_kvlist_impl.h +++ b/cds/container/lazy_kvlist_impl.h @@ -3,9 +3,9 @@ #ifndef __CDS_CONTAINER_LAZY_KVLIST_IMPL_H #define __CDS_CONTAINER_LAZY_KVLIST_IMPL_H +#include #include #include -#include #include namespace cds { namespace container { diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index 5b8b5c4f..0d7017da 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -3,11 +3,11 @@ #ifndef __CDS_CONTAINER_LAZY_KVLIST_NOGC_H #define __CDS_CONTAINER_LAZY_KVLIST_NOGC_H +#include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/lazy_kvlist_rcu.h b/cds/container/lazy_kvlist_rcu.h index dcc9de86..266cb5c1 100644 --- a/cds/container/lazy_kvlist_rcu.h +++ b/cds/container/lazy_kvlist_rcu.h @@ -3,12 +3,12 @@ #ifndef __CDS_CONTAINER_LAZY_KVLIST_RCU_H #define __CDS_CONTAINER_LAZY_KVLIST_RCU_H +#include #include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/lazy_list_impl.h b/cds/container/lazy_list_impl.h index 8b675db3..1ed6fcb0 100644 --- a/cds/container/lazy_list_impl.h +++ b/cds/container/lazy_list_impl.h @@ -3,7 +3,7 @@ #ifndef __CDS_CONTAINER_LAZY_LIST_IMPL_H #define __CDS_CONTAINER_LAZY_LIST_IMPL_H -#include +#include #include namespace cds { namespace container { diff --git a/cds/container/lazy_list_nogc.h b/cds/container/lazy_list_nogc.h index 642931ab..5c08d1f8 100644 --- a/cds/container/lazy_list_nogc.h +++ b/cds/container/lazy_list_nogc.h @@ -3,10 +3,10 @@ #ifndef __CDS_CONTAINER_LAZY_LIST_NOGC_H #define __CDS_CONTAINER_LAZY_LIST_NOGC_H +#include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/lazy_list_rcu.h b/cds/container/lazy_list_rcu.h index f93d2d5c..77dfe416 100644 --- a/cds/container/lazy_list_rcu.h +++ b/cds/container/lazy_list_rcu.h @@ -3,10 +3,10 @@ #ifndef __CDS_CONTAINER_LAZY_LIST_RCU_H #define __CDS_CONTAINER_LAZY_LIST_RCU_H +#include #include #include #include -#include #include namespace cds { namespace container { diff --git a/cds/container/michael_deque.h b/cds/container/michael_deque.h index da9b7cb8..7cac6462 100644 --- a/cds/container/michael_deque.h +++ b/cds/container/michael_deque.h @@ -3,9 +3,9 @@ #ifndef __CDS_CONTAINER_MICHAEL_DEQUE_H #define __CDS_CONTAINER_MICHAEL_DEQUE_H +#include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/michael_kvlist_impl.h b/cds/container/michael_kvlist_impl.h index f67727a6..9aa13cfc 100644 --- a/cds/container/michael_kvlist_impl.h +++ b/cds/container/michael_kvlist_impl.h @@ -3,9 +3,9 @@ #ifndef __CDS_CONTAINER_MICHAEL_KVLIST_IMPL_H #define __CDS_CONTAINER_MICHAEL_KVLIST_IMPL_H +#include #include #include -#include #include namespace cds { namespace container { diff --git a/cds/container/michael_kvlist_nogc.h b/cds/container/michael_kvlist_nogc.h index 33a5017c..01c2da07 100644 --- a/cds/container/michael_kvlist_nogc.h +++ b/cds/container/michael_kvlist_nogc.h @@ -3,11 +3,11 @@ #ifndef __CDS_CONTAINER_MICHAEL_KVLIST_NOGC_H #define __CDS_CONTAINER_MICHAEL_KVLIST_NOGC_H +#include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/michael_kvlist_rcu.h b/cds/container/michael_kvlist_rcu.h index 1092ed16..06b69e63 100644 --- a/cds/container/michael_kvlist_rcu.h +++ b/cds/container/michael_kvlist_rcu.h @@ -3,12 +3,12 @@ #ifndef __CDS_CONTAINER_MICHAEL_KVLIST_RCU_H #define __CDS_CONTAINER_MICHAEL_KVLIST_RCU_H +#include #include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/michael_list_impl.h b/cds/container/michael_list_impl.h index 739bbc58..ccec178a 100644 --- a/cds/container/michael_list_impl.h +++ b/cds/container/michael_list_impl.h @@ -3,7 +3,7 @@ #ifndef __CDS_CONTAINER_MICHAEL_LIST_IMPL_H #define __CDS_CONTAINER_MICHAEL_LIST_IMPL_H -#include +#include #include namespace cds { namespace container { diff --git a/cds/container/michael_list_nogc.h b/cds/container/michael_list_nogc.h index ed02c4e6..e18a10da 100644 --- a/cds/container/michael_list_nogc.h +++ b/cds/container/michael_list_nogc.h @@ -3,10 +3,10 @@ #ifndef __CDS_CONTAINER_MICHAEL_LIST_NOGC_H #define __CDS_CONTAINER_MICHAEL_LIST_NOGC_H +#include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/michael_list_rcu.h b/cds/container/michael_list_rcu.h index 91295e1a..9a46b000 100644 --- a/cds/container/michael_list_rcu.h +++ b/cds/container/michael_list_rcu.h @@ -3,11 +3,11 @@ #ifndef __CDS_CONTAINER_MICHAEL_LIST_RCU_H #define __CDS_CONTAINER_MICHAEL_LIST_RCU_H +#include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/moir_queue.h b/cds/container/moir_queue.h index fba29773..5f881eac 100644 --- a/cds/container/moir_queue.h +++ b/cds/container/moir_queue.h @@ -3,12 +3,12 @@ #ifndef __CDS_CONTAINER_MOIR_QUEUE_H #define __CDS_CONTAINER_MOIR_QUEUE_H +#include #include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/mspriority_queue.h b/cds/container/mspriority_queue.h index 2f83b5a3..a451b4cd 100644 --- a/cds/container/mspriority_queue.h +++ b/cds/container/mspriority_queue.h @@ -3,9 +3,9 @@ #ifndef __CDS_CONTAINER_MSPRIORITY_QUEUE_H #define __CDS_CONTAINER_MSPRIORITY_QUEUE_H +#include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/msqueue.h b/cds/container/msqueue.h index 29c33553..a6ecd6c2 100644 --- a/cds/container/msqueue.h +++ b/cds/container/msqueue.h @@ -3,11 +3,11 @@ #ifndef __CDS_CONTAINER_MSQUEUE_H #define __CDS_CONTAINER_MSQUEUE_H +#include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/optimistic_queue.h b/cds/container/optimistic_queue.h index ca92861a..f9faeade 100644 --- a/cds/container/optimistic_queue.h +++ b/cds/container/optimistic_queue.h @@ -3,11 +3,11 @@ #ifndef __CDS_CONTAINER_OPTIMISTIC_QUEUE_H #define __CDS_CONTAINER_OPTIMISTIC_QUEUE_H +#include #include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/rwqueue.h b/cds/container/rwqueue.h index e2c66b8c..754ec3ed 100644 --- a/cds/container/rwqueue.h +++ b/cds/container/rwqueue.h @@ -3,12 +3,12 @@ #ifndef __CDS_CONTAINER_RWQUEUE_H #define __CDS_CONTAINER_RWQUEUE_H +#include #include #include #include #include #include -#include #include namespace cds { namespace container { diff --git a/cds/container/segmented_queue.h b/cds/container/segmented_queue.h index 45b894be..3026019c 100644 --- a/cds/container/segmented_queue.h +++ b/cds/container/segmented_queue.h @@ -3,9 +3,9 @@ #ifndef __CDS_CONTAINER_SEGMENTED_QUEUE_H #define __CDS_CONTAINER_SEGMENTED_QUEUE_H +#include #include #include -#include #include namespace cds { namespace container { diff --git a/cds/container/treiber_stack.h b/cds/container/treiber_stack.h index 63d0e860..0360ad9e 100644 --- a/cds/container/treiber_stack.h +++ b/cds/container/treiber_stack.h @@ -3,9 +3,9 @@ #ifndef __CDS_CONTAINER_TREIBER_STACK_H #define __CDS_CONTAINER_TREIBER_STACK_H +#include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/tsigas_cycle_queue.h b/cds/container/tsigas_cycle_queue.h index 7ea351a7..0e905050 100644 --- a/cds/container/tsigas_cycle_queue.h +++ b/cds/container/tsigas_cycle_queue.h @@ -3,10 +3,10 @@ #ifndef __CDS_CONTAINER_TSIGAS_CYCLE_QUEUE_H #define __CDS_CONTAINER_TSIGAS_CYCLE_QUEUE_H +#include #include #include #include -#include namespace cds { namespace container { diff --git a/cds/details/std/memory.h b/cds/details/std/memory.h deleted file mode 100644 index 8c0682ef..00000000 --- a/cds/details/std/memory.h +++ /dev/null @@ -1,108 +0,0 @@ -//$$CDS-header$$ - -//@cond -#ifndef __CDS_DETAILS_STD_MEMORY_H -#define __CDS_DETAILS_STD_MEMORY_H - -#include -#include - -// ----------------------------------------------------------------- -// std::unique_ptr - -#if ((CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL) && _MSC_VER == 1500) \ - || (CDS_COMPILER == CDS_COMPILER_GCC && CDS_COMPILER_VERSION < 40400 ) -// MS VC 2008, GCC 4.3 - -namespace std { - template struct default_delete { - default_delete() - {} - void operator()(T* p) const - { - delete p; - } - }; - - template > - class unique_ptr: private auto_ptr - { - typedef auto_ptr base_class; - - // copy ctor is deleted - template unique_ptr( unique_ptr const& s ); - - public: - unique_ptr() throw() - {} - - explicit unique_ptr( T * p ) throw() - : base_class( p ) - {} - - ~unique_ptr() - { - T * p = release(); - if ( p ) - Deleter()( p ); - } - - T * operator ->() const throw() - { - return base_class::operator->(); - } - - T& operator *() throw() - { - return base_class::operator*(); - } - - unique_ptr& operator=( T * p ) - { - base_class::operator=(p); - return *this; - } - - T * get() const throw() - { - return base_class::get(); - } - - T * release() throw() - { - return base_class::release(); - } - - void reset( T * p ) - { - T * pOld = release(); - assert( p != pOld ); - if ( pOld ) - Deleter()( pOld ); - base_class::reset( p ); - } - }; -} - -#endif -// ----------------------------------------------------------------- -// std::shared_ptr - -#if (CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL) && _MSC_VER == 1500 -// MS VC 2008 - -#include -#include -#include - -namespace std { - using boost::shared_ptr; - using boost::make_shared; - using boost::allocate_shared; - using boost::enable_shared_from_this; -} // namespace std -#endif - - -#endif // #ifndef __CDS_DETAILS_STD_MEMORY_H -//@endcond diff --git a/cds/intrusive/cuckoo_set.h b/cds/intrusive/cuckoo_set.h index b6196c3b..3a36a98a 100644 --- a/cds/intrusive/cuckoo_set.h +++ b/cds/intrusive/cuckoo_set.h @@ -3,6 +3,7 @@ #ifndef __CDS_INTRUSIVE_CUCKOO_SET_H #define __CDS_INTRUSIVE_CUCKOO_SET_H +#include #include #include #include @@ -10,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/cds/intrusive/ellen_bintree_impl.h b/cds/intrusive/ellen_bintree_impl.h index 5bfdd0a0..f4890a8d 100644 --- a/cds/intrusive/ellen_bintree_impl.h +++ b/cds/intrusive/ellen_bintree_impl.h @@ -3,12 +3,12 @@ #ifndef __CDS_INTRUSIVE_ELLEN_BINTREE_IMPL_H #define __CDS_INTRUSIVE_ELLEN_BINTREE_IMPL_H +#include #include #include #include #include #include -#include #include namespace cds { namespace intrusive { diff --git a/cds/intrusive/ellen_bintree_rcu.h b/cds/intrusive/ellen_bintree_rcu.h index eac4ee06..5d9c35b6 100644 --- a/cds/intrusive/ellen_bintree_rcu.h +++ b/cds/intrusive/ellen_bintree_rcu.h @@ -3,12 +3,12 @@ #ifndef __CDS_INTRUSIVE_ELLEN_BINTREE_RCU_H #define __CDS_INTRUSIVE_ELLEN_BINTREE_RCU_H +#include #include #include #include #include #include -#include #include namespace cds { namespace intrusive { diff --git a/cds/intrusive/skip_list_impl.h b/cds/intrusive/skip_list_impl.h index 9822023a..a2c19d25 100644 --- a/cds/intrusive/skip_list_impl.h +++ b/cds/intrusive/skip_list_impl.h @@ -4,8 +4,8 @@ #define __CDS_INTRUSIVE_SKIP_LIST_IMPL_H #include +#include #include -#include #include #include #include diff --git a/cds/intrusive/skip_list_nogc.h b/cds/intrusive/skip_list_nogc.h index da524bdc..112e1b27 100644 --- a/cds/intrusive/skip_list_nogc.h +++ b/cds/intrusive/skip_list_nogc.h @@ -4,9 +4,9 @@ #define __CDS_INTRUSIVE_SKIP_LIST_NOGC_H #include +#include #include #include -#include #include #include #include diff --git a/cds/intrusive/skip_list_rcu.h b/cds/intrusive/skip_list_rcu.h index 07975ec9..d6d08839 100644 --- a/cds/intrusive/skip_list_rcu.h +++ b/cds/intrusive/skip_list_rcu.h @@ -4,8 +4,8 @@ #define __CDS_INTRUSIVE_SKIP_LIST_RCU_H #include +#include #include -#include #include #include #include diff --git a/cds/intrusive/striped_set/striping_policy.h b/cds/intrusive/striped_set/striping_policy.h index 881d2cf4..579563c0 100644 --- a/cds/intrusive/striped_set/striping_policy.h +++ b/cds/intrusive/striped_set/striping_policy.h @@ -3,9 +3,9 @@ #ifndef __CDS_INTRUSIVE_STRIPED_SET_STRIPING_POLICY_H #define __CDS_INTRUSIVE_STRIPED_SET_STRIPING_POLICY_H +#include #include #include -#include #include #include diff --git a/cds/memory/michael/bound_check.h b/cds/memory/michael/bound_check.h index 46f9f9da..02cc7bc0 100644 --- a/cds/memory/michael/bound_check.h +++ b/cds/memory/michael/bound_check.h @@ -3,9 +3,9 @@ #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_BOUND_CHECK_H #define __CDS_MEMORY_MICHAEL_ALLOCATOR_BOUND_CHECK_H -#include #include #include +#include namespace cds { namespace memory { namespace michael { diff --git a/cds/urcu/dispose_thread.h b/cds/urcu/dispose_thread.h index 5a8686fb..acad1b44 100644 --- a/cds/urcu/dispose_thread.h +++ b/cds/urcu/dispose_thread.h @@ -3,10 +3,10 @@ #ifndef _CDS_URCU_DISPOSE_THREAD_H #define _CDS_URCU_DISPOSE_THREAD_H +#include #include #include #include -#include // unique_ptr #include namespace cds { namespace urcu { diff --git a/tests/unit/pqueue/pop.cpp b/tests/unit/pqueue/pop.cpp index c7e63926..97fef068 100644 --- a/tests/unit/pqueue/pop.cpp +++ b/tests/unit/pqueue/pop.cpp @@ -6,7 +6,7 @@ #include #include // random_shuffle -#include +#include namespace pqueue { diff --git a/tests/unit/pqueue/push.cpp b/tests/unit/pqueue/push.cpp index 0c4c1212..4ce07926 100644 --- a/tests/unit/pqueue/push.cpp +++ b/tests/unit/pqueue/push.cpp @@ -6,7 +6,7 @@ #include #include // random_shuffle -#include +#include namespace pqueue { diff --git a/tests/unit/pqueue/push_pop.cpp b/tests/unit/pqueue/push_pop.cpp index 84b69aaa..51c27eba 100644 --- a/tests/unit/pqueue/push_pop.cpp +++ b/tests/unit/pqueue/push_pop.cpp @@ -6,7 +6,7 @@ #include #include // random_shuffle -#include +#include namespace pqueue { -- 2.34.1