From 6dfab28b4583c6c6e1f958d8b85905d45d8dee65 Mon Sep 17 00:00:00 2001 From: Nikos Chantziaras Date: Thu, 5 May 2022 12:30:06 +0300 Subject: [PATCH] Don't just use GCC-specific NTTP feature test __cpp_nontype_template_parameter_class is GCC-specific. It won't work in Clang, for example. Also test for __cpp_nontype_template_args, which is in the standard now. Keep the former test as well so that pre-standard GCC versions still work. --- char8_t-remediation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/char8_t-remediation.h b/char8_t-remediation.h index 484cc61..36d390b 100644 --- a/char8_t-remediation.h +++ b/char8_t-remediation.h @@ -15,7 +15,8 @@ #if defined(__cpp_char8_t) // { -#if defined(__cpp_nontype_template_parameter_class) \ +#if (defined(__cpp_nontype_template_parameter_class) \ + || defined(__cpp_nontype_template_args)) \ && defined(__cpp_deduction_guides) // { // Non-type template parameters with class type are supported. This enables