This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
pair
should be removedSection: 22.3 [pairs] Status: NAD Submitter: Daniel Krügler Opened: 2008-10-04 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [pairs].
View all issues with NAD status.
Discussion:
The current WP provides the following assignment operators for pair
in 22.3 [pairs]/1:
template<class U , class V> requires HasAssign<T1, const U&> && HasAssign<T2, const V&> pair& operator=(const pair<U , V>& p);
requires MoveAssignable<T1> && MoveAssignable<T2> pair& operator=(pair&& p );
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.
[ 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.
[ 2009-07 Frankfurt: ]
Leave this open pending the removal of concepts from the WD.
[ 2009-10 Santa Cruz: ]
Proposed resolution:
In 22.3 [pairs] p. 1, class pair
and just before p. 13 remove the declaration:
requires MoveAssignable<T1> && MoveAssignable<T2> pair& operator=(pair&& p );