In C++20 the u8 literal produces a char8_t[] not a char[].

Fixes https://github.com/boostorg/config/issues/276.
This commit is contained in:
jzmaddock
2019-04-16 19:37:15 +01:00
parent 96607d5e15
commit 87931b074f

View File

@ -17,7 +17,12 @@ void quiet_warning(const CharT*){}
int test()
{
#ifdef _<>_<EFBFBD>cpp_<70>char8_<38>t
// The change to char8_t in C++20 is a breaking change to the std:
const char8_t* c8 = u8"";
#else
const char* c8 = u8"";
#endif
const char16_t* c16 = u"";
const char32_t* c32 = U"";
quiet_warning(c8);