]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.old-deja/g++.pt/t39.C
pt.c (instantiate_decl): Tell the repository code about the clones, not the cloned...
[gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / t39.C
CommitLineData
921e5a0e
JL
1extern "C" int printf (const char *, ...);
2
3template <class T>
4struct frob {
5 T *ptr;
6 void print ();
7 frob (T* init) { ptr = init; }
8};
9
10template <class T>
11void frob<T>::print () {
12 printf ("this = %08x\n", this);
13 printf (" ptr = %08x\n", ptr);
14 printf (" values = %x %x %x ...\n", ptr[0], ptr[1], ptr[2]);
15}
16
17 static int x[10];
18 frob<char> fc ("hello");
19 frob<int> fi (x);
20
21int main () {
22 fc.print ();
23 fi.print ();
24 return 0;
25}
This page took 1.138516 seconds and 5 git commands to generate.