diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-03-04 13:48:58 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-03-04 13:48:58 +0100 |
commit | 3c7787d699d8e3287b99c6c338084e441e90026e (patch) | |
tree | da8765a1dace9488ada78a27629f9cecfd3f9426 | |
parent | 59c7f316a6d74527ab1b7ce6678182e9791f2ad5 (diff) | |
download | sigc++-3c7787d699d8e3287b99c6c338084e441e90026e.tar.gz |
mem_func.h.m4: Have just one visitor specialization for bound_mem_functor_base.
-rw-r--r-- | sigc++/functors/macros/mem_fun.h.m4 | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/sigc++/functors/macros/mem_fun.h.m4 b/sigc++/functors/macros/mem_fun.h.m4 index 9c83afd..3bcbea7 100644 --- a/sigc++/functors/macros/mem_fun.h.m4 +++ b/sigc++/functors/macros/mem_fun.h.m4 @@ -56,26 +56,6 @@ using bound_[$1]mem_functor = T_return (T_obj::*)(T_arg...) $3, $2 T_obj, T_return, T_obj, T_arg...>; - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -//template specialization of visitor<>::do_visit_each<>(action, functor): -/** Performs a functor on each of the targets of a functor. - * The function overload for sigc::bound_[$1]mem_functor performs a functor - * on the object instance stored in the sigc::bound_[$1]mem_functor object. - * - * @ingroup mem_fun - */ -template <class T_return, class T_obj, class... T_arg> -struct visitor<bound_[$1]mem_functor<T_return, T_obj, T_arg...> > -{ - template <class T_action> - static void do_visit_each(const T_action& _A_action, - const bound_[$1]mem_functor<T_return, T_obj, T_arg...>& _A_target) - { - sigc::visit_each(_A_action, _A_target.obj_); - } -}; -#endif // DOXYGEN_SHOULD_SKIP_THIS ]) define([MEM_FUN],[dnl @@ -269,6 +249,27 @@ public: T_limit_reference obj_; }; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +//template specialization of visitor<>::do_visit_each<>(action, functor): +/** Performs a functor on each of the targets of a functor. + * The function overload for sigc::bound_[$1]mem_functor performs a functor + * on the object instance stored in the sigc::bound_[$1]mem_functor object. + * + * @ingroup mem_fun + */ +template <class T_func, class T_obj_with_modifier, class T_return, class T_obj, class... T_arg> +struct visitor<bound_mem_functor_base<T_func, T_obj_with_modifier, T_return, T_obj, T_arg...> > +{ + template <class T_action> + static void do_visit_each(const T_action& _A_action, + const bound_mem_functor_base<T_func, T_obj_with_modifier, T_return, T_obj, T_arg...>& _A_target) + { + sigc::visit_each(_A_action, _A_target.obj_); + } +}; +#endif // DOXYGEN_SHOULD_SKIP_THIS + BOUND_MEMBER_FUNCTOR([],[],[]) BOUND_MEMBER_FUNCTOR([const_],[const],[const]) BOUND_MEMBER_FUNCTOR([volatile_],[],[volatile]) |