summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/tuple
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/std/tuple')
-rw-r--r--libstdc++-v3/include/std/tuple19
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