https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26278
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Still happens: $ xg++ -c 26278.C 26278.C: In function ‘int main()’: 26278.C:14:5: error: ambiguous overload for ‘operator==’ (operand types are ‘coEnum<A, X>’ and ‘X’) 14 | c == p; | ~ ^~ ~ | | | | | X | coEnum<A, X> 26278.C:14:5: note: candidate: ‘operator==(X, X)’ (built-in) 14 | c == p; | ~~^~~~ 26278.C:14:5: note: candidate: ‘operator==(int, int)’ (built-in) 26278.C:14:5: note: candidate: ‘operator==(X, X)’ (built-in) 26278.C:7:8: note: candidate: ‘bool coEnum<e1, e2>::operator==(coEnum<e1, e2>) const [with e1 = A; e2 = X]’ 7 | bool operator==(coEnum e) const { return 0; } | ^~~~~~~~