From: khizmax Date: Tue, 30 Sep 2014 18:56:50 +0000 (+0400) Subject: Remove cds/detail/functor_wrapper.h X-Git-Tag: v2.0.0~250 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7a0d4407abe45b3e808e7d146f7d69c9e993d12d;p=libcds.git Remove cds/detail/functor_wrapper.h --- diff --git a/cds/container/ellen_bintree_map_rcu.h b/cds/container/ellen_bintree_map_rcu.h index 3ac34c43..471708ba 100644 --- a/cds/container/ellen_bintree_map_rcu.h +++ b/cds/container/ellen_bintree_map_rcu.h @@ -5,7 +5,6 @@ #include #include -#include namespace cds { namespace container { diff --git a/cds/container/impl/ellen_bintree_map.h b/cds/container/impl/ellen_bintree_map.h index e3e35ce1..47d3e625 100644 --- a/cds/container/impl/ellen_bintree_map.h +++ b/cds/container/impl/ellen_bintree_map.h @@ -6,7 +6,6 @@ #include #include #include -#include #include namespace cds { namespace container { diff --git a/cds/container/impl/lazy_kvlist.h b/cds/container/impl/lazy_kvlist.h index 3fc36447..6bd64468 100644 --- a/cds/container/impl/lazy_kvlist.h +++ b/cds/container/impl/lazy_kvlist.h @@ -5,7 +5,6 @@ #include #include // ref -#include #include namespace cds { namespace container { diff --git a/cds/container/impl/michael_kvlist.h b/cds/container/impl/michael_kvlist.h index cd50086f..8621b6f4 100644 --- a/cds/container/impl/michael_kvlist.h +++ b/cds/container/impl/michael_kvlist.h @@ -5,7 +5,6 @@ #include #include // ref -#include #include namespace cds { namespace container { diff --git a/cds/container/impl/skip_list_map.h b/cds/container/impl/skip_list_map.h index 6ad9a185..841d6d79 100644 --- a/cds/container/impl/skip_list_map.h +++ b/cds/container/impl/skip_list_map.h @@ -3,7 +3,6 @@ #ifndef __CDS_CONTAINER_IMPL_SKIP_LIST_MAP_H #define __CDS_CONTAINER_IMPL_SKIP_LIST_MAP_H -#include #include #include diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index f698242a..ebe65e4c 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -7,7 +7,6 @@ #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 c93b2d39..58dd6cc1 100644 --- a/cds/container/lazy_kvlist_rcu.h +++ b/cds/container/lazy_kvlist_rcu.h @@ -8,7 +8,6 @@ #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 b098279a..26ac7dd0 100644 --- a/cds/container/michael_kvlist_nogc.h +++ b/cds/container/michael_kvlist_nogc.h @@ -7,7 +7,6 @@ #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 679c6485..a568cadd 100644 --- a/cds/container/michael_kvlist_rcu.h +++ b/cds/container/michael_kvlist_rcu.h @@ -8,7 +8,6 @@ #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/skip_list_map_rcu.h b/cds/container/skip_list_map_rcu.h index 213c2fb5..4b98525d 100644 --- a/cds/container/skip_list_map_rcu.h +++ b/cds/container/skip_list_map_rcu.h @@ -6,7 +6,6 @@ #include #include #include -#include namespace cds { namespace container { diff --git a/cds/container/split_list_set.h b/cds/container/split_list_set.h index 901067d3..1cf94eec 100644 --- a/cds/container/split_list_set.h +++ b/cds/container/split_list_set.h @@ -5,7 +5,6 @@ #include #include -#include namespace cds { namespace container { diff --git a/cds/container/split_list_set_rcu.h b/cds/container/split_list_set_rcu.h index 4c4fc592..2ca942ea 100644 --- a/cds/container/split_list_set_rcu.h +++ b/cds/container/split_list_set_rcu.h @@ -5,7 +5,6 @@ #include #include -#include namespace cds { namespace container { diff --git a/cds/details/functor_wrapper.h b/cds/details/functor_wrapper.h deleted file mode 100644 index cb166d31..00000000 --- a/cds/details/functor_wrapper.h +++ /dev/null @@ -1,77 +0,0 @@ -//$$CDS-header$$ - -#ifndef __CDS_DETAILS_FUNCTOR_WRAPPER_H -#define __CDS_DETAILS_FUNCTOR_WRAPPER_H - -#include // ref - -//@cond -namespace cds { namespace details { - - template - struct functor_wrapper - { - public: - functor_wrapper() - {} - - functor_wrapper( Functor /*f*/) - {} - - Functor get() - { - return Functor(); - } - }; - - template - struct functor_wrapper - { - Functor& m_func; - public: - functor_wrapper( Functor& f) - : m_func(f) - {} - - Functor& get() - { - return m_func; - } - }; - - template - struct functor_wrapper< std::reference_wrapper > - { - std::reference_wrapper m_func; - public: - functor_wrapper( std::reference_wrapper f) - : m_func(f) - {} - - Functor& get() - { - return m_func.get(); - } - }; - - template - struct functor_wrapper - { - typedef Result (* func_ptr)(Args...); - typedef Result (& func_ref)(Args...); - func_ptr m_func; - public: - functor_wrapper( func_ptr f ) - : m_func(f) - {} - - func_ref get() - { - assert( m_func ); - return *m_func; - } - }; -}} // namespace cds::details -//@endcond - -#endif // #ifndef __CDS_DETAILS_FUNCTOR_WRAPPER_H diff --git a/cds/intrusive/cuckoo_set.h b/cds/intrusive/cuckoo_set.h index 6815bb7a..2b42e763 100644 --- a/cds/intrusive/cuckoo_set.h +++ b/cds/intrusive/cuckoo_set.h @@ -12,7 +12,6 @@ #include #include #include -#include #include diff --git a/cds/intrusive/details/split_list_base.h b/cds/intrusive/details/split_list_base.h index d88efac2..fd98568b 100644 --- a/cds/intrusive/details/split_list_base.h +++ b/cds/intrusive/details/split_list_base.h @@ -8,7 +8,6 @@ #include #include #include -#include namespace cds { namespace intrusive {