From 11996a3c452935418437898cc5131e41097736e4 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 21 Feb 2005 23:51:51 +0000 Subject: [PATCH] type_traits (is_member_function_pointer): Remove ugly workaround for c++/19076. 2005-02-21 Paolo Carlini * include/tr1/type_traits (is_member_function_pointer): Remove ugly workaround for c++/19076. From-SVN: r95360 --- libstdc++-v3/ChangeLog | 5 + libstdc++-v3/include/tr1/type_traits | 213 +-------------------------- 2 files changed, 8 insertions(+), 210 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 12a0c5bb54c..613f13ea2da 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2005-02-21 Paolo Carlini + + * include/tr1/type_traits (is_member_function_pointer): + Remove ugly workaround for c++/19076. + 2005-02-21 Paolo Carlini * include/bits/basic_string.tcc (_Rep::_M_destroy): Don't diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits index 12609dd41b4..c4aa58d853d 100644 --- a/libstdc++-v3/include/tr1/type_traits +++ b/libstdc++-v3/include/tr1/type_traits @@ -151,218 +151,11 @@ namespace tr1 _DEFINE_SPEC(2, is_member_object_pointer, _Tp _Cp::*, !is_function<_Tp>::value) - // Due to c++/19076, for the time being we cannot use the correct, neat - // implementation :-( - // - // template - // struct is_member_function_pointer - // : public false_type { }; - // _DEFINE_SPEC(2, is_member_function_pointer, _Tp _Cp::*, - // is_function<_Tp>::value) - // - // Temporary workaround for member functions with up to 15 arguments: template - struct __is_mfp_helper - { static const bool __value = false; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) ()> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, _A12)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, _A12, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, _A12, - _A13)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, _A12, - _A13, ...)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, _A12, - _A13, _A14)> - { static const bool __value = true; }; - - template - struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6, - _A7, _A8, _A9, _A10, _A11, _A12, - _A13, _A14, ...)> - { static const bool __value = true; }; - - template struct is_member_function_pointer - : public integral_constant::type>::__value)> - { }; + : public false_type { }; + _DEFINE_SPEC(2, is_member_function_pointer, _Tp _Cp::*, + is_function<_Tp>::value) template::value || is_array<_Tp>::value -- 2.30.2