summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-03-02 13:36:30 +0100
committerMurray Cumming <murrayc@murrayc.com>2016-03-02 14:37:54 +0100
commitae1a63c44732461b7bb1534c6eef5567be479826 (patch)
tree8ae4b8bc06307a75d7d260c0f17c42f71a775279
parentb9a461c5e42b4abddcf40abc3cd92f107bc5eda8 (diff)
downloadsigc++-variadic_bind3.tar.gz
bind_functor::operator(): Do perfect forwarding.variadic_bind3
To be consistent with the other operator().
-rw-r--r--sigc++/adaptors/bind.h4
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);