gcc/testsuite/g++.dg/template/access43.C
raw| 1 | // PR c++/116323 |
| 2 | // { dg-do "compile" } |
| 3 | // { dg-additional-options "-Wno-template-body" } |
| 4 | |
| 5 | class A { enum Enum{}; }; |
| 6 | |
| 7 | template<typename E, template<typename> class Alloc> |
| 8 | class B : private Alloc<E>, private A {}; |
| 9 | |
| 10 | template<typename E, template<typename> class Alloc> |
| 11 | int B<E, Alloc>::foo (Enum m) { return 42; } // { dg-error "is private" } |