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')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.pt/ttp24.C22
1 files changed, 22 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 100755
index 0000000..1e6278f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp24.C
@@ -0,0 +1,22 @@
+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>();
+}