Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> While in C++, a sorting algorithm will run on anything with the operator< reloaded with no correctness guaranteed or even pinky-promised.

Though this claim is correct, it's important to state that C++20 also gained language support for working with weaker equivalence/ordering relations. Details:

- https://en.cppreference.com/w/cpp/header/compare

- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p076...

- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p051...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: