Replies: 2 comments 1 reply
-
It's intentionally never defined. If you're seeing this, you've got code somewhere that's attempting to compare a spaceship operator result against an int that isn't a literal
#include <compare>
#include <print>
#include <string>
using namespace std;
int main() {
const string cats{"cats"};
const string dogs{"dogs"};
println("(cats <=> dogs) < 0: {}", (cats <=> dogs) < 0);
#ifndef SKIP_BAD_CODE
println("(cats <=> dogs) < 5: {}", (cats <=> dogs) < 5);
#endif
}
|
Beta Was this translation helpful? Give feedback.
1 reply
-
A compiler should never generate a call to It's possible that you encountered a compiler bug, but a reproducible example is needed for further analysis. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am getting a link error with an unresolved external void std::_Literal_zero_is_expected() used in function std::_Literal_zero. I am no expert in the stl, so I ask this question here rather than assuming it is an issue - is/should _Literal_zero_is_expected be actually defined anywhere? I have cloned and searched the stl and not found it. Cheers.
Beta Was this translation helpful? Give feedback.
All reactions