From 7536f1ed9d07d48ca5ca8635e2ed77182df71d52 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 28 Jan 2005 21:00:19 +0000 Subject: [PATCH] type_traits (is_function): Minor consistency tweaks. 2005-01-28 Paolo Carlini * include/tr1/type_traits (is_function): Minor consistency tweaks. From-SVN: r94385 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/tr1/type_traits | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e823fd872a1..b41ead4d170 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2005-01-28 Paolo Carlini + + * include/tr1/type_traits (is_function): Minor consistency tweaks. + 2005-01-28 Geoffrey Keating * testsuite/lib/libstdc++.exp (libstdc++_init): Search the path diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits index 753722941f9..12609dd41b4 100644 --- a/libstdc++-v3/include/tr1/type_traits +++ b/libstdc++-v3/include/tr1/type_traits @@ -406,13 +406,22 @@ namespace tr1 struct is_enum : public integral_constant::__value> { }; + template::value> + struct __is_function_helper + { + static const bool __value = (__conv_helper::type, typename + add_pointer<_Tp>::type>::__value); + }; + + template + struct __is_function_helper<_Tp, true> + { static const bool __value = false; }; + template struct is_function - : public integral_constant::type, - typename add_pointer<_Tp>::type>::__value)> + : public integral_constant::__value> { }; - _DEFINE_SPEC(0, is_function, void, false) /// @brief composite type traits [4.5.2]. template