3 #ifndef __CDS_DETAILS_FUNCTOR_WRAPPER_H
4 #define __CDS_DETAILS_FUNCTOR_WRAPPER_H
9 namespace cds { namespace details {
11 template <typename Functor>
12 struct functor_wrapper
18 functor_wrapper( Functor /*f*/)
27 template <typename Functor>
28 struct functor_wrapper<Functor&>
32 functor_wrapper( Functor& f)
42 template <typename Functor>
43 struct functor_wrapper< boost::reference_wrapper<Functor> >
45 boost::reference_wrapper<Functor> m_func;
47 functor_wrapper( boost::reference_wrapper<Functor> f)
57 template <typename Result, typename... Args>
58 struct functor_wrapper<Result (*)(Args...)>
60 typedef Result (* func_ptr)(Args...);
61 typedef Result (& func_ref)(Args...);
64 functor_wrapper( func_ptr f )
74 }} // namespace cds::details
77 #endif // #ifndef __CDS_DETAILS_FUNCTOR_WRAPPER_H