gcc/testsuite/g++.dg/ext/char8_t-specialization-1.C
raw| 1 | // Test specialization for UTF-8 literals when -fchar8_t is not enabled. |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-std=c++17 -fno-char8_t" } |
| 4 | |
| 5 | template<auto> struct ct { static constexpr int dm = 1; }; |
| 6 | template<> struct ct<'x'> { static constexpr int dm = 2; }; |
| 7 | static_assert(ct<'x'>::dm == 2, "Error"); |
| 8 | static_assert(ct<u8'x'>::dm == 2, "Error"); |