[libsigcplusplus/variadic_mem_fun3: 116/148] mem_func.h.m4: Have just one visitor specialization for bound_mem_functor_base.



commit 5df4138653e9cdb4f8be44ff97755ef9b7177f45
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 4 13:48:58 2016 +0100

    mem_func.h.m4: Have just one visitor specialization for bound_mem_functor_base.

 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 9f355a2..81dfeb8 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
@@ -273,6 +253,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])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]