gcc/testsuite/g++.dg/ext/injected-ttp.C
raw| 1 | // Test for doing the right thing with injected-class-name used as template |
| 2 | // type argument. This is an extension from DR 176. |
| 3 | |
| 4 | // { dg-options "-pedantic -std=c++98" } |
| 5 | |
| 6 | template <class T> |
| 7 | struct A { }; |
| 8 | |
| 9 | template <template <class> class TTP> |
| 10 | struct B { }; |
| 11 | |
| 12 | struct C: A<int> |
| 13 | { |
| 14 | B<A> b; // { dg-warning "injected-class-name" } |
| 15 | }; |