diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-06-10 10:24:46 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-06-10 10:24:46 +0000 |
commit | 87b2e74657cad904e532f17010c4ed6da098bebf (patch) | |
tree | 863e86bc39ab1b61eb9718477af80edf384da1de /libstdc++-v3/include | |
parent | cefab2e4825e2e5dd8bfdf79ed78372ec6462f1e (diff) | |
download | gcc-87b2e74657cad904e532f17010c4ed6da098bebf.zip gcc-87b2e74657cad904e532f17010c4ed6da098bebf.tar.gz gcc-87b2e74657cad904e532f17010c4ed6da098bebf.tar.bz2 |
re PR libstdc++/44487 ([C++0x] pair of references doesn't work)
2010-06-10 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/44487
* include/bits/stl_pair.h (pair(pair&&)): Remove.
(pair(pair<_U1, _U2>&&): Use forward, consistently with Bullet 5
of LWG 1326.
* include/std/tuple (tuple(pair<_U1, _U2>&&)): Likewise.
* testsuite/20_util/pair/44487.cc: Add.
* testsuite/20_util/tuple/cons/44487.cc: Likewise.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
line numbers.
From-SVN: r160528
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/stl_pair.h | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/std/tuple | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 6c2b51e..c5f2986 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -120,10 +120,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } - pair(pair&& __p) - : first(std::move(__p.first)), - second(std::move(__p.second)) { } - template<class... _Args1, class... _Args2> pair(piecewise_construct_t, tuple<_Args1...> __first_args, @@ -141,8 +137,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #ifdef __GXX_EXPERIMENTAL_CXX0X__ template<class _U1, class _U2> pair(pair<_U1, _U2>&& __p) - : first(std::move(__p.first)), - second(std::move(__p.second)) { } + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } pair& operator=(pair&& __p) diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index f9aa14f..027442d 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -341,7 +341,8 @@ namespace std template<typename _U1, typename _U2> tuple(pair<_U1, _U2>&& __in) - : _Inherited(std::move(__in.first), std::move(__in.second)) { } + : _Inherited(std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } tuple& operator=(const tuple& __in) |