[libsigc++2/variadic_mem_fun2] mem_fun(): Use base mem_functor_base instead of the aliases.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic_mem_fun2] mem_fun(): Use base mem_functor_base instead of the aliases.
- Date: Fri, 4 Mar 2016 14:27:09 +0000 (UTC)
commit 455180cb319c0a15be237526d1dbba42fc99373a
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Mar 4 15:11:33 2016 +0100
mem_fun(): Use base mem_functor_base instead of the aliases.
Thus making the mem_functor, const_mem_functor, const_volatile_mem_functor,
etc, aliases unused.
sigc++/functors/macros/mem_fun.h.m4 | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/sigc++/functors/macros/mem_fun.h.m4 b/sigc++/functors/macros/mem_fun.h.m4
index 3bcbea7..5f87d66 100644
--- a/sigc++/functors/macros/mem_fun.h.m4
+++ b/sigc++/functors/macros/mem_fun.h.m4
@@ -68,7 +68,10 @@ define([MEM_FUN],[dnl
template <class T_return, class T_obj, class... T_arg>
inline decltype(auto)
mem_fun(T_return (T_obj::*_A_func)(T_arg...) $3)
-{ return [$1]mem_functor<T_return, T_obj, T_arg...>(_A_func); }
+{ return mem_functor_base<
+ T_return (T_obj::*)(T_arg...) $3,
+ [$2] T_obj,
+ T_return, T_obj, T_arg...>(_A_func); }
])
define([BOUND_MEM_FUN],[dnl
@@ -197,10 +200,11 @@ protected:
function_type func_ptr_;
};
+//mem_functor and const_mem_functor are just convenience aliases used in the
+//definition of functor_trait<> specializations. TODO: Remove them?
+
MEMBER_FUNCTOR([],[],[])
MEMBER_FUNCTOR([const_],[const],[const])
-MEMBER_FUNCTOR([volatile_],[],[volatile])
-MEMBER_FUNCTOR([const_volatile_],[const],[const volatile])
//TODO: Change T_limit_reference to a template template parameter,
//but without having to specify both of the limit_reference<typename, typename>
@@ -279,6 +283,7 @@ MEM_FUN([],[],[])
MEM_FUN([const_],[const],[const])
MEM_FUN([volatile_],[],[volatile])
MEM_FUN([const_volatile_],[const],[const volatile])
+
BOUND_MEM_FUN([],[],[])
BOUND_MEM_FUN([const_],[const],[const])
BOUND_MEM_FUN([volatile_],[],[volatile])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]