Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C

raw
1 // { dg-do run { target c++14 } }
2 // { dg-options -w }
3 // { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
4
5 #include <cassert>
6
7 typedef decltype(sizeof(0)) size_type;
8
9 template<typename CharT, CharT... String>
10 int operator"" _script () {
11 return 1;
12 }
13
14 int operator"" _script (const char*, size_type) {
15 return 2;
16 }
17
18 int main ()
19 {
20 assert ("123"_script == 2);
21 }