[libcxx-commits] [PATCH] D108250: [libc++][spaceship] Implement std::tuple::operator<=>
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 23 10:05:47 PDT 2021
Mordante added inline comments.
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp:73
+ }
+ // Mixed types with floating point, which compare partially ordered
+ {
----------------
mumbleskates wrote:
> Mordante wrote:
> > It would be nice to also mix signed and unsigned types.
> I threw in some indexes with matched unsigned types and unsigned <=> floating point. We probably can't do signed <=> unsigned integral types because <=> isn't defined, and the synth-three-way fallback generates promoted compile time errorwarnings about comparison with mixed signs. Not sure if we need to add any tests for this in synth-three-way, I think it's probably fine.
I think it's good to add some of these tests, especially since it's rather new feature, not only in the library but also in the compilers. The warnings can be disabled by adding `// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare` at the beginning of the file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108250/new/
https://reviews.llvm.org/D108250
More information about the libcxx-commits
mailing list