diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/nontype7.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/nontype7.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/nontype7.C b/gcc/testsuite/g++.dg/template/nontype7.C new file mode 100644 index 0000000..5eac558 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/nontype7.C @@ -0,0 +1,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 } + |