]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix __cpp_impl_reflection comparisons
authorJakub Jelinek <jakub@redhat.com>
Thu, 15 Jan 2026 15:34:14 +0000 (16:34 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 15 Jan 2026 15:34:14 +0000 (16:34 +0100)
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  <jakub@redhat.com>

* 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.

libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/variable_templates_for_traits.cc

index 82ee22c63e53db0d99e2afae0287f8130cda6bdf..d533dc0ef09e025ad002cae76ecae0f0f9a13257 100644 (file)
@@ -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
index a0520b3d1b63c7ab55469fe0333c7f69add59388..d2629ee44526f939e81554162fa347857987fedc 100644 (file)
@@ -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, "");