[libcxx-commits] [libcxx] [libc++] Avoid -Wzero-as-null-pointer-constant in operator<=> (PR #79465)
Martin Hořeňovský via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 25 13:19:54 PST 2024
horenmar wrote:
I can eventually rip out enough internals from Catch2 to show the error, but I think this shows the issue in a much simpler form.
https://godbolt.org/z/KsP56vbs6
If you swap to the other definition of `Literal_Zero`, the compilation fails because the requires clause selects overload that can't actually compile.
Caveat: I don't know how Clang's diagnostic `__attribute__` added in the last commit works, and how it would change what happens, so this is about the version before that.
----
I have also found that other people ran into this issue when MS/STL switched from the pointer-based constructor to int-based one and there is an open devcom ticket about it.
https://github.com/llvm/llvm-project/pull/79465
More information about the libcxx-commits
mailing list