Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C++
/
Operator overloading
In C++23, what happens when a class defines auto operator<=>(const T&) const = default; a…
from Operator overloading
C++23
intermediate
1 min
In C++23, what happens when a class defines auto operator<=>(const T&) const = default; and declares no operator==?
A matching defaulted operator== is declared implicitly.
Equality is unavailable until operator== is written by hand.
operator== compares object addresses.
The declaration is valid only for classes with one data member.
Check
Ask AI about this kata
Report an error
next kata
Why can an expression a + b find operator+ defined as a friend inside the class of a and …
Quiz
A new version is available
Reload