summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-03-04 15:24:24 +0100
committerMurray Cumming <murrayc@murrayc.com>2016-03-04 15:24:24 +0100
commit8bf3fa43ea07c65319906152dd4ef97645a3d4b4 (patch)
tree3b714a563db5a223a03f919daec6681300e41fb7
parent455180cb319c0a15be237526d1dbba42fc99373a (diff)
downloadsigc++-8bf3fa43ea07c65319906152dd4ef97645a3d4b4.tar.gz
mem_fun(): Use base bound_mem_functor_base instead of the aliases.
Thus making the bound_mem_functor, bound_const_mem_functor, bound_const_volatile_mem_functor, etc, aliases unused.
-rw-r--r--sigc++/functors/macros/mem_fun.h.m424
1 files changed, 19 insertions, 5 deletions
diff --git a/sigc++/functors/macros/mem_fun.h.m4 b/sigc++/functors/macros/mem_fun.h.m4
index 5f87d66..539245b 100644
--- a/sigc++/functors/macros/mem_fun.h.m4
+++ b/sigc++/functors/macros/mem_fun.h.m4
@@ -85,7 +85,13 @@ define([BOUND_MEM_FUN],[dnl
template <class T_return, class T_obj, class T_obj2, class... T_arg>
inline decltype(auto)
mem_fun(/*$2*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg...) $3)
-{ return bound_[$1]mem_functor<T_return, T_obj, T_arg...>(_A_obj, _A_func); }
+{
+ return bound_mem_functor_base<
+ [$1]limit_reference<T_obj>,
+ T_return (T_obj::*)(T_arg...) $3,
+ $2 T_obj,
+ T_return, T_obj, T_arg...>(_A_obj, _A_func);
+}
/** Creates a functor of type sigc::bound_[$1]mem_functor which encapsulates a method and an object instance.
* @param _A_obj Reference to object instance the functor should operate on.
@@ -97,7 +103,13 @@ mem_fun(/*$2*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg...) $3)
template <class T_return, class T_obj, class T_obj2, class... T_arg>
inline decltype(auto)
mem_fun(/*$2*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg...) $3)
-{ return bound_[$1]mem_functor<T_return, T_obj, T_arg...>(_A_obj, _A_func); }
+{
+ return bound_mem_functor_base<
+ [$1]limit_reference<T_obj>,
+ T_return (T_obj::*)(T_arg...) $3,
+ $2 T_obj,
+ T_return, T_obj, T_arg...>(_A_obj, _A_func);
+}
])
@@ -274,10 +286,12 @@ struct visitor<bound_mem_functor_base<T_func, T_obj_with_modifier, T_return, T_o
};
#endif // DOXYGEN_SHOULD_SKIP_THIS
-BOUND_MEMBER_FUNCTOR([],[],[])
+
+//bound_const_mem_functor is just a convenience aliases used in the
+//definition of make_slot(). TODO: Remove it?
+
BOUND_MEMBER_FUNCTOR([const_],[const],[const])
-BOUND_MEMBER_FUNCTOR([volatile_],[],[volatile])
-BOUND_MEMBER_FUNCTOR([const_volatile_],[const],[const volatile])
+
MEM_FUN([],[],[])
MEM_FUN([const_],[const],[const])