From: Jakub Jelinek Date: Thu, 15 Jan 2026 15:34:14 +0000 (+0100) Subject: libstdc++: Fix __cpp_impl_reflection comparisons X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc716fb66a7cdfc1ded12d861b3a7daf3cbe8b20;p=thirdparty%2Fgcc.git libstdc++: Fix __cpp_impl_reflection comparisons Last night when applying Marek's patchset for testing I've noticed I forgot to change these 5 spots when changing the -freflection -std=c++26 predefined value from 202500 which meant we implement some reflection, but not the whole paper, to 202506 which is the https://eel.is/c++draft/tab:cpp.predefined.ft value for it. 2026-01-15 Jakub Jelinek * include/std/type_traits (std::is_reflection, std::is_fundamental, std::is_reflection_v, std::is_consteval_only): Compare __cpp_impl_reflection >= 202506L instead of 202500L. * testsuite/20_util/variable_templates_for_traits.cc: Likewise. --- diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 82ee22c63e5..d533dc0ef09 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -749,7 +749,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : public false_type { }; #endif -#if __cpp_impl_reflection >= 202500L // C++ >= 26 +#if __cpp_impl_reflection >= 202506L // C++ >= 26 /// is_reflection template struct is_reflection @@ -838,7 +838,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct is_fundamental : public __or_, is_void<_Tp>, is_null_pointer<_Tp> -#if __cpp_impl_reflection >= 202500L +#if __cpp_impl_reflection >= 202506L , is_reflection<_Tp> #endif >::type @@ -3555,7 +3555,7 @@ template is_member_function_pointer<_Tp>::value; #endif -#if __cpp_impl_reflection >= 202500L // C++ >= 26 +#if __cpp_impl_reflection >= 202506L // C++ >= 26 template inline constexpr bool is_reflection_v = false; template <> @@ -3900,7 +3900,7 @@ template # endif #endif -#if __cpp_impl_reflection >= 202500L \ +#if __cpp_impl_reflection >= 202506L \ && _GLIBCXX_USE_BUILTIN_TRAIT(__builtin_is_consteval_only) // C++ >= 26 /// is_consteval_only - true if the type is consteval-only. /// @since C++26 diff --git a/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc b/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc index a0520b3d1b6..d2629ee4452 100644 --- a/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc +++ b/libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc @@ -331,7 +331,7 @@ static_assert(is_convertible_v static_assert(!is_convertible_v && !is_convertible::value, ""); -#if __cpp_impl_reflection >= 202500L +#if __cpp_impl_reflection >= 202506L static_assert(is_reflection_v && is_reflection::value, ""); static_assert(!is_reflection_v && !is_reflection::value, "");