aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/char8_t-specialization-1.C
blob: 1c2fe360abcbb1a66b68728c8c9b6021ddc5ca2a (plain)
1
2
3
4
5
6
7
8
// Test specialization for UTF-8 literals when -fchar8_t is not enabled.
// { dg-do compile }
// { dg-options "-std=c++17 -fno-char8_t" }

template<auto> struct ct { static constexpr int dm = 1; };
template<> struct ct<'x'> { static constexpr int dm = 2; };
static_assert(ct<'x'>::dm == 2, "Error");
static_assert(ct<u8'x'>::dm == 2, "Error");