[libsigcplusplus/variadic_mem_fun3: 88/148] compose: Do some perfect forwarding.



commit 7d36d9b604f386d77140f2045c5adc25234c828a
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Mar 3 09:54:07 2016 +0100

    compose: Do some perfect forwarding.

 sigc++/adaptors/compose.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/adaptors/compose.h b/sigc++/adaptors/compose.h
index e57f009..11b61a9 100644
--- a/sigc++/adaptors/compose.h
+++ b/sigc++/adaptors/compose.h
@@ -53,8 +53,8 @@ struct compose1_functor : public adapts<T_setter>
 
   template <class... T_arg>
   decltype(auto)
-  operator()(T_arg... _A_a)
-    { return this->functor_(get_(_A_a...));
+  operator()(T_arg&&... _A_a)
+    { return this->functor_(get_(std::forward<T_arg>(_A_a)...));
     }
 
   /** Constructs a compose1_functor object that combines the passed functors.


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