Update char8_t tests and print out C++20 feature macros.

This commit is contained in:
jzmaddock
2019-06-27 12:48:00 +01:00
parent 089e3749fd
commit 10c5df0159
2 changed files with 11 additions and 1 deletions

View File

@ -17,7 +17,7 @@ void quiet_warning(const CharT*){}
int test()
{
#ifdef __cpp_char8_type
#if defined(__cpp_char8_type) || defined(__cpp_char8_t)
// The change to char8_t in C++20 is a breaking change to the std:
const char8_t* c8 = u8"";
#else

View File

@ -1273,6 +1273,16 @@ void print_sd6_macros()
{
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0096r5.html
// C++20:
PRINT_MACRO(__cpp_aggregate_paren_init);
PRINT_MACRO(__cpp_char8_t);
PRINT_MACRO(__cpp_char8_type);
PRINT_MACRO(__cpp_conditional_explicit);
PRINT_MACRO(__cpp_coroutines);
PRINT_MACRO(__cpp_impl_destroying_delete);
PRINT_MACRO(__cpp_impl_three_way_comparison);
PRINT_MACRO(__cpp_nontype_template_parameter_class);
// C++17:
PRINT_MACRO(__cpp_hex_float);
PRINT_MACRO(__cpp_inline_variables);