Debian Codegraph @

gcc/testsuite/g++.dg/template/ttp12.C

raw
1 // Copyright (C) 2004 Free Software Foundation
2 // Contributed by Kriang Lerdsuwanakij <[email protected]>
3 // { dg-do compile }
4
5 // Check the type of non-type parameter in template template parameter
6 // only if it is dependent.
7
8 template <template <int* p> class T>
9 struct X {};
10
11 template <typename U, template <U* p> class T>
12 struct Y {
13 X<T> x;
14 };
15
16 template <int* p> struct Z {};
17
18 Y<int, Z> y1;
19 Y<char, Z> y2; // { dg-error "mismatch|expected|invalid" }