Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C

raw
1 // { dg-do run }
2 extern "C" int strcmp(const char*, const char*);
3
4 template <class T>
5 struct S3
6 {
7 template <class U>
8 static const char* h(U);
9 };
10
11 template <>
12 template <>
13 const char* S3<double>::h(int) { return __PRETTY_FUNCTION__; }
14
15 template <>
16 template <>
17 const char* S3<char>::h(int) { return __PRETTY_FUNCTION__; }
18
19 int main()
20 {
21 if (strcmp (S3<double>::h(7),
22 "static const char* S3<T>::h(U) [with U = int; T = double]") == 0)
23 return 0;
24 else
25 return 1;
26 }