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.
---
The forward declaration was removed by r16-1653-gbc8f5424977b74 so this
doesn't need to be backported.
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/std/type_traits | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d533dc0ef09e..ea700d1ed97d 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -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 { };
--
2.53.0