gcc/testsuite/g++.old-deja/g++.pt/ttp41.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "" } |
| 3 | template<template<class> class D,class E> class C |
| 4 | { |
| 5 | public: |
| 6 | int g() { return 1; } |
| 7 | }; |
| 8 | |
| 9 | template<class T> class D |
| 10 | { |
| 11 | public: |
| 12 | int f(); |
| 13 | }; |
| 14 | |
| 15 | template<class T> int D<T>::f() |
| 16 | { |
| 17 | C<D,D> c; |
| 18 | return c.g(); |
| 19 | } |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | D<char> d; |
| 24 | d.f(); |
| 25 | } |