summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ttp24.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ttp24.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C
new file mode 100644
index 000000000..999ec6cbe
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C
@@ -0,0 +1,23 @@
+// { dg-do run }
+template<class T> class D
+{
+ public:
+ int f();
+};
+
+template<class T> int D<T>::f()
+{
+ return sizeof(T);
+}
+
+template<template<class> class D,class E> int f()
+{
+ D<E> d;
+ return d.f();
+}
+
+int main()
+{
+ f<D,int>();
+ f<D,char>();
+}