oneDPL
oneDPL copied to clipboard
Use std::less as a default comparator instead of operator< for additional algorithms
Summary:
C++ standard replaces operator<
as a default comparator for many algorithms with std::less
since c++20 (see std::sort
as an example).
Let's do the same replacement for the additional algorithms. std::less
is a more genetic alternative to operator<
, thus it can be done even for c++17 mode.
The issue is motivated by this discussion: https://github.com/oneapi-src/oneDPL/pull/1692#discussion_r1679303718.