stl_algo.h (minmax(initializer_list<>): Use make_pair, consistently with the other overload for initializer_list.

2008-09-21  Paolo Carlini  <paolo.carlini@oracle.com>

 	* include/bits/stl_algo.h (minmax(initializer_list<>): Use make_pair,
	consistently with the other overload for initializer_list.

From-SVN: r140524
This commit is contained in:
Paolo Carlini 2008-09-21 09:36:27 +00:00 committed by Paolo Carlini
parent 5abf386014
commit aa4652fac0
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-09-21 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_algo.h (minmax(initializer_list<>): Use make_pair,
consistently with the other overload for initializer_list.
2008-09-19 Johannes Singler <singler@ira.uka.de>
PR libstdc++/37470

View File

@ -4121,7 +4121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
pair<const _Tp*, const _Tp*> __p =
std::minmax_element(__l.begin(), __l.end());
return std::pair<_Tp, _Tp>(*__p.first, *__p.second);
return std::make_pair(*__p.first, *__p.second);
}
template<typename _Tp, typename _Compare>