Skip to main content
4 events
when toggle format what by license comment
Jun 13, 2019 at 16:37 comment added Toby Speight Or do what std::max() does, and pass an iterator list and a comparator as the two arguments (but I'm not quite sure whether we can combine that with the fold expression for reference-wrapping).
Jun 13, 2019 at 16:33 vote accept Alexandru Ica
Jun 13, 2019 at 16:33 comment added Alexandru Ica You are right. Only now did I realize I should have added the possibility to provide a custom comparator so that the function can be useful. What I would add is an extra constraint, for example Callable<T, F>, so that the comparator is actually valid so that the compiler won't give cryptic error messages.
Jun 13, 2019 at 16:27 history answered Toby Speight CC BY-SA 4.0