1 // { dg-do run { target c++11 } } 2 3 // Make sure embedded quotes are not a problem for string and char literals. 4 5 #include <cstdint> 6 #include <cassert> 7 8 int operator"" _embedchar(char) 9 { return 41; } 10 11 int operator"" _embedstr(const char*, std::size_t len) 12 { return 42 + len; } 13 14 void test()15test() 16 { 17 int i = '\''_embedchar; 18 19 int j = "\""_embedstr; 20 assert(j == 43); 21 22 int k = "foo\""_embedstr; 23 assert(k == 46); 24 25 int l = "\"bar"_embedstr; 26 assert(l == 46); 27 } 28 29 int main()30main() 31 { 32 test(); 33 } 34