[libcxx-commits] [libcxx] [libc++] Further constrain comparison against foo_ordering types (PR #127311)

Richard Smith via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 19 11:14:05 PST 2025


zygoloid wrote:

My preference would be to add an attribute or builtin type to Clang so that libc++ can use
`bool operator==(strong_ordering __v, [[clang::zero_literal_param]] int)`
or
`bool operator==(strong_ordering __v, __zero_literal_type)`
In addition to accepting the exact right set of cases, we ought to be able to issue much better diagnostics that way too.

https://github.com/llvm/llvm-project/pull/127311


More information about the libcxx-commits mailing list