diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-01 22:22:57 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-01 22:22:57 +0000 |
commit | 9e169c4bf36a38689550c059570c57efbf00a6fb (patch) | |
tree | 95e6800f7ac2a49ff7f799d96f04172320e70ac0 /libstdc++-v3/include/std/tuple | |
parent | 6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad (diff) | |
download | gcc-vect256.tar.gz |
Merged trunk at revision 161680 into branch.vect256
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/vect256@161681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/tuple')
-rw-r--r-- | libstdc++-v3/include/std/tuple | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index f9aa14f2057..8b2252e3686 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -238,8 +238,7 @@ namespace std tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } - tuple(const tuple& __in) - : _Inherited(static_cast<const _Inherited&>(__in)) { } + tuple(const tuple&) = default; tuple(tuple&& __in) : _Inherited(static_cast<_Inherited&&>(__in)) { } @@ -321,8 +320,7 @@ namespace std tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } - tuple(const tuple& __in) - : _Inherited(static_cast<const _Inherited&>(__in)) { } + tuple(const tuple&) = default; tuple(tuple&& __in) : _Inherited(static_cast<_Inherited&&>(__in)) { } @@ -341,7 +339,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) @@ -690,16 +689,12 @@ namespace std struct _Swallow_assign { template<class _Tp> - _Swallow_assign& - operator=(const _Tp&) + const _Swallow_assign& + operator=(const _Tp&) const { return *this; } }; - // TODO: Put this in some kind of shared file. - namespace - { - _Swallow_assign ignore; - }; // anonymous namespace + const _Swallow_assign ignore{}; /** * Stores a tuple of indices. Used by bind() to extract the elements |