Title
Redundant move-assignment operator of pair should be removed
Status
nad
Section
[pairs]
Submitter
Daniel Krügler

Created on 2008-10-04.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

  1. In [pairs] p. 1, class pair and just before p. 13 remove the declaration:

    requires MoveAssignable<T1> && MoveAssignable<T2> pair& operator=(pair&& p );
    
  2. Remove p.13+p.14
Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Mark as NAD, see issue 801.

Date: 2010-10-21.18:28:33

[ 2009-07 Frankfurt: ]

Leave this open pending the removal of concepts from the WD.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

Bill believes the extra assignment operators are necessary for resolving ambiguities, but that does not mean it needs to be part of the specification.

Move to Open. We recommend this be looked at in the context of the ongoing work related to the pair templates.

Date: 2008-10-04.00:00:00

see also 917.

The current WP provides the following assignment operators for pair in [pairs]/1:

  1. template<class U , class V>
    requires HasAssign<T1, const U&> && HasAssign<T2, const V&>
    pair& operator=(const pair<U , V>& p);
    
  2. requires MoveAssignable<T1> && MoveAssignable<T2> pair& operator=(pair&& p );
    
  3. template<class U , class V>
    requires HasAssign<T1, RvalueOf<U>::type> && HasAssign<T2, RvalueOf<V>::type>
    pair& operator=(pair<U , V>&& p);
    

It seems that the functionality of (2) is completely covered by (3), therefore (2) should be removed.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg4351
2010-10-21 18:28:33adminsetmessages: + msg4350
2010-10-21 18:28:33adminsetmessages: + msg4349
2010-10-21 18:28:33adminsetmessages: + msg4348
2008-10-04 00:00:00admincreate