https://gcc.gnu.org/g:dc716fb66a7cdfc1ded12d861b3a7daf3cbe8b20

commit r16-6809-gdc716fb66a7cdfc1ded12d861b3a7daf3cbe8b20
Author: Jakub Jelinek <[email protected]>
Date:   Thu Jan 15 16:34:14 2026 +0100

    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  <[email protected]>
    
            * 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:
---
 libstdc++-v3/include/std/type_traits                            | 8 ++++----
 libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libstdc++-v3/include/std/type_traits 
b/libstdc++-v3/include/std/type_traits
index 82ee22c63e53..d533dc0ef09e 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<typename _Tp>
     struct is_reflection
@@ -838,7 +838,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct is_fundamental
     : public __or_<is_arithmetic<_Tp>, 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 <typename _Tp>
     is_member_function_pointer<_Tp>::value;
 #endif
 
-#if __cpp_impl_reflection >= 202500L // C++ >= 26
+#if __cpp_impl_reflection >= 202506L // C++ >= 26
 template <typename _Tp>
   inline constexpr bool is_reflection_v = false;
 template <>
@@ -3900,7 +3900,7 @@ template<typename _Ret, typename _Fn, typename... _Args>
 # 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 a0520b3d1b63..d2629ee44526 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<int&, const int&>
 static_assert(!is_convertible_v<const int&, int&>
              && !is_convertible<const int&, int&>::value, "");
 
-#if __cpp_impl_reflection >= 202500L
+#if __cpp_impl_reflection >= 202506L
 static_assert(is_reflection_v<decltype(^^int)>
              && is_reflection<decltype(^^int)>::value, "");
 static_assert(!is_reflection_v<int> && !is_reflection<int>::value, "");

Reply via email to