Title
Tuple doesn't define swap
Status
cd1
Section
[tuple][tr.tuple]
Submitter
Andy Koenig

Created on 2005-07-03.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Add these signatures to [tuple]

template <class... Types>
  void swap(tuple<Types...>& x, tuple<Types...>& y);
template <class... Types>
  void swap(tuple<Types...>&& x, tuple<Types...>& y);
template <class... Types>
  void swap(tuple<Types...>& x, tuple<Types...>&& y); 

Add this signature to [tuple.tuple]

void swap(tuple&&);

Add the following two sections to the end of the tuple clauses

20.3.1.7 tuple swap [tuple.swap]

void swap(tuple&& rhs); 

Requires: Each type in Types shall be Swappable.

Effects: Calls swap for each element in *this and its corresponding element in rhs.

Throws: Nothing, unless one of the element-wise swap calls throw an exception.

20.3.1.8 tuple specialized algorithms [tuple.special]

template <class... Types>
  void swap(tuple<Types...>& x, tuple<Types...>& y);
template <class... Types>
  void swap(tuple<Types...>&& x, tuple<Types...>& y);
template <class... Types>
  void swap(tuple<Types...>& x, tuple<Types...>&& y); 

Effects: x.swap(y)

Date: 2010-10-21.18:28:33

[ Bellevue: Alisdair provided wording. ]

Date: 2010-10-21.18:28:33

[ Toronto: Howard to provide wording (really this time). ]

Date: 2010-10-21.18:28:33

[ Batavia: Howard to provide wording. ]

Date: 2010-10-21.18:28:33

[ Berlin: Doug to provide wording. ]

Date: 2005-07-03.00:00:00

Tuple doesn't define swap(). It should.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2934
2010-10-21 18:28:33adminsetmessages: + msg2933
2010-10-21 18:28:33adminsetmessages: + msg2932
2010-10-21 18:28:33adminsetmessages: + msg2931
2010-10-21 18:28:33adminsetmessages: + msg2930
2005-07-03 00:00:00admincreate