Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::less as a default comparator instead of operator< for additional algorithms #1779

Open
dmitriy-sobolev opened this issue Aug 14, 2024 · 0 comments

Comments

@dmitriy-sobolev
Copy link
Contributor

dmitriy-sobolev commented Aug 14, 2024

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: #1692 (comment).

URLs:
additional_algorithms.rst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant