fix minmax_element

This commit is contained in:
bolero-MURAKAMI 2013-08-26 17:38:11 +09:00
parent 15e0303f06
commit d6592a9ce3

View file

@ -32,7 +32,7 @@ namespace sprout {
iter_minmax(ForwardIteratorPair const& a, ForwardIterator b, Compare comp) { iter_minmax(ForwardIteratorPair const& a, ForwardIterator b, Compare comp) {
return ForwardIteratorPair( return ForwardIteratorPair(
comp(*b, *sprout::first(a)) ? b : sprout::first(a), 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
); );
} }