// RUN: %clang_cc1 -std=c++20 -fsyntax-only %s -verify struct S1 { operator int(); template operator T(); }; // Ensure that no assertion is raised when overload resolution fails while // choosing between an operator function template and an operator function. constexpr auto r = &S1::operator int; // expected-error@-1 {{initializer of type ''}} template struct S2 { template S2(U={}) requires (sizeof(T) > 0) {} // expected-note@-1 {{candidate constructor}} template S2(U={}) requires (true) {} // expected-note@-1 {{candidate constructor}} }; S2 s; // expected-error {{call to constructor of 'S2' is ambiguous}}