-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Tests failing when compiling with c++20 #3207
Comments
Thanks for reporting! We're running the tests on macOS (Xcode 12.4) and Ubuntu (Clang 14.0.0 and GCC 11.1.0) without problems. On Godbolt, the behavior only differs in GCC 11.2. I'll check to get that compiler. |
I've tried to run the tests with g++11.2.0 and clang 13.0.0 in C++20 mode. g++ fails as described, but clang works I suspect it to be the default comparisons by the new spaceship operator http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2085r0.html The mentioned paper isn't implemented in Clang 13 yet (but should be in Clang 14 🤔 ). It's the last mentioned paper in the table when searching for |
@NeroBurner Discussed in #3138 |
@falbrechtskirchinger What is needed beyond #3379 to fix this? #3446? |
Yes. You can see for yourself by switching out the header here https://godbolt.org/z/jodGv5vGM |
* Add C++20 3-way comparison operator and fix broken comparisons Fixes #3207. Fixes #3409. * Fix iterators to meet (more) std::ranges requirements Fixes #3130. Related discussion: #3408 * Add note about CMake standard version selection to unit tests Document how CMake chooses which C++ standard version to use when building tests. * Update documentation * CI: add legacy discarded value comparison * Fix internal linkage errors when building a module
When built with c++20, on some platforms test
unit-comparison.cpp:213
fails.The comparison of c++17 vs c++20 behavior can be seen here: godbolt.
The text was updated successfully, but these errors were encountered: