https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90769
ensadc at mailnesia dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ensadc at mailnesia dot com --- Comment #3 from ensadc at mailnesia dot com --- It seems that `f == B` triggers overload resolution which treats `operator==` declared latter as a candidate, which then causes the instantiation of the constructor template, which requires overload resolution for `f == B`.... Reduced: enum E {B}; struct X { template <E f = B, int = (f == B, 0)> constexpr X(int v); }; bool operator==(X const& lhs, int) { return X(1); }