Created on 2008-10-04.00:00:00 last changed 171 months ago
Proposed resolution:
In [algorithms]/2, header <algorithm> synopsis change as indicated:
template<classLessThanComparable T> requires CopyConstructible<T> pair<constT&,constT&> minmax(initializer_list<T> t); template<class T,classStrictWeakOrder<auto, T> Compare> requires CopyConstructible<T> pair<constT&,constT&> minmax(initializer_list<T> t, Compare comp);
In [alg.min.max] change as indicated (Begin: Just before p.20):
template<classLessThanComparable T> requires CopyConstructible<T> pair<constT&,constT&> minmax(initializer_list<T> t);
-20- Requires: T is LessThanComparable and CopyConstructible.-21- Returns: pair<
constT&,constT&>(x, y) where x is the smallest value and y the largest value in the initializer_list.[..]
template<class T,classStrictWeakOrder<auto, T> Compare> requires CopyConstructible<T> pair<constT&,constT&> minmax(initializer_list<T> t, Compare comp);
-24- Requires: type T is LessThanComparable and CopyConstructible.-25- Returns: pair<
constT&,constT&>(x, y) where x is the smallest value and y largest value in the initializer_list.
Rationale:
Solved by reapplying N2772.
[ 2010 Pittsburgh: Pete to reapply N2772. ]
[ 2009-10 Santa Cruz: ]
Can't find initializer_list form of minmax anymore, only variadic version. Seems like we had an editing clash with concepts. Leave Open, at least until editorial issues resolved. Bring this to Editor's attention.
[ 2009-08-18 Daniel adds: ]
Recommend NAD since the proposed changes have already been performed as part of editorial work of N2914.
[ 2009-07 Frankfurt ]
Moved from Tentatively Ready to Open only because the wording needs to be tweaked for concepts removal.
[ Batavia (2009-05): ]
We agree with the proposed resolution. Move to Tentatively Ready.
It seems that the proposed changes for N2772 were not clear enough in this point:
[alg.min.max], before p.23 + p.24 + before p. 27 + p. 28 say that the return type of the minmax overloads with an initializer_list is pair<const T&, const T&>, which is inconsistent with the decision for the other min/max overloads which take a initializer_list as argument and return a T, not a const T&. Doing otherwise for minmax would easily lead to unexpected life-time problems by using minmax instead of min and max separately.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg4346 |
2010-10-21 18:28:33 | admin | set | messages: + msg4345 |
2010-10-21 18:28:33 | admin | set | messages: + msg4344 |
2010-10-21 18:28:33 | admin | set | messages: + msg4343 |
2010-10-21 18:28:33 | admin | set | messages: + msg4342 |
2010-10-21 18:28:33 | admin | set | messages: + msg4341 |
2010-10-21 18:28:33 | admin | set | messages: + msg4340 |
2008-10-04 00:00:00 | admin | create |