Use simpler idioms for std::less and std::greater possible in modern C++
Created attachment 446649 [details] Patch
Created attachment 446657 [details] Patch
Comment on attachment 446657 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446657&action=review > Source/WTF/wtf/ListDump.h:124 > + return sortedListDump(list, std::less<>(), comma); Is there a reason why std::less() does not work here? Maybe because it's in an uninstantiated context?
Comment on attachment 446657 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446657&action=review >> Source/WTF/wtf/ListDump.h:124 >> + return sortedListDump(list, std::less<>(), comma); > > Is there a reason why std::less() does not work here? Maybe because it's in an uninstantiated context? I know it doesn’t because my earlier patch failed to compile (gcc), but it did seem to compile locally (clang), so it might be a workaround for a gcc bug. I suspect it has something to do with the fact that the comparator argument to sortedListDump is "const Comparator&" and the comparator argument to sort is "Comparator", but the fact that it does seem to work in clang confuses me a bit.
Committed r286858 (?): <https://commits.webkit.org/r286858>
<rdar://problem/86328234>