From 4c65085391c06df2a7b1acb4767e63aee6763d2c Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 31 Jul 2009 22:26:32 -0400 Subject: forward_list.h (splice_after): Use forward. * include/bits/forward_list.h (splice_after): Use forward. (merge): Likewise. * include/bits/stl_iterator.h (move_iterator::operator*): Use move. (move_iterator::operator[]): Use move. * include/bits/stl_list.h (insert): Use move. * include/std/thread (_Callable constructor): Use forward. * include/std/tuple: Don't specify explicit template args to move. From-SVN: r150326 --- libstdc++-v3/include/std/thread | 5 ++++- libstdc++-v3/include/std/tuple | 13 ++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'libstdc++-v3/include/std') diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread index bf282cc..83b259d 100644 --- a/libstdc++-v3/include/std/thread +++ b/libstdc++-v3/include/std/thread @@ -126,7 +126,10 @@ namespace std template explicit thread(_Callable __f) - { _M_start_thread(_M_make_routine<_Callable>(__f)); } + { + _M_start_thread(_M_make_routine<_Callable> + (std::forward<_Callable>(__f))); + } template thread(_Callable&& __f, _Args&&... __args) diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 8dc8dcf..18cd89b 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -164,7 +164,7 @@ namespace std : _Inherited(__in._M_tail()), _Base(__in._M_head()) { } _Tuple_impl(_Tuple_impl&& __in) - : _Inherited(std::move<_Inherited&&>(__in._M_tail())), + : _Inherited(std::move(__in._M_tail())), _Base(std::forward<_Head>(__in._M_head())) { } template @@ -173,8 +173,7 @@ namespace std template _Tuple_impl(_Tuple_impl<_Idx, _UElements...>&& __in) - : _Inherited(std::move:: - _Inherited&&>(__in._M_tail())), + : _Inherited(std::move(__in._M_tail())), _Base(std::forward:: _Base>(__in._M_head())) { } @@ -244,7 +243,7 @@ namespace std : _Inherited(static_cast(__in)) { } tuple(tuple&& __in) - : _Inherited(std::move<_Inherited>(__in)) { } + : _Inherited(static_cast<_Inherited&&>(__in)) { } template tuple(const tuple<_UElements...>& __in) @@ -253,7 +252,7 @@ namespace std template tuple(tuple<_UElements...>&& __in) - : _Inherited(std::move<_Tuple_impl<0, _UElements...> >(__in)) { } + : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } // XXX http://gcc.gnu.org/ml/libstdc++/2008-02/msg00047.html template @@ -327,7 +326,7 @@ namespace std : _Inherited(static_cast(__in)) { } tuple(tuple&& __in) - : _Inherited(std::move<_Inherited>(__in)) { } + : _Inherited(static_cast<_Inherited&&>(__in)) { } template tuple(const tuple<_U1, _U2>& __in) @@ -335,7 +334,7 @@ namespace std template tuple(tuple<_U1, _U2>&& __in) - : _Inherited(std::move<_Tuple_impl<0, _U1, _U2> >(__in)) { } + : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template tuple(const pair<_U1, _U2>& __in) -- cgit v1.1