summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ttp22.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.pt/ttp22.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C
new file mode 100755
index 0000000..7eac0ed
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp22.C
@@ -0,0 +1,33 @@
+template<class T> class D
+{
+ public:
+ int f();
+};
+
+template<class T> int D<T>::f()
+{
+ return sizeof(T);
+}
+
+template<template<class> class DD,class EE> class C : DD<EE>
+{
+ public:
+ int f();
+};
+
+template<template<class> class DD,class EE> int C<DD,EE>::f()
+{
+ return DD<EE>::f();
+}
+
+class E : C<D,int>
+{
+ public:
+ int f() { return C<D,int>::f(); }
+};
+
+int main()
+{
+ E c;
+ c.f();
+}