libstdc++: Fix fallback definitions of std::is_member_*_pointer

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.
This commit is contained in:
Jonathan Wakely
2026-02-12 18:52:12 +00:00
committed by Jonathan Wakely
parent e4c21d8485
commit db072f75e5

View 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 { };