Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/bindings1.C

raw
1 // PR c++/45487
2 // { dg-do run }
3
4 extern "C" int strcmp(const char*, const char*);
5
6 template <typename T>
7 const char* foo(T, typename T::type c) { return __PRETTY_FUNCTION__; }
8
9 struct x {typedef int type;};
10
11 int main()
12 {
13 if (strcmp (foo(x(), 3), "const char* foo(T, typename T::type) "
14 "[with T = x; typename T::type = int]") == 0)
15 return 0;
16 else
17 return 1;
18 }