From d6592a9ce3a361fabf687c3b6795bced4c9c04a6 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Mon, 26 Aug 2013 17:38:11 +0900 Subject: [PATCH] fix minmax_element --- sprout/algorithm/minmax_element.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sprout/algorithm/minmax_element.hpp b/sprout/algorithm/minmax_element.hpp index 9bba8516..8cea1a02 100644 --- a/sprout/algorithm/minmax_element.hpp +++ b/sprout/algorithm/minmax_element.hpp @@ -32,7 +32,7 @@ namespace sprout { iter_minmax(ForwardIteratorPair const& a, ForwardIterator b, Compare comp) { return ForwardIteratorPair( comp(*b, *sprout::first(a)) ? b : sprout::first(a), - comp(*sprout::second(b), *a) ? a : sprout::second(b) + comp(*b, *sprout::second(a)) ? sprout::second(a) : b ); }