[libsigcplusplus/variadic_mem_fun3: 35/148] C++14: bind(): Use decltype(auto) for the return type.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus/variadic_mem_fun3: 35/148] C++14: bind(): Use decltype(auto) for the return type.
- Date: Mon, 7 Mar 2016 10:00:44 +0000 (UTC)
commit f098fa36574784d90490e4c3f4ab247fc1bdd2b5
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jan 8 15:26:39 2016 +0100
C++14: bind(): Use decltype(auto) for the return type.
This simplifies the code a bit.
sigc++/adaptors/macros/bind.h.m4 | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/sigc++/adaptors/macros/bind.h.m4 b/sigc++/adaptors/macros/bind.h.m4
index 7785de2..95701dd 100644
--- a/sigc++/adaptors/macros/bind.h.m4
+++ b/sigc++/adaptors/macros/bind.h.m4
@@ -189,10 +189,7 @@ FOR(1,$1,[
* @ingroup bind
*/
template <LIST(LOOP(class T_type%1, $1), class T_functor)>
-inline bind_functor<-1, T_functor,dnl
-FOR(1,eval($1-1),[
- T_type%1,])
- T_type$1>
+inline decltype(auto)
bind(const T_functor& _A_func, LOOP(T_type%1 _A_b%1, $1))
{ return bind_functor<-1, T_functor,dnl
FOR(1,eval($1-1),[
@@ -373,7 +370,7 @@ FOR(1,CALL_SIZE,[[BIND_FUNCTOR_COUNT(%1)]])dnl
* @ingroup bind
*/
template <int I_location, class T_bound1, class T_functor>
-inline bind_functor<I_location, T_functor, T_bound1>
+inline decltype(auto)
bind(const T_functor& _A_func, T_bound1 _A_b1)
{
return bind_functor<I_location, T_functor, T_bound1>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]