https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94061
--- Comment #3 from Frank Heckenbach <f.heckenb...@fh-soft.de> --- (In reply to Patrick Palka from comment #2) > How do you define it? It works if we define it as > > auto operator <=> (const B& b) const { > return A::operator<=>(b); > } > > but not if it's defined as > > auto operator <=> (const B& b) const { > return static_cast<const A&>(*this) <=> static_cast<const A&>(b); > } I'd do the former. I don't know what the standard says exactly, but intuitively it seems to me that "protected" should suffice, also by comparison with constructors.