11 Feb
2002
11 Feb
'02
5:58 a.m.
(1) For all cases where an STL predicate "pred" will suffice, e.g. your example using std::greater<>, is there any case where std::max_element(b, e, pred) would not also perform the job?
Not that I can see. The max_element/min_element STL functions have somehow slipped my knowledge thus far, and I feel like a complete chump now in duplicating their functionality. Thanks for pointing out the obvious, and I'll go crawl back in my hole. -Jonathan