[libsigc++2/variadic_bind2: 46/68] bind_functor::operator()(): Give this a dummy template parameter.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic_bind2: 46/68] bind_functor::operator()(): Give this a dummy template parameter.
- Date: Tue, 1 Mar 2016 21:47:35 +0000 (UTC)
commit 2b4a33f8b5ca69bef8f4ad6ae4c401f2f73ee6b2
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jan 15 08:57:17 2016 +0100
bind_functor::operator()(): Give this a dummy template parameter.
And remove the m4 ifelse from slot.h.m4 because we can now resolve
that operator() when calling it with an empty variadic parameter pack.
sigc++/adaptors/macros/bind.h.m4 | 2 ++
sigc++/functors/macros/slot.h.m4 | 4 ----
2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/sigc++/adaptors/macros/bind.h.m4 b/sigc++/adaptors/macros/bind.h.m4
index be37954..2529581 100644
--- a/sigc++/adaptors/macros/bind.h.m4
+++ b/sigc++/adaptors/macros/bind.h.m4
@@ -69,6 +69,7 @@ struct bind_functor<$1, T_functor, T_bound, LIST(LOOP(nil, CALL_SIZE - 1))> : pu
/** Invokes the wrapped functor passing on the bound argument only.
* @return The return value of the functor invocation.
*/
+ template <class T_DummyArg = void> //TODO: Remove this workaround when operator() is variadic. See
https://bugzilla.gnome.org/show_bug.cgi?id=753612#c25
decltype(auto)
operator()()
{
@@ -108,6 +109,7 @@ struct bind_functor<LIST(-1, T_functor, LIST(LOOP(T_type%1, $1), LOOP(nil, CALL_
/** Invokes the wrapped functor passing on the bound argument only.
* @return The return value of the functor invocation.
*/
+ template <class T_DummyArg = void> //TODO: Remove this workaround when operator() is variadic. See
https://bugzilla.gnome.org/show_bug.cgi?id=753612#c25
decltype(auto)
operator()()
{
diff --git a/sigc++/functors/macros/slot.h.m4 b/sigc++/functors/macros/slot.h.m4
index e1338a9..5e2d407 100644
--- a/sigc++/functors/macros/slot.h.m4
+++ b/sigc++/functors/macros/slot.h.m4
@@ -332,12 +332,8 @@ FOR(1, $1,[
//TODO_variadic: Avoid the specific call to the () overload when
//bind_functor::operator() is variadic. Then we can make this whole class
//variadic, and others that use it.
-ifelse($1,0,[
- return (typed_rep->functor_)();
-],[
return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<type_trait_take_t<T_arg>...>
(a_...);
-])dnl
}
/** Forms a function pointer from call_it().
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]