diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ttp11.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/ttp11.C | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C new file mode 100644 index 000000000..06f5e0bf4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp11.C @@ -0,0 +1,26 @@ +// { 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> class C +{ + D<E> d; + public: + int f() { return d.f(); } +}; + +int main() +{ + C<D,int> c; + C<D,char> d; + c.f(); + d.f(); +} |