2 ms·
I’m referring to this bit of the article: The values of these comparison categories can be compared against the literal 0 (not any int, not an int whose value
by twoodfin 7y ago
I’m referring to this bit of the article:
The values of these comparison categories can be compared against the literal 0 (not any int, not an int whose value is 0... just the literal) using any of the six comparison operators...
- wyldfire 7y agoOh, this is particularly confusing, I agree. IIUC it's referring to how you can safely evaluate the return value from a spaceship: by comparing against literal zero. (not how you would overload a comparison with literal zero).
- yokohummer7 7y agoC and C++ already have such a thing, IIUC. The literal 0 is considered the same as nullptr, if compared to another pointer. It is a bit worrying that such an overloaded meaning is added again to the language.