[libsigc++2/variadic_bind4] hide_functor::operator(): Do some perfect forwarding.



commit c9834e67772cbe9f3af6d44f828392c556b37a00
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Mar 3 22:26:09 2016 +0100

    hide_functor::operator(): Do some perfect forwarding.

 sigc++/adaptors/hide.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/adaptors/hide.h b/sigc++/adaptors/hide.h
index 71ffdf5..2417ff9 100644
--- a/sigc++/adaptors/hide.h
+++ b/sigc++/adaptors/hide.h
@@ -77,11 +77,11 @@ struct hide_functor : public adapts<T_functor>
    */
   template <class... T_arg>
   decltype(auto)
-  operator()(T_arg... _A_a)
+  operator()(T_arg&&... _A_a)
     {
        constexpr auto size = sizeof...(T_arg);
        constexpr auto index_ignore = (I_location == -1 ? size - 1 : I_location);
-       const auto t = std::tuple<T_arg...>(_A_a...);
+       const auto t = std::tuple<T_arg...>(std::forward<T_arg>(_A_a)...);
 
        const auto t_start = internal::tuple_start<index_ignore>(t);
        const auto t_end = internal::tuple_end<size - index_ignore - 1>(t);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]