summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C
new file mode 100644
index 0000000000..c99b2f7278
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target { c++11 && { ! c++1y } } } }
+
+template<typename CharT, CharT... String>
+ int
+ operator"" _script()
+ { return 42; } // { dg-error "literal operator template|has invalid parameter list" }
+
+int i = "hi!"_script;