]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix fallback definitions of std::is_member_*_pointer
authorJonathan Wakely <jwakely@redhat.com>
Thu, 12 Feb 2026 18:52:12 +0000 (18:52 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 12 Feb 2026 19:36:16 +0000 (19:36 +0000)
When the builtins aren't used we need a declaration of std::is_function
for the fallback definitions of std::is_member_function_pointer and
std::is_member_object_pointer.

libstdc++-v3/ChangeLog:

* include/std/type_traits (is_function): Declare before first
use.

libstdc++-v3/include/std/type_traits

index d533dc0ef09e025ad002cae76ecae0f0f9a13257..ea700d1ed97d2e404fcceff017577229ff36cfac 100644 (file)
@@ -674,6 +674,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : public __bool_constant<__is_member_object_pointer(_Tp)>
     { };
 #else
+  template<typename _Tp>
+    struct is_function;
+
   template<typename>
     struct __is_member_object_pointer_helper
     : public false_type { };
@@ -696,6 +699,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : public __bool_constant<__is_member_function_pointer(_Tp)>
     { };
 #else
+  template<typename _Tp>
+    struct is_function;
+
   template<typename>
     struct __is_member_function_pointer_helper
     : public false_type { };