diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-28 21:00:19 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-28 21:00:19 +0000 |
| commit | b31c2a9ff7b3d5c9abc4e01607d325d0aa5a03d9 (patch) | |
| tree | c06e030f10973c0e9056adc7d71bbc5c38b122d4 | |
| parent | 4497787e5dcf638ea0316a7719a0683cd34a56a6 (diff) | |
| download | ppe42-gcc-b31c2a9ff7b3d5c9abc4e01607d325d0aa5a03d9.tar.gz ppe42-gcc-b31c2a9ff7b3d5c9abc4e01607d325d0aa5a03d9.zip | |
2005-01-28 Paolo Carlini <pcarlini@suse.de>
* include/tr1/type_traits (is_function): Minor consistency tweaks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94385 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
| -rw-r--r-- | 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 <pcarlini@suse.de> + + * include/tr1/type_traits (is_function): Minor consistency tweaks. + 2005-01-28 Geoffrey Keating <geoffk@apple.com> * 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<bool, __is_enum_helper<_Tp>::__value> { }; + template<typename _Tp, bool = is_void<_Tp>::value> + struct __is_function_helper + { + static const bool __value = (__conv_helper<typename + add_reference<_Tp>::type, typename + add_pointer<_Tp>::type>::__value); + }; + + template<typename _Tp> + struct __is_function_helper<_Tp, true> + { static const bool __value = false; }; + template<typename _Tp> struct is_function - : public integral_constant<bool, - (__conv_helper<typename add_reference<_Tp>::type, - typename add_pointer<_Tp>::type>::__value)> + : public integral_constant<bool, __is_function_helper<_Tp>::__value> { }; - _DEFINE_SPEC(0, is_function, void, false) /// @brief composite type traits [4.5.2]. template<typename _Tp> |

