stl_algo.h (minmax(initializer_list<>): Use make_pair, consistently with the other...
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 21 Sep 2008 09:36:27 +0000 (09:36 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 21 Sep 2008 09:36:27 +0000 (09:36 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algo.h

index 99340ec..cbb6671 100644 (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
index 373881c..d956376 100644 (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>