This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] tr1/type_traits: workaround for is_member_function_pointer
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 31 Dec 2004 19:19:53 +0100
- Subject: [v3] tr1/type_traits: workaround for is_member_function_pointer
Hi,
tested x86-linux, committed.
Paolo.
//////////////////
2004-12-31 Paolo Carlini <pcarlini@suse.de>
* include/tr1/type_traits (is_member_function_pointer): Provide a
workaround for c++/19076, correct for functions with up to 15
arguments.
* testsuite/tr1/4_metaprogramming/composite_type_traits/
is_member_pointer/is_member_pointer.cc: Uncomment "XFAILed" tests;
add a test for variadic functions.
* testsuite/tr1/4_metaprogramming/composite_type_traits/
is_scalar/is_scalar.cc: Uncomment "XFAILed" tests.
* testsuite/tr1/4_metaprogramming/primary_type_categories/
is_enum/is_enum.cc: Likewise.
* testsuite/tr1/4_metaprogramming/primary_type_categories/
is_member_function_pointer/is_member_function_pointer.cc: Likewise;
add a test for variadic functions.
* testsuite/tr1/4_metaprogramming/primary_type_categories/
is_member_object_pointer/is_member_object_pointer.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_nothrow_assign/has_nothrow_assign.cc: Uncomment "XFAILed" tests.
* testsuite/tr1/4_metaprogramming/type_properties/
has_nothrow_constructor/has_nothrow_constructor.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_nothrow_copy/has_nothrow_copy.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_trivial_assign/has_trivial_assign.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_trivial_constructor/has_trivial_constructor.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_trivial_copy/has_trivial_copy.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
has_trivial_destructor/has_trivial_destructor.cc: Likewise.
* testsuite/tr1/4_metaprogramming/type_properties/
is_pod/is_pod.cc: Likewise.
diff -prN libstdc++-v3-orig/include/tr1/type_traits libstdc++-v3/include/tr1/type_traits
*** libstdc++-v3-orig/include/tr1/type_traits Fri Dec 31 00:27:27 2004
--- libstdc++-v3/include/tr1/type_traits Fri Dec 31 18:52:35 2004
*************** namespace tr1
*** 138,148 ****
_DEFINE_SPEC(2, is_member_object_pointer, _Tp _Cp::*,
!is_function<_Tp>::value)
template<typename>
struct is_member_function_pointer
! : public false_type { };
! _DEFINE_SPEC(2, is_member_function_pointer, _Tp _Cp::*,
! is_function<_Tp>::value)
template<typename _Tp, bool = (is_fundamental<_Tp>::value
|| is_array<_Tp>::value
--- 138,355 ----
_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<typename>
+ // struct is_member_function_pointer
+ // : public false_type { };
+ // _DEFINE_SPEC(2, is_member_function_pointer, _Tp _Cp::*,
+ // is_function<_Tp>::value)
+
+ // Ugly, temporary workaround for member functions with up to 15 arguments.
template<typename>
+ struct __is_mfp_helper
+ { static const bool __value = false; };
+
+ template<typename _Rt, typename _Cp>
+ struct __is_mfp_helper<_Rt (_Cp::*) ()>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp>
+ struct __is_mfp_helper<_Rt (_Cp::*) (...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, _A9)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, _A9, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, _A9, _A10)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, _A9, _A10, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, _A9, _A10, _A11)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11>
+ struct __is_mfp_helper<_Rt (_Cp::*) (_A0, _A1, _A2, _A3, _A4, _A5, _A6,
+ _A7, _A8, _A9, _A10, _A11, ...)>
+ { static const bool __value = true; };
+
+ template<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11,
+ typename _A12>
+ 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<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11,
+ typename _A12>
+ 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<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11,
+ typename _A12, typename _A13>
+ 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<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11,
+ typename _A12, typename _A13>
+ 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<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11,
+ typename _A12, typename _A13, typename _A14>
+ 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<typename _Rt, typename _Cp, typename _A0, typename _A1, typename _A2,
+ typename _A3, typename _A4, typename _A5, typename _A6, typename _A7,
+ typename _A8, typename _A9, typename _A10, typename _A11,
+ typename _A12, typename _A13, typename _A14>
+ 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<typename _Tp>
struct is_member_function_pointer
! : public integral_constant<bool, (__is_mfp_helper<typename
! remove_cv<_Tp>::type>::__value)>
! { };
template<typename _Tp, bool = (is_fundamental<_Tp>::value
|| is_array<_Tp>::value
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/composite_type_traits/is_member_pointer/is_member_pointer.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/composite_type_traits/is_member_pointer/is_member_pointer.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/composite_type_traits/is_member_pointer/is_member_pointer.cc Fri Dec 24 21:33:56 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/composite_type_traits/is_member_pointer/is_member_pointer.cc Fri Dec 31 18:30:31 2004
*************** void test01()
*** 34,49 ****
VERIFY( (test_category<is_member_pointer, const int (ClassType::*)>(true)) );
VERIFY( (test_category<is_member_pointer, ClassType (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
!
! //VERIFY( (test_category<is_member_pointer,
! // int (ClassType::*) (int)>(true)) );
! //VERIFY( (test_category<is_member_pointer,
! // int (ClassType::*) (int) const>(true)) );
! //VERIFY( (test_category<is_member_function_pointer,
! // ClassType (ClassType::*) (ClassType)>(true)) );
! //VERIFY( (test_category<is_member_pointer,
! // float (ClassType::*) (int, float, int[], int&)>(true)) );
// Sanity check.
VERIFY( (test_category<is_member_pointer, ClassType>(false)) );
--- 34,49 ----
VERIFY( (test_category<is_member_pointer, const int (ClassType::*)>(true)) );
VERIFY( (test_category<is_member_pointer, ClassType (ClassType::*)>(true)) );
! VERIFY( (test_category<is_member_pointer,
! int (ClassType::*) (int)>(true)) );
! VERIFY( (test_category<is_member_pointer,
! int (ClassType::*) (int) const>(true)) );
! VERIFY( (test_category<is_member_pointer,
! int (ClassType::*) (float, ...)>(true)) );
! VERIFY( (test_category<is_member_pointer,
! ClassType (ClassType::*) (ClassType)>(true)) );
! VERIFY( (test_category<is_member_pointer,
! float (ClassType::*) (int, float, int[], int&)>(true)) );
// Sanity check.
VERIFY( (test_category<is_member_pointer, ClassType>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc Sat Dec 25 16:24:35 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc Fri Dec 31 16:18:22 2004
*************** void test01()
*** 36,43 ****
VERIFY( (test_category<is_scalar, int*>(true)) );
VERIFY( (test_category<is_scalar, int(*)(int)>(true)) );
VERIFY( (test_category<is_scalar, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<is_scalar, int (ClassType::*) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<is_scalar, ClassType>(false)) );
--- 36,42 ----
VERIFY( (test_category<is_scalar, int*>(true)) );
VERIFY( (test_category<is_scalar, int(*)(int)>(true)) );
VERIFY( (test_category<is_scalar, int (ClassType::*)>(true)) );
! VERIFY( (test_category<is_scalar, int (ClassType::*) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<is_scalar, ClassType>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc Sat Dec 25 16:24:36 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc Fri Dec 31 16:18:48 2004
*************** void test01()
*** 43,50 ****
VERIFY( (test_category<is_enum, float&>(false)) );
VERIFY( (test_category<is_enum, float(&)(float)>(false)) );
VERIFY( (test_category<is_enum, int (ClassType::*)>(false)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<is_enum, int (ClassType::*) (int)>(false)) );
VERIFY( (test_category<is_enum, int (int)>(false)) );
VERIFY( (test_category<is_enum, ConvType>(false)) );
--- 43,49 ----
VERIFY( (test_category<is_enum, float&>(false)) );
VERIFY( (test_category<is_enum, float(&)(float)>(false)) );
VERIFY( (test_category<is_enum, int (ClassType::*)>(false)) );
! VERIFY( (test_category<is_enum, int (ClassType::*) (int)>(false)) );
VERIFY( (test_category<is_enum, int (int)>(false)) );
VERIFY( (test_category<is_enum, ConvType>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_function_pointer/is_member_function_pointer.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_function_pointer/is_member_function_pointer.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_function_pointer/is_member_function_pointer.cc Fri Dec 24 21:33:56 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_function_pointer/is_member_function_pointer.cc Fri Dec 31 18:15:19 2004
*************** void test01()
*** 31,47 ****
using namespace __gnu_test;
// Positive tests.
!
! // Temporarily disabled because of c++/19076 :-(
!
! //VERIFY( (test_category<is_member_function_pointer,
! // int (ClassType::*) (int)>(true)) );
! //VERIFY( (test_category<is_member_function_pointer,
! // int (ClassType::*) (int) const>(true)) );
! //VERIFY( (test_category<is_member_function_pointer,
! // ClassType (ClassType::*) (ClassType)>(true)) );
! //VERIFY( (test_category<is_member_function_pointer,
! // float (ClassType::*) (int, float, int[], int&)>(true)) );
// Negative tests.
VERIFY( (test_category<is_member_function_pointer,
--- 31,46 ----
using namespace __gnu_test;
// Positive tests.
! VERIFY( (test_category<is_member_function_pointer,
! int (ClassType::*) (int)>(true)) );
! VERIFY( (test_category<is_member_function_pointer,
! int (ClassType::*) (int) const>(true)) );
! VERIFY( (test_category<is_member_function_pointer,
! int (ClassType::*) (float, ...)>(true)) );
! VERIFY( (test_category<is_member_function_pointer,
! ClassType (ClassType::*) (ClassType)>(true)) );
! VERIFY( (test_category<is_member_function_pointer,
! float (ClassType::*) (int, float, int[], int&)>(true)) );
// Negative tests.
VERIFY( (test_category<is_member_function_pointer,
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_object_pointer/is_member_object_pointer.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_object_pointer/is_member_object_pointer.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_object_pointer/is_member_object_pointer.cc Fri Dec 24 21:33:56 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/primary_type_categories/is_member_object_pointer/is_member_object_pointer.cc Fri Dec 31 18:15:53 2004
*************** void test01()
*** 44,49 ****
--- 44,51 ----
VERIFY( (test_category<is_member_object_pointer,
int (ClassType::*) (int) const>(false)) );
VERIFY( (test_category<is_member_object_pointer,
+ int (ClassType::*) (float, ...)>(false)) );
+ VERIFY( (test_category<is_member_object_pointer,
ClassType (ClassType::*) (ClassType)>(false)) );
VERIFY( (test_category<is_member_object_pointer,
float (ClassType::*) (int, float, int[], int&)>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc Fri Dec 31 00:27:27 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc Fri Dec 31 16:21:12 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_assign_property<has_nothrow_assign, int*>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, int(*)(int)>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_assign_property<has_nothrow_assign,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, int[2]>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, float[][3]>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_assign_property<has_nothrow_assign, int*>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, int(*)(int)>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, int (ClassType::*)>(true)) );
! VERIFY( (test_assign_property<has_nothrow_assign,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, int[2]>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, float[][3]>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_assign_property<has_nothrow_assign, int(*[][2])(int)>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_assign_property<has_nothrow_assign,
! // int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
--- 46,53 ----
VERIFY( (test_assign_property<has_nothrow_assign, int(*[][2])(int)>(true)) );
VERIFY( (test_assign_property<has_nothrow_assign,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_assign_property<has_nothrow_assign,
! int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc Wed Dec 29 13:11:27 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_constructor/has_nothrow_constructor.cc Fri Dec 31 16:21:37 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_category<has_nothrow_constructor, int*>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<has_nothrow_constructor,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int[2]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, float[][3]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_category<has_nothrow_constructor, int*>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int (ClassType::*)>(true)) );
! VERIFY( (test_category<has_nothrow_constructor,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int[2]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, float[][3]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_category<has_nothrow_constructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<has_nothrow_constructor,
! // int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<has_nothrow_constructor, ClassType>(false)) );
--- 46,53 ----
VERIFY( (test_category<has_nothrow_constructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_category<has_nothrow_constructor,
! int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<has_nothrow_constructor, ClassType>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc Fri Dec 31 00:27:28 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc Fri Dec 31 16:21:59 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_copy_property<has_nothrow_copy, int*>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, int(*)(int)>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_copy_property<has_nothrow_copy,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, int[2]>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, float[][3]>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_copy_property<has_nothrow_copy, int*>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, int(*)(int)>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, int (ClassType::*)>(true)) );
! VERIFY( (test_copy_property<has_nothrow_copy,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, int[2]>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, float[][3]>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_copy_property<has_nothrow_copy, int(*[][2])(int)>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_copy_property<has_nothrow_copy,
! // int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
--- 46,53 ----
VERIFY( (test_copy_property<has_nothrow_copy, int(*[][2])(int)>(true)) );
VERIFY( (test_copy_property<has_nothrow_copy,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_copy_property<has_nothrow_copy,
! int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc Fri Dec 31 00:27:28 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc Fri Dec 31 16:22:31 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_assign_property<has_trivial_assign, int*>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, int(*)(int)>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_assign_property<has_trivial_assign,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, int[2]>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, float[][3]>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_assign_property<has_trivial_assign, int*>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, int(*)(int)>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, int (ClassType::*)>(true)) );
! VERIFY( (test_assign_property<has_trivial_assign,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, int[2]>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, float[][3]>(true)) );
VERIFY( (test_assign_property<has_trivial_assign, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_assign_property<has_trivial_assign, int(*[][2])(int)>(true)) );
VERIFY( (test_assign_property<has_trivial_assign,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_assign_property<has_trivial_assign,
! // int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
--- 46,53 ----
VERIFY( (test_assign_property<has_trivial_assign, int(*[][2])(int)>(true)) );
VERIFY( (test_assign_property<has_trivial_assign,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_assign_property<has_trivial_assign,
! int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc Sun Dec 26 12:08:46 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_constructor/has_trivial_constructor.cc Fri Dec 31 16:22:58 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_category<has_trivial_constructor, int*>(true)) );
VERIFY( (test_category<has_trivial_constructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_trivial_constructor, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<has_trivial_constructor,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_trivial_constructor, int[2]>(true)) );
VERIFY( (test_category<has_trivial_constructor, float[][3]>(true)) );
VERIFY( (test_category<has_trivial_constructor, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_category<has_trivial_constructor, int*>(true)) );
VERIFY( (test_category<has_trivial_constructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_trivial_constructor, int (ClassType::*)>(true)) );
! VERIFY( (test_category<has_trivial_constructor,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_trivial_constructor, int[2]>(true)) );
VERIFY( (test_category<has_trivial_constructor, float[][3]>(true)) );
VERIFY( (test_category<has_trivial_constructor, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_category<has_trivial_constructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_trivial_constructor,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<has_trivial_constructor,
! // int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<has_trivial_constructor, ClassType>(false)) );
--- 46,53 ----
VERIFY( (test_category<has_trivial_constructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_trivial_constructor,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_category<has_trivial_constructor,
! int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<has_trivial_constructor, ClassType>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc Fri Dec 31 00:27:28 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc Fri Dec 31 16:23:20 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_copy_property<has_trivial_copy, int*>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, int(*)(int)>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_copy_property<has_trivial_copy,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, int[2]>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, float[][3]>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_copy_property<has_trivial_copy, int*>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, int(*)(int)>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, int (ClassType::*)>(true)) );
! VERIFY( (test_copy_property<has_trivial_copy,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, int[2]>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, float[][3]>(true)) );
VERIFY( (test_copy_property<has_trivial_copy, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_copy_property<has_trivial_copy, int(*[][2])(int)>(true)) );
VERIFY( (test_copy_property<has_trivial_copy,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_copy_property<has_trivial_copy,
! // int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
--- 46,53 ----
VERIFY( (test_copy_property<has_trivial_copy, int(*[][2])(int)>(true)) );
VERIFY( (test_copy_property<has_trivial_copy,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_copy_property<has_trivial_copy,
! int (ClassType::*[][2][3]) (int)>(true)) );
}
int main()
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc Sun Dec 26 12:08:46 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_destructor/has_trivial_destructor.cc Fri Dec 31 16:23:44 2004
*************** void test01()
*** 37,45 ****
VERIFY( (test_category<has_trivial_destructor, int*>(true)) );
VERIFY( (test_category<has_trivial_destructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<has_trivial_destructor,
! // int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, int[2]>(true)) );
VERIFY( (test_category<has_trivial_destructor, float[][3]>(true)) );
VERIFY( (test_category<has_trivial_destructor, EnumType[2][3][4]>(true)) );
--- 37,44 ----
VERIFY( (test_category<has_trivial_destructor, int*>(true)) );
VERIFY( (test_category<has_trivial_destructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, int (ClassType::*)>(true)) );
! VERIFY( (test_category<has_trivial_destructor,
! int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, int[2]>(true)) );
VERIFY( (test_category<has_trivial_destructor, float[][3]>(true)) );
VERIFY( (test_category<has_trivial_destructor, EnumType[2][3][4]>(true)) );
*************** void test01()
*** 47,55 ****
VERIFY( (test_category<has_trivial_destructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_trivial_destructor,
int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<has_trivial_destructor,
! // int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<has_trivial_destructor, ClassType>(false)) );
--- 46,53 ----
VERIFY( (test_category<has_trivial_destructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_trivial_destructor,
int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_category<has_trivial_destructor,
! int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<has_trivial_destructor, ClassType>(false)) );
diff -prN libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc
*** libstdc++-v3-orig/testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc Sun Dec 26 12:08:47 2004
--- libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc Fri Dec 31 16:20:43 2004
*************** void test01()
*** 37,52 ****
VERIFY( (test_category<is_pod, int*>(true)) );
VERIFY( (test_category<is_pod, int(*)(int)>(true)) );
VERIFY( (test_category<is_pod, int (ClassType::*)>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<is_pod, int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<is_pod, int[2]>(true)) );
VERIFY( (test_category<is_pod, float[][3]>(true)) );
VERIFY( (test_category<is_pod, EnumType[2][3][4]>(true)) );
VERIFY( (test_category<is_pod, int*[3]>(true)) );
VERIFY( (test_category<is_pod, int(*[][2])(int)>(true)) );
VERIFY( (test_category<is_pod, int (ClassType::*[2][3])>(true)) );
! // Temporarily disabled because of c++/19076 :-(
! // VERIFY( (test_category<is_pod, int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<is_pod, ClassType>(false)) );
--- 37,50 ----
VERIFY( (test_category<is_pod, int*>(true)) );
VERIFY( (test_category<is_pod, int(*)(int)>(true)) );
VERIFY( (test_category<is_pod, int (ClassType::*)>(true)) );
! VERIFY( (test_category<is_pod, int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<is_pod, int[2]>(true)) );
VERIFY( (test_category<is_pod, float[][3]>(true)) );
VERIFY( (test_category<is_pod, EnumType[2][3][4]>(true)) );
VERIFY( (test_category<is_pod, int*[3]>(true)) );
VERIFY( (test_category<is_pod, int(*[][2])(int)>(true)) );
VERIFY( (test_category<is_pod, int (ClassType::*[2][3])>(true)) );
! VERIFY( (test_category<is_pod, int (ClassType::*[][2][3]) (int)>(true)) );
// Sanity check.
VERIFY( (test_category<is_pod, ClassType>(false)) );