diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ttp29.C')
-rwxr-xr-x | gcc/testsuite/g++.old-deja/g++.pt/ttp29.C | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C b/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C new file mode 100755 index 0000000..b431ad0 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/ttp29.C @@ -0,0 +1,32 @@ +template<class T> class D +{ + public: + int f(); +}; + +template<class T> int D<T>::f() +{ + return sizeof(T); +} + +extern "C" void abort(); + +template<template<class> class D,class E> class C +{ + D<E> d; + public: + int f() { abort(); return 0; } +}; + +template<class E> class C<D,E> +{ + D<E> d; + public: + int f() { return d.f(); } +}; + +int main() +{ + C<D,int> c; + c.f(); +} |