[libsigc++2/variadic_bind3: 45/45] bind_functor::operator(): Do perfect forwarding.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2/variadic_bind3: 45/45] bind_functor::operator(): Do perfect forwarding.
- Date: Wed, 2 Mar 2016 13:45:14 +0000 (UTC)
commit ae1a63c44732461b7bb1534c6eef5567be479826
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 0541afa..c040778 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]