-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
use of overloaded operator '<=>' is ambiguous #4197
Comments
this appear to be libcxx specific, as I couldn't reproduce it until I installed it and set |
defining |
Thanks for the hint. With
And with GCC 13:
|
seems that GCC discovered a bug in apple's ld there - 'fun'. fwiw, I was testing against upstream llvm 17, so I'm not sure I can say what's going on on apple clang (but I suspect the <=> impl is incomplete, which'd be implied by the lack of the FTM, even in llvm 17) sorry, I don't have an apple machine I could dig in further on :-/ I can post the output that GCC produced on my machine, if that helps, though |
I really need help here. Beside yet another issue in the CI, this issue blocks the next release. |
iirc, this was due to apple clang using outdated libcxx, and libcxx (even newer versions) not having all of three_way_compare implemented. it worked on my system because we have recent enough libcxx in gentoo, so just telling json.h to ignore the FTM not existing worked well enough. i'd either use gcc or newer clang and the workaround to get the release out |
Unfortunately, @ArsenArsen is right. Currently those check are :
and
The first one is true on macOS clang 15, as the compiler is supporting the operator. So the solutions are :
Now if I understand right, the output is just used for diff testing, we could |
An example of faking for documentation
|
writing definition explicitly for operator <=> is one of the solutions unless we want to wait for clang to include this definition for our consumption. |
Hey there, this worked on my g++.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r2) 14.2.0 compiler perfectly and didn't create an error. The operator worked fine , and haven't done any changes to the code you have provided. I ran it on my Windows 10 Environment. Here is the output. I think the issue is Apple Clang Compiler Specific? I am a beginner, so I couldn't figure out much in this. Operator overloading was not needed since it worked for me directly. |
Description
I want to prepare the next release, but compiling the example file
docs/examples/operator_spaceship__const_reference.c++20.cpp
fails.Reproduction steps
Compile file
docs/examples/operator_spaceship__const_reference.c++20.cpp
.docs/examples/operator_spaceship__const_reference.c++20.output
make -Cdocs create_output
Expected vs. actual results
Expected: No error.
Actual: Compilation error.
Minimal code example
Error messages
Compiler and operating system
Apple clang version 15.0.0 (clang-1500.0.40.1)
Library version
develop
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: