// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s struct A; struct B; template constexpr bool True = true; template concept C = True; void f(C auto &, auto &) = delete; template void f(Q &, C auto &); void g(struct A *ap, struct B *bp) { f(*ap, *bp); } template struct X {}; template bool operator==(X, V) = delete; template bool operator==(T, X); bool h() { return X{} == 0; } namespace PR53640 { template concept C = true; template void f(T t) {} // expected-note {{candidate function [with T = int]}} template void f(const T &t) {} // expected-note {{candidate function [with T = int]}} int g() { f(0); // expected-error {{call to 'f' is ambiguous}} } struct S { template explicit S(T) noexcept requires C {} // expected-note {{candidate constructor}} template explicit S(const T &) noexcept {} // expected-note {{candidate constructor}} }; int h() { S s(4); // expected-error-re {{call to constructor of {{.*}} is ambiguous}} } }