diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/injected-ttp.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/injected-ttp.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/injected-ttp.C b/gcc/testsuite/g++.dg/ext/injected-ttp.C new file mode 100644 index 000000000..405bee88c --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/injected-ttp.C @@ -0,0 +1,15 @@ +// Test for doing the right thing with injected-class-name used as template +// type argument. This is an extension from DR 176. + +// { dg-options "-pedantic" } + +template <class T> +struct A { }; + +template <template <class> class TTP> +struct B { }; + +struct C: A<int> +{ + B<A> b; // { dg-warning "injected-class-name" } +}; |