1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// { dg-do compile } // PR c++/2922 char& f(char); template<class T> void g(T t) { char& c1 = f(1); // not dependent char& c2 = f(t); // dependent } int&f (int); int main() { g(2); // two f(char) g('a'); // two f(char) }