Starting from C++20 we can precede auto keyword with the name of the concept to limit possible types. And in particular this combination is possible in class conversion operator auto, e.g.
template <typename T> concept x = true;
struct S
{
operator x auto() { return 2; }
operator auto() { return 1; }
};
int main() { return S{}.operator x auto(); }
But Clang is the only compiler that accepts the whole program, however main() returns 1 (and not 2 as I would expected), demo: https://gcc.godbolt.org/z/b16jYGa81
GCC accepts the struct definition, but refuses to compile S{}.operator x auto().
And MSVC refuses to accept even struct S with the error:
error C2535: 'S::operator auto(void)': member function already defined or declared
Just wonder, which of the compilers is right here (if any)?