Talk:cpp/algorithm/minmax element
From cppreference.com
< Talk:cpp
In this code, isn't the assignment to "result.second" unnecessary because result.second already equals result.first?
if (comp(*first, *result.first)) {
result.second = result.first;
result.first = first;
} else {
result.second = first;
}
217.42.228.94 14:46, 19 February 2014 (PST)