1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3template<class T> struct A { A(); }; 4template<class T> int &f(T); 5template<class T> float &f(T*); 6template<class T> double &f(const T*); 7 8template<class T> void g(T); // expected-note{{candidate}} 9template<class T> void g(T&); // expected-note{{candidate}} 10 11template<class T> int &h(const T&); 12template<class T> float &h(A<T>&); 13 14void m() { 15 const int *p; 16 double &dr1 = f(p); 17 float x; 18 g(x); // expected-error{{ambiguous}} 19 A<int> z; 20 float &fr1 = h(z); 21 const A<int> z2; 22 int &ir1 = h(z2); 23} 24