<=>C ++ 20の新しい宇宙船オペレーターで奇妙な動作に遭遇しています。Visual Studio 2019コンパイラをで使用してい/std:c++latestます。
このコードは期待どおりに正常にコンパイルされます。
#include <compare>
struct X
{
    int Dummy = 0;
    auto operator<=>(const X&) const = default; // Default implementation
};
int main()
{
    X a, b;
    a == b; // OK!
    return 0;
}
ただし、Xを次のように変更すると、
struct X
{
    int Dummy = 0;
    auto operator<=>(const X& other) const
    {
        return Dummy <=> other.Dummy;
    }
};
次のコンパイラエラーが発生します。
error C2676: binary '==': 'X' does not define this operator or a conversion to a type acceptable to the predefined operator
これをclangでも試しましたが、同様の動作が得られます。
デフォルトの実装がoperator==正しく生成される理由について説明をいただければ幸いですが、カスタムの実装では生成されません。