[libsigcplusplus/variadic_mem_fun3: 81/148] bind_functor::operator(): Do perfect forwarding.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus/variadic_mem_fun3: 81/148] bind_functor::operator(): Do perfect forwarding.
- Date: Mon, 7 Mar 2016 10:04:36 +0000 (UTC)
commit 945b569c6970b44fbd22996d2b1e15eafe8e1027
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Mar 2 13:36:30 2016 +0100
bind_functor::operator(): Do perfect forwarding.
To be consistent with the other operator().
sigc++/adaptors/bind.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index 5816c19..6458a7d 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -127,13 +127,13 @@ struct bind_functor : public adapts<T_functor>
*/
template <class... T_arg>
decltype(auto)
- operator()(T_arg... _A_arg)
+ operator()(T_arg&&... _A_arg)
{
//For instance, if I_location is 1, and _A_arg has 4 arguments,
//we would want to call operator() with (_A_arg0, bound, _A_arg1, _A_arg2).
using tuple_type_args = std::tuple<type_trait_pass_t<T_arg>...>;
- auto t_args = std::tuple<T_arg...>(_A_arg...);
+ auto t_args = std::tuple<T_arg...>(std::forward<T_arg>(_A_arg)...);
constexpr auto t_args_size = std::tuple_size<tuple_type_args>::value;
auto t_start = tuple_start<I_location>(t_args);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]