gcc/testsuite/g++.dg/template/access4.C
raw| 1 | // { dg-do compile } |
| 2 | // Origin: Wolfgang Bangerth <[email protected]> |
| 3 | |
| 4 | // PR c++/7347 |
| 5 | // Access control for typename during instantiation |
| 6 | |
| 7 | template <int dim> class Base { |
| 8 | protected: |
| 9 | typedef int T; |
| 10 | }; |
| 11 | |
| 12 | template <int dim> class D : public Base<dim> { |
| 13 | public: |
| 14 | typedef typename Base<dim>::T T1; |
| 15 | D (T1 t); |
| 16 | }; |
| 17 | |
| 18 | D<2> d(1); |