Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82049 - branches/release/boost/algorithm
From: marshall_at_[hidden]
Date: 2012-12-17 11:02:39


Author: marshall
Date: 2012-12-17 11:02:38 EST (Mon, 17 Dec 2012)
New Revision: 82049
URL: http://svn.boost.org/trac/boost/changeset/82049

Log:
merge bug fix for minmax_element to release; Fixes #7752
Properties modified:
   branches/release/boost/algorithm/minmax_element.hpp (contents, props changed)
Text files modified:
   branches/release/boost/algorithm/minmax_element.hpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: branches/release/boost/algorithm/minmax_element.hpp
==============================================================================
--- branches/release/boost/algorithm/minmax_element.hpp (original)
+++ branches/release/boost/algorithm/minmax_element.hpp 2012-12-17 11:02:38 EST (Mon, 17 Dec 2012)
@@ -99,8 +99,10 @@
 
       // if odd number of elements, treat last element
       if (first != last) { // odd number of elements
- if (comp(first, min_result))
- min_result = first, potential_min_result = last;
+ if (comp(first, min_result)) {
+ min_result = first;
+ potential_min_result = last;
+ }
         else if (comp(max_result, first))
           max_result = first;
       }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk