Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/utf8.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
4 #include <experimental/type_traits> | 4 #include <experimental/type_traits> |
5 | 5 |
6 auto c = 'c'; | 6 auto c = 'c'; |
7 auto u8c = u8'c'; | 7 auto u8c = u8'c'; |
8 | 8 |
9 #if __cpp_char8_t | |
10 static_assert(!std::experimental::is_same_v<decltype(u8c), decltype(c)>, ""); | |
11 #else | |
9 static_assert(std::experimental::is_same_v<decltype(u8c), decltype(c)>, ""); | 12 static_assert(std::experimental::is_same_v<decltype(u8c), decltype(c)>, ""); |
13 #endif | |
10 | 14 |
11 auto u8s = u8"c"; | 15 auto u8s = u8"c"; |
12 auto x = u8s[0]; | 16 auto x = u8s[0]; |
13 | 17 |
14 static_assert(std::experimental::is_same_v<decltype(u8c), decltype(x)>, ""); | 18 static_assert(std::experimental::is_same_v<decltype(u8c), decltype(x)>, ""); |