Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ext/char8_t-specialization-1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// 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");