summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/nontype7.C
blob: 5eac558e4517084a917bd3d67accdb6309687e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do compile }
// Origin: C++ standard, [temp.arg.nontype]/2

template<class T, char* p> struct X {
  X();
  X(const char* q) { /* ... */ }
};

char p[] = "Vivisectionist";

X<int,"Studebaker"> x1;    // { dg-error "string literal" }
X<int, p> x2;

// { dg-bogus "" "additional errors" { xfail *-*-* } 11 }