Merge from mainline.
[official-gcc.git] / gcc / testsuite / g++.dg / template / nontype7.C
blob5eac558e4517084a917bd3d67accdb6309687e3a
1 // { dg-do compile }
2 // Origin: C++ standard, [temp.arg.nontype]/2
4 template<class T, char* p> struct X {
5   X();
6   X(const char* q) { /* ... */ }
7 };
9 char p[] = "Vivisectionist";
11 X<int,"Studebaker"> x1;    // { dg-error "string literal" }
12 X<int, p> x2;
14 // { dg-bogus "" "additional errors" { xfail *-*-* } 11 }