summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ttp37.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ttp37.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.pt/ttp37.C29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp37.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp37.C
new file mode 100755
index 0000000..01b0d29
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp37.C
@@ -0,0 +1,29 @@
+template<int T, class U = int> class D
+{
+ public:
+ int f();
+};
+
+template<int T, class U> int D<T,U>::f()
+{
+ return T+sizeof(U);
+}
+
+template<template<int> class D,class E> class C
+{
+ D<1> d;
+ public:
+ int f() { return d.f(); }
+};
+
+template<template<int> class D, int T> int f(D<T> &d1)
+{
+ d1.f();
+ return T;
+}
+
+int main()
+{
+ D<1> c1;
+ f(c1);
+}