Directory layout flattening.
From-SVN: r124307
+2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+ Directory layout flattening.
+
+ Added in testsuite:
+ * tr1/4_metaprogramming/add_const
+ * tr1/4_metaprogramming/add_const/requirements
+ * tr1/4_metaprogramming/add_const/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_const/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_cv
+ * tr1/4_metaprogramming/add_cv/requirements
+ * tr1/4_metaprogramming/add_cv/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_cv/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_pointer
+ * tr1/4_metaprogramming/add_pointer/requirements
+ * tr1/4_metaprogramming/add_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_pointer/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_reference
+ * tr1/4_metaprogramming/add_reference/requirements
+ * tr1/4_metaprogramming/add_reference/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_reference/requirements/typedefs.cc
+ * tr1/4_metaprogramming/add_volatile
+ * tr1/4_metaprogramming/add_volatile/requirements
+ * tr1/4_metaprogramming/add_volatile/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/add_volatile/requirements/typedefs.cc
+ * tr1/4_metaprogramming/aligned_storage
+ * tr1/4_metaprogramming/aligned_storage/requirements
+ * tr1/4_metaprogramming/aligned_storage/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/aligned_storage/requirements/typedefs.cc
+ * tr1/4_metaprogramming/alignment_of
+ * tr1/4_metaprogramming/alignment_of/requirements
+ * tr1/4_metaprogramming/alignment_of/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/alignment_of/requirements/typedefs.cc
+ * tr1/4_metaprogramming/alignment_of/value.cc
+ * tr1/4_metaprogramming/extent
+ * tr1/4_metaprogramming/extent/requirements
+ * tr1/4_metaprogramming/extent/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/extent/requirements/typedefs.cc
+ * tr1/4_metaprogramming/extent/value.cc
+ * tr1/4_metaprogramming/has_nothrow_assign
+ * tr1/4_metaprogramming/has_nothrow_assign/requirements
+ * tr1/4_metaprogramming/has_nothrow_assign/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/value.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor
+ * tr1/4_metaprogramming/has_nothrow_constructor/requirements
+ * tr1/4_metaprogramming/has_nothrow_constructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/value.cc
+ * tr1/4_metaprogramming/has_nothrow_copy
+ * tr1/4_metaprogramming/has_nothrow_copy/requirements
+ * tr1/4_metaprogramming/has_nothrow_copy/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/value.cc
+ * tr1/4_metaprogramming/has_trivial_assign
+ * tr1/4_metaprogramming/has_trivial_assign/requirements
+ * tr1/4_metaprogramming/has_trivial_assign/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_assign/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_assign/value.cc
+ * tr1/4_metaprogramming/has_trivial_constructor
+ * tr1/4_metaprogramming/has_trivial_constructor/requirements
+ * tr1/4_metaprogramming/has_trivial_constructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/value.cc
+ * tr1/4_metaprogramming/has_trivial_copy
+ * tr1/4_metaprogramming/has_trivial_copy/requirements
+ * tr1/4_metaprogramming/has_trivial_copy/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_copy/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_copy/value.cc
+ * tr1/4_metaprogramming/has_trivial_destructor
+ * tr1/4_metaprogramming/has_trivial_destructor/requirements
+ * tr1/4_metaprogramming/has_trivial_destructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/value.cc
+ * tr1/4_metaprogramming/has_virtual_destructor
+ * tr1/4_metaprogramming/has_virtual_destructor/requirements
+ * tr1/4_metaprogramming/has_virtual_destructor/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/requirements/typedefs.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/value.cc
+ * tr1/4_metaprogramming/integral_constant
+ * tr1/4_metaprogramming/integral_constant/requirements
+ * tr1/4_metaprogramming/integral_constant/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/integral_constant/requirements/typedefs.cc
+ * tr1/4_metaprogramming/integral_constant/true_false_value.cc
+ * tr1/4_metaprogramming/is_abstract
+ * tr1/4_metaprogramming/is_abstract/requirements
+ * tr1/4_metaprogramming/is_abstract/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_abstract/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_abstract/value.cc
+ * tr1/4_metaprogramming/is_arithmetic
+ * tr1/4_metaprogramming/is_arithmetic/requirements
+ * tr1/4_metaprogramming/is_arithmetic/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_arithmetic/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_arithmetic/value.cc
+ * tr1/4_metaprogramming/is_array
+ * tr1/4_metaprogramming/is_array/requirements
+ * tr1/4_metaprogramming/is_array/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_array/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_array/value.cc
+ * tr1/4_metaprogramming/is_base_of
+ * tr1/4_metaprogramming/is_base_of/requirements
+ * tr1/4_metaprogramming/is_base_of/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_base_of/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_base_of/value.cc
+ * tr1/4_metaprogramming/is_class
+ * tr1/4_metaprogramming/is_class/requirements
+ * tr1/4_metaprogramming/is_class/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_class/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_class/value.cc
+ * tr1/4_metaprogramming/is_compound
+ * tr1/4_metaprogramming/is_compound/requirements
+ * tr1/4_metaprogramming/is_compound/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_compound/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_compound/value.cc
+ * tr1/4_metaprogramming/is_const
+ * tr1/4_metaprogramming/is_const/requirements
+ * tr1/4_metaprogramming/is_const/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_const/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_const/value.cc
+ * tr1/4_metaprogramming/is_convertible
+ * tr1/4_metaprogramming/is_convertible/requirements
+ * tr1/4_metaprogramming/is_convertible/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_convertible/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_convertible/value.cc
+ * tr1/4_metaprogramming/is_empty
+ * tr1/4_metaprogramming/is_empty/requirements
+ * tr1/4_metaprogramming/is_empty/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_empty/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_empty/value.cc
+ * tr1/4_metaprogramming/is_enum
+ * tr1/4_metaprogramming/is_enum/requirements
+ * tr1/4_metaprogramming/is_enum/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_enum/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_enum/value.cc
+ * tr1/4_metaprogramming/is_floating_point
+ * tr1/4_metaprogramming/is_floating_point/requirements
+ * tr1/4_metaprogramming/is_floating_point/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_floating_point/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_floating_point/value.cc
+ * tr1/4_metaprogramming/is_function
+ * tr1/4_metaprogramming/is_function/requirements
+ * tr1/4_metaprogramming/is_function/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_function/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_function/value.cc
+ * tr1/4_metaprogramming/is_fundamental
+ * tr1/4_metaprogramming/is_fundamental/requirements
+ * tr1/4_metaprogramming/is_fundamental/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_fundamental/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_fundamental/value.cc
+ * tr1/4_metaprogramming/is_integral
+ * tr1/4_metaprogramming/is_integral/requirements
+ * tr1/4_metaprogramming/is_integral/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_integral/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_integral/value.cc
+ * tr1/4_metaprogramming/is_member_function_pointer
+ * tr1/4_metaprogramming/is_member_function_pointer/requirements
+ * tr1/4_metaprogramming/is_member_function_pointer/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/value.cc
+ * tr1/4_metaprogramming/is_member_object_pointer
+ * tr1/4_metaprogramming/is_member_object_pointer/requirements
+ * tr1/4_metaprogramming/is_member_object_pointer/
+ requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/
+ requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/value.cc
+ * tr1/4_metaprogramming/is_member_pointer
+ * tr1/4_metaprogramming/is_member_pointer/requirements
+ * tr1/4_metaprogramming/is_member_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_member_pointer/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_member_pointer/value.cc
+ * tr1/4_metaprogramming/is_object
+ * tr1/4_metaprogramming/is_object/requirements
+ * tr1/4_metaprogramming/is_object/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_object/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_object/value.cc
+ * tr1/4_metaprogramming/is_pod
+ * tr1/4_metaprogramming/is_pod/requirements
+ * tr1/4_metaprogramming/is_pod/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_pod/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_pod/value.cc
+ * tr1/4_metaprogramming/is_pointer
+ * tr1/4_metaprogramming/is_pointer/requirements
+ * tr1/4_metaprogramming/is_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_pointer/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_pointer/value.cc
+ * tr1/4_metaprogramming/is_polymorphic
+ * tr1/4_metaprogramming/is_polymorphic/requirements
+ * tr1/4_metaprogramming/is_polymorphic/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_polymorphic/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_polymorphic/value.cc
+ * tr1/4_metaprogramming/is_reference
+ * tr1/4_metaprogramming/is_reference/requirements
+ * tr1/4_metaprogramming/is_reference/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_reference/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_reference/value.cc
+ * tr1/4_metaprogramming/is_same
+ * tr1/4_metaprogramming/is_same/requirements
+ * tr1/4_metaprogramming/is_same/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_same/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_same/value.cc
+ * tr1/4_metaprogramming/is_scalar
+ * tr1/4_metaprogramming/is_scalar/requirements
+ * tr1/4_metaprogramming/is_scalar/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_scalar/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_scalar/value.cc
+ * tr1/4_metaprogramming/is_signed
+ * tr1/4_metaprogramming/is_signed/requirements
+ * tr1/4_metaprogramming/is_signed/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_signed/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_signed/value.cc
+ * tr1/4_metaprogramming/is_union
+ * tr1/4_metaprogramming/is_union/requirements
+ * tr1/4_metaprogramming/is_union/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_union/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_union/value.cc
+ * tr1/4_metaprogramming/is_unsigned
+ * tr1/4_metaprogramming/is_unsigned/requirements
+ * tr1/4_metaprogramming/is_unsigned/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_unsigned/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_unsigned/value.cc
+ * tr1/4_metaprogramming/is_void
+ * tr1/4_metaprogramming/is_void/requirements
+ * tr1/4_metaprogramming/is_void/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_void/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_void/value.cc
+ * tr1/4_metaprogramming/is_volatile
+ * tr1/4_metaprogramming/is_volatile/requirements
+ * tr1/4_metaprogramming/is_volatile/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/is_volatile/requirements/typedefs.cc
+ * tr1/4_metaprogramming/is_volatile/value.cc
+ * tr1/4_metaprogramming/rank
+ * tr1/4_metaprogramming/rank/requirements
+ * tr1/4_metaprogramming/rank/requirements/explicit_instantiations.cc
+ * tr1/4_metaprogramming/rank/requirements/typedefs.cc
+ * tr1/4_metaprogramming/rank/value.cc
+ * tr1/4_metaprogramming/remove_all_extents
+ * tr1/4_metaprogramming/remove_all_extents/requirements
+ * tr1/4_metaprogramming/remove_all_extents/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_all_extents/value.cc
+ * tr1/4_metaprogramming/remove_const
+ * tr1/4_metaprogramming/remove_const/requirements
+ * tr1/4_metaprogramming/remove_const/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_const/value.cc
+ * tr1/4_metaprogramming/remove_cv
+ * tr1/4_metaprogramming/remove_cv/requirements
+ * tr1/4_metaprogramming/remove_cv/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_cv/value.cc
+ * tr1/4_metaprogramming/remove_extent
+ * tr1/4_metaprogramming/remove_extent/requirements
+ * tr1/4_metaprogramming/remove_extent/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_extent/value.cc
+ * tr1/4_metaprogramming/remove_pointer
+ * tr1/4_metaprogramming/remove_pointer/requirements
+ * tr1/4_metaprogramming/remove_pointer/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_pointer/value.cc
+ * tr1/4_metaprogramming/remove_reference
+ * tr1/4_metaprogramming/remove_reference/requirements
+ * tr1/4_metaprogramming/remove_reference/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_reference/value.cc
+ * tr1/4_metaprogramming/remove_volatile
+ * tr1/4_metaprogramming/remove_volatile/requirements
+ * tr1/4_metaprogramming/remove_volatile/requirements/
+ explicit_instantiations.cc
+ * tr1/4_metaprogramming/remove_volatile/value.cc
+
+ Deleted in testsuite:
+ * tr1/4_metaprogramming/alignment_of/alignment_of.cc
+ * tr1/4_metaprogramming/alignment_of/typedefs.cc
+ * tr1/4_metaprogramming/array_modifications
+ * tr1/4_metaprogramming/array_modifications/remove_all_extents.cc
+ * tr1/4_metaprogramming/array_modifications/remove_extent.cc
+ * tr1/4_metaprogramming/composite_type_traits
+ * tr1/4_metaprogramming/composite_type_traits/is_arithmetic
+ * tr1/4_metaprogramming/composite_type_traits/is_arithmetic/
+ is_arithmetic.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_arithmetic/typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_compound
+ * tr1/4_metaprogramming/composite_type_traits/is_compound/
+ is_compound.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_compound/typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_fundamental
+ * tr1/4_metaprogramming/composite_type_traits/is_fundamental/
+ is_fundamental.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_fundamental/
+ typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_member_pointer
+ * tr1/4_metaprogramming/composite_type_traits/is_member_pointer/
+ is_member_pointer.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_member_pointer/
+ typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_object
+ * tr1/4_metaprogramming/composite_type_traits/is_object/24808.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_object/is_object.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_object/typedefs.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_scalar
+ * tr1/4_metaprogramming/composite_type_traits/is_scalar/is_scalar.cc
+ * tr1/4_metaprogramming/composite_type_traits/is_scalar/typedefs.cc
+ * tr1/4_metaprogramming/const_volatile_modifications
+ * tr1/4_metaprogramming/const_volatile_modifications/add_const.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/add_cv.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/add_volatile.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/remove_const.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/remove_cv.cc
+ * tr1/4_metaprogramming/const_volatile_modifications/remove_volatile.cc
+ * tr1/4_metaprogramming/extent/extent.cc
+ * tr1/4_metaprogramming/extent/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/has_nothrow_assign.cc
+ * tr1/4_metaprogramming/has_nothrow_assign/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/
+ has_nothrow_constructor.cc
+ * tr1/4_metaprogramming/has_nothrow_constructor/typedefs.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/has_nothrow_copy.cc
+ * tr1/4_metaprogramming/has_nothrow_copy/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_assign/has_trivial_assign.cc
+ * tr1/4_metaprogramming/has_trivial_assign/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/
+ has_trivial_constructor.cc
+ * tr1/4_metaprogramming/has_trivial_constructor/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_copy/has_trivial_copy.cc
+ * tr1/4_metaprogramming/has_trivial_copy/typedefs.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/
+ has_trivial_destructor.cc
+ * tr1/4_metaprogramming/has_trivial_destructor/typedefs.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/
+ has_virtual_destructor.cc
+ * tr1/4_metaprogramming/has_virtual_destructor/typedefs.cc
+ * tr1/4_metaprogramming/helper_classes
+ * tr1/4_metaprogramming/helper_classes/static_definition.cc
+ * tr1/4_metaprogramming/helper_classes/true_false_type.cc
+ * tr1/4_metaprogramming/helper_classes/true_false_type_typedefs.cc
+ * tr1/4_metaprogramming/helper_classes/typedefs.cc
+ * tr1/4_metaprogramming/integral_constant/true_false_type.cc
+ * tr1/4_metaprogramming/integral_constant/typedefs.cc
+ * tr1/4_metaprogramming/is_abstract/is_abstract.cc
+ * tr1/4_metaprogramming/is_abstract/typedefs.cc
+ * tr1/4_metaprogramming/is_arithmetic/is_arithmetic.cc
+ * tr1/4_metaprogramming/is_arithmetic/typedefs.cc
+ * tr1/4_metaprogramming/is_array/is_array.cc
+ * tr1/4_metaprogramming/is_array/typedefs.cc
+ * tr1/4_metaprogramming/is_base_of/is_base_of.cc
+ * tr1/4_metaprogramming/is_base_of/typedefs.cc
+ * tr1/4_metaprogramming/is_class/is_class.cc
+ * tr1/4_metaprogramming/is_class/typedefs.cc
+ * tr1/4_metaprogramming/is_compound/is_compound.cc
+ * tr1/4_metaprogramming/is_compound/typedefs.cc
+ * tr1/4_metaprogramming/is_const/is_const.cc
+ * tr1/4_metaprogramming/is_const/typedefs.cc
+ * tr1/4_metaprogramming/is_convertible/is_convertible.cc
+ * tr1/4_metaprogramming/is_convertible/typedefs.cc
+ * tr1/4_metaprogramming/is_empty/is_empty.cc
+ * tr1/4_metaprogramming/is_empty/typedefs.cc
+ * tr1/4_metaprogramming/is_enum/is_enum.cc
+ * tr1/4_metaprogramming/is_enum/typedefs.cc
+ * tr1/4_metaprogramming/is_floating_point/is_floating_point.cc
+ * tr1/4_metaprogramming/is_floating_point/typedefs.cc
+ * tr1/4_metaprogramming/is_function/is_function.cc
+ * tr1/4_metaprogramming/is_function/typedefs.cc
+ * tr1/4_metaprogramming/is_fundamental/is_fundamental.cc
+ * tr1/4_metaprogramming/is_fundamental/typedefs.cc
+ * tr1/4_metaprogramming/is_integral/is_integral.cc
+ * tr1/4_metaprogramming/is_integral/typedefs.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/
+ is_member_function_pointer.cc
+ * tr1/4_metaprogramming/is_member_function_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/
+ is_member_object_pointer.cc
+ * tr1/4_metaprogramming/is_member_object_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_member_pointer/is_member_pointer.cc
+ * tr1/4_metaprogramming/is_member_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_object/is_object.cc
+ * tr1/4_metaprogramming/is_object/typedefs.cc
+ * tr1/4_metaprogramming/is_pod/is_pod.cc
+ * tr1/4_metaprogramming/is_pod/typedefs.cc
+ * tr1/4_metaprogramming/is_pointer/is_pointer.cc
+ * tr1/4_metaprogramming/is_pointer/typedefs.cc
+ * tr1/4_metaprogramming/is_polymorphic/is_polymorphic.cc
+ * tr1/4_metaprogramming/is_polymorphic/typedefs.cc
+ * tr1/4_metaprogramming/is_reference/is_reference.cc
+ * tr1/4_metaprogramming/is_reference/typedefs.cc
+ * tr1/4_metaprogramming/is_same/is_same.cc
+ * tr1/4_metaprogramming/is_same/typedefs.cc
+ * tr1/4_metaprogramming/is_scalar/is_scalar.cc
+ * tr1/4_metaprogramming/is_scalar/typedefs.cc
+ * tr1/4_metaprogramming/is_signed/is_signed.cc
+ * tr1/4_metaprogramming/is_signed/typedefs.cc
+ * tr1/4_metaprogramming/is_union/is_union.cc
+ * tr1/4_metaprogramming/is_union/typedefs.cc
+ * tr1/4_metaprogramming/is_unsigned/is_unsigned.cc
+ * tr1/4_metaprogramming/is_unsigned/typedefs.cc
+ * tr1/4_metaprogramming/is_void/is_void.cc
+ * tr1/4_metaprogramming/is_void/typedefs.cc
+ * tr1/4_metaprogramming/is_volatile/is_volatile.cc
+ * tr1/4_metaprogramming/is_volatile/typedefs.cc
+ * tr1/4_metaprogramming/other_transformations
+ * tr1/4_metaprogramming/other_transformations/aligned_storage
+ * tr1/4_metaprogramming/other_transformations/aligned_storage/
+ aligned_storage.cc
+ * tr1/4_metaprogramming/other_transformations/aligned_storage/
+ typedefs.cc
+ * tr1/4_metaprogramming/pointer_modifications
+ * tr1/4_metaprogramming/pointer_modifications/add_pointer.cc
+ * tr1/4_metaprogramming/pointer_modifications/remove_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories
+ * tr1/4_metaprogramming/primary_type_categories/is_array
+ * tr1/4_metaprogramming/primary_type_categories/is_array/is_array.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_array/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_class
+ * tr1/4_metaprogramming/primary_type_categories/is_class/is_class.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_class/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_enum
+ * tr1/4_metaprogramming/primary_type_categories/is_enum/24808.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_enum/is_enum.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_enum/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_floating_point
+ * tr1/4_metaprogramming/primary_type_categories/is_floating_point/
+ is_floating_point.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_floating_point/
+ typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_function
+ * tr1/4_metaprogramming/primary_type_categories/is_function/24808.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_function/
+ is_function.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_function/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_integral
+ * tr1/4_metaprogramming/primary_type_categories/is_integral/
+ is_integral.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_integral/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_function_pointer
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_function_pointer/is_member_function_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_function_pointer/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_object_pointer
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_object_pointer/is_member_object_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories/
+ is_member_object_pointer/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_pointer
+ * tr1/4_metaprogramming/primary_type_categories/is_pointer/
+ is_pointer.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_pointer/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_reference
+ * tr1/4_metaprogramming/primary_type_categories/is_reference/
+ is_reference.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_reference/
+ typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_union
+ * tr1/4_metaprogramming/primary_type_categories/is_union/is_union.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_union/typedefs.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_void
+ * tr1/4_metaprogramming/primary_type_categories/is_void/is_void.cc
+ * tr1/4_metaprogramming/primary_type_categories/is_void/typedefs.cc
+ * tr1/4_metaprogramming/rank/rank.cc
+ * tr1/4_metaprogramming/rank/typedefs.cc
+ * tr1/4_metaprogramming/reference_modifications/add_reference.cc
+ * tr1/4_metaprogramming/reference_modifications/remove_reference.cc
+ * tr1/4_metaprogramming/relationships_between_types
+ * tr1/4_metaprogramming/relationships_between_types/is_base_of
+ * tr1/4_metaprogramming/relationships_between_types/is_base_of/
+ is_base_of.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_base_of/
+ typedefs.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_convertible
+ * tr1/4_metaprogramming/relationships_between_types/is_convertible/
+ is_convertible.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_convertible/
+ typedefs.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_same
+ * tr1/4_metaprogramming/relationships_between_types/is_same/is_same.cc
+ * tr1/4_metaprogramming/relationships_between_types/is_same/typedefs.cc
+ * tr1/4_metaprogramming/type_properties
+ * tr1/4_metaprogramming/type_properties/alignment_of
+ * tr1/4_metaprogramming/type_properties/alignment_of/alignment_of.cc
+ * tr1/4_metaprogramming/type_properties/alignment_of/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/extent
+ * tr1/4_metaprogramming/type_properties/extent/extent.cc
+ * tr1/4_metaprogramming/type_properties/extent/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_assign
+ * tr1/4_metaprogramming/type_properties/has_nothrow_assign/
+ has_nothrow_assign.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_assign/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_constructor
+ * tr1/4_metaprogramming/type_properties/has_nothrow_constructor/
+ has_nothrow_constructor.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_constructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_copy
+ * tr1/4_metaprogramming/type_properties/has_nothrow_copy/
+ has_nothrow_copy.cc
+ * tr1/4_metaprogramming/type_properties/has_nothrow_copy/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_assign
+ * tr1/4_metaprogramming/type_properties/has_trivial_assign/
+ has_trivial_assign.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_assign/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_constructor
+ * tr1/4_metaprogramming/type_properties/has_trivial_constructor/
+ has_trivial_constructor.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_constructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_copy
+ * tr1/4_metaprogramming/type_properties/has_trivial_copy/
+ has_trivial_copy.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_copy/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_destructor
+ * tr1/4_metaprogramming/type_properties/has_trivial_destructor/
+ has_trivial_destructor.cc
+ * tr1/4_metaprogramming/type_properties/has_trivial_destructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/has_virtual_destructor
+ * tr1/4_metaprogramming/type_properties/has_virtual_destructor/
+ has_virtual_destructor.cc
+ * tr1/4_metaprogramming/type_properties/has_virtual_destructor/
+ typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_abstract
+ * tr1/4_metaprogramming/type_properties/is_abstract/is_abstract.cc
+ * tr1/4_metaprogramming/type_properties/is_abstract/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_const
+ * tr1/4_metaprogramming/type_properties/is_const/is_const.cc
+ * tr1/4_metaprogramming/type_properties/is_const/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_empty
+ * tr1/4_metaprogramming/type_properties/is_empty/is_empty.cc
+ * tr1/4_metaprogramming/type_properties/is_empty/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_pod
+ * tr1/4_metaprogramming/type_properties/is_pod/is_pod.cc
+ * tr1/4_metaprogramming/type_properties/is_pod/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_polymorphic
+ * tr1/4_metaprogramming/type_properties/is_polymorphic/24809.cc
+ * tr1/4_metaprogramming/type_properties/is_polymorphic/
+ is_polymorphic.cc
+ * tr1/4_metaprogramming/type_properties/is_polymorphic/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_signed
+ * tr1/4_metaprogramming/type_properties/is_signed/is_signed.cc
+ * tr1/4_metaprogramming/type_properties/is_signed/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_unsigned
+ * tr1/4_metaprogramming/type_properties/is_unsigned/is_unsigned.cc
+ * tr1/4_metaprogramming/type_properties/is_unsigned/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/is_volatile
+ * tr1/4_metaprogramming/type_properties/is_volatile/is_volatile.cc
+ * tr1/4_metaprogramming/type_properties/is_volatile/typedefs.cc
+ * tr1/4_metaprogramming/type_properties/rank
+ * tr1/4_metaprogramming/type_properties/rank/rank.cc
+ * tr1/4_metaprogramming/type_properties/rank/typedefs.cc
+
2007-04-30 Hans-Peter Nilsson <hp@axis.com>
* testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Correct
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct add_const<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.1 Const-volatile modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::add_const;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<add_const<int>::type, const int>::value) );
+ VERIFY( (is_same<add_const<volatile int>::type, const volatile int>::value) );
+ VERIFY( (is_same<add_const<int*>::type, int* const>::value) );
+ VERIFY( (is_same<add_const<int&>::type, int&>::value) );
+ VERIFY( (is_same<add_const<int (int)>::type, int (int)>::value) );
+ VERIFY( (is_same<add_const<const int>::type, const int>::value) );
+ VERIFY( (is_same<add_const<ClassType>::type, const ClassType>::value) );
+ VERIFY( (is_same<add_const<volatile ClassType>::type,
+ const volatile ClassType>::value) );
+ VERIFY( (is_same<add_const<ClassType*>::type, ClassType* const>::value) );
+ VERIFY( (is_same<add_const<ClassType&>::type, ClassType&>::value) );
+ VERIFY( (is_same<add_const<ClassType (ClassType)>::type,
+ ClassType (ClassType)>::value) );
+ VERIFY( (is_same<add_const<const ClassType>::type, const ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct add_cv<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.1 Const-volatile modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::add_cv;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<add_cv<int>::type, const volatile int>::value) );
+ VERIFY( (is_same<add_cv<const int>::type, const volatile int>::value) );
+ VERIFY( (is_same<add_cv<int*>::type, int* const volatile>::value) );
+ VERIFY( (is_same<add_cv<int&>::type, int&>::value) );
+ VERIFY( (is_same<add_cv<int (int)>::type, int (int)>::value) );
+ VERIFY( (is_same<add_cv<const volatile int>::type,
+ const volatile int>::value) );
+ VERIFY( (is_same<add_cv<ClassType>::type, const volatile ClassType>::value) );
+ VERIFY( (is_same<add_cv<volatile ClassType>::type,
+ const volatile ClassType>::value) );
+ VERIFY( (is_same<add_cv<ClassType*>::type,
+ ClassType* const volatile>::value) );
+ VERIFY( (is_same<add_cv<ClassType&>::type, ClassType&>::value) );
+ VERIFY( (is_same<add_cv<ClassType (ClassType)>::type,
+ ClassType (ClassType)>::value) );
+ VERIFY( (is_same<add_cv<const volatile ClassType>::type,
+ const volatile ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct add_pointer<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.2 Reference modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::add_pointer;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<add_pointer<int>::type, int*>::value) );
+ VERIFY( (is_same<add_pointer<int*>::type, int**>::value) );
+ VERIFY( (is_same<add_pointer<const int>::type, const int*>::value) );
+ VERIFY( (is_same<add_pointer<int&>::type, int*>::value) );
+ VERIFY( (is_same<add_pointer<ClassType*>::type, ClassType**>::value) );
+ VERIFY( (is_same<add_pointer<ClassType>::type, ClassType*>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct add_reference<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.2 Reference modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::add_reference;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<add_reference<int>::type, int&>::value) );
+ VERIFY( (is_same<add_reference<int&>::type, int&>::value) );
+ VERIFY( (is_same<add_reference<const int>::type, const int&>::value) );
+ VERIFY( (is_same<add_reference<int*>::type, int*&>::value) );
+ VERIFY( (is_same<add_reference<ClassType&>::type, ClassType&>::value) );
+ VERIFY( (is_same<add_reference<ClassType>::type, ClassType&>::value) );
+
+ VERIFY( (is_same<add_reference<void>::type, void>::value) );
+ VERIFY( (is_same<add_reference<const void>::type, const void>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct add_volatile<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.1 Const-volatile modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::add_volatile;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<add_volatile<int>::type, volatile int>::value) );
+ VERIFY( (is_same<add_volatile<const int>::type, const volatile int>::value) );
+ VERIFY( (is_same<add_volatile<int*>::type, int* volatile>::value) );
+ VERIFY( (is_same<add_volatile<int&>::type, int&>::value) );
+ VERIFY( (is_same<add_volatile<int (int)>::type, int (int)>::value) );
+ VERIFY( (is_same<add_volatile<volatile int>::type, volatile int>::value) );
+ VERIFY( (is_same<add_volatile<ClassType>::type, volatile ClassType>::value) );
+ VERIFY( (is_same<add_volatile<const ClassType>::type,
+ const volatile ClassType>::value) );
+ VERIFY( (is_same<add_volatile<ClassType*>::type,
+ ClassType* volatile>::value) );
+ VERIFY( (is_same<add_volatile<ClassType&>::type, ClassType&>::value) );
+ VERIFY( (is_same<add_volatile<ClassType (ClassType)>::type,
+ ClassType (ClassType)>::value) );
+ VERIFY( (is_same<add_volatile<volatile ClassType>::type,
+ volatile ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct aligned_storage<1, alignment_of<test_type>::value>;
+ }
+}
--- /dev/null
+// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.8 Other transformations
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::aligned_storage;
+ using std::tr1::alignment_of;
+ using namespace __gnu_test;
+
+ const std::size_t align_c = alignment_of<char>::value;
+ VERIFY( (sizeof(aligned_storage<4, align_c>::type) >= 4) );
+ VERIFY( (__alignof__(aligned_storage<4, align_c>::type) == align_c) );
+
+ const std::size_t align_s = alignment_of<short>::value;
+ VERIFY( (sizeof(aligned_storage<1, align_s>::type) >= 1) );
+ VERIFY( (__alignof__(aligned_storage<1, align_s>::type) == align_s) );
+
+ const std::size_t align_i = alignment_of<int>::value;
+ VERIFY( (sizeof(aligned_storage<7, align_i>::type) >= 7) );
+ VERIFY( (__alignof__(aligned_storage<7, align_i>::type) == align_i) );
+
+ const std::size_t align_d = alignment_of<double>::value;
+ VERIFY( (sizeof(aligned_storage<2, align_d>::type) >= 2) );
+ VERIFY( (__alignof__(aligned_storage<2, align_d>::type) == align_d) );
+
+ const std::size_t align_ai = alignment_of<int[4]>::value;
+ VERIFY( (sizeof(aligned_storage<20, align_ai>::type) >= 20) );
+ VERIFY( (__alignof__(aligned_storage<20, align_ai>::type) == align_ai) );
+
+ const std::size_t align_ct = alignment_of<ClassType>::value;
+ VERIFY( (sizeof(aligned_storage<11, align_ct>::type) >= 11) );
+ VERIFY( (__alignof__(aligned_storage<11, align_ct>::type) == align_ct) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct alignment_of<test_type>;
+ }
+}
--- /dev/null
+// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::alignment_of<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::alignment_of;
+ using namespace __gnu_test;
+
+ VERIFY( (test_property<alignment_of, char>(__alignof__(char))) );
+ VERIFY( (test_property<alignment_of, short>(__alignof__(short))) );
+ VERIFY( (test_property<alignment_of, int>(__alignof__(int))) );
+ VERIFY( (test_property<alignment_of, double>(__alignof__(double))) );
+ VERIFY( (test_property<alignment_of, int[4]>(__alignof__(int[4]))) );
+ VERIFY( (test_property<alignment_of, ClassType>(__alignof__(ClassType))) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+++ /dev/null
-// 2004-12-09 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.3 Array modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_all_extents;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_all_extents<int>::type, int>::value) );
- VERIFY( (is_same<remove_all_extents<int[2]>::type, int>::value) );
- VERIFY( (is_same<remove_all_extents<int[2][3]>::type, int>::value) );
- VERIFY( (is_same<remove_all_extents<int[][3]>::type, int>::value) );
- VERIFY( (is_same<remove_all_extents<const int[2][3]>::type,
- const int>::value) );
- VERIFY( (is_same<remove_all_extents<ClassType>::type, ClassType>::value) );
- VERIFY( (is_same<remove_all_extents<ClassType[2]>::type, ClassType>::value) );
- VERIFY( (is_same<remove_all_extents<ClassType[2][3]>::type,
- ClassType>::value) );
- VERIFY( (is_same<remove_all_extents<ClassType[][3]>::type,
- ClassType>::value) );
- VERIFY( (is_same<remove_all_extents<const ClassType[2][3]>::type,
- const ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-09 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.3 Array modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_extent;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_extent<int>::type, int>::value) );
- VERIFY( (is_same<remove_extent<int[2]>::type, int>::value) );
- VERIFY( (is_same<remove_extent<int[2][3]>::type, int[3]>::value) );
- VERIFY( (is_same<remove_extent<int[][3]>::type, int[3]>::value) );
- VERIFY( (is_same<remove_extent<const int[2]>::type, const int>::value) );
- VERIFY( (is_same<remove_extent<ClassType>::type, ClassType>::value) );
- VERIFY( (is_same<remove_extent<ClassType[2]>::type, ClassType>::value) );
- VERIFY( (is_same<remove_extent<ClassType[2][3]>::type,
- ClassType[3]>::value) );
- VERIFY( (is_same<remove_extent<ClassType[][3]>::type,
- ClassType[3]>::value) );
- VERIFY( (is_same<remove_extent<const ClassType[2]>::type,
- const ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_arithmetic;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_arithmetic, void>(false)) );
-
- VERIFY( (test_category<is_arithmetic, char>(true)) );
- VERIFY( (test_category<is_arithmetic, signed char>(true)) );
- VERIFY( (test_category<is_arithmetic, unsigned char>(true)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_arithmetic, wchar_t>(true)) );
-#endif
- VERIFY( (test_category<is_arithmetic, short>(true)) );
- VERIFY( (test_category<is_arithmetic, unsigned short>(true)) );
- VERIFY( (test_category<is_arithmetic, int>(true)) );
- VERIFY( (test_category<is_arithmetic, unsigned int>(true)) );
- VERIFY( (test_category<is_arithmetic, long>(true)) );
- VERIFY( (test_category<is_arithmetic, unsigned long>(true)) );
- VERIFY( (test_category<is_arithmetic, long long>(true)) );
- VERIFY( (test_category<is_arithmetic, unsigned long long>(true)) );
- VERIFY( (test_category<is_arithmetic, float>(true)) );
- VERIFY( (test_category<is_arithmetic, double>(true)) );
- VERIFY( (test_category<is_arithmetic, long double>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_arithmetic, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_arithmetic<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_compound;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_compound, void>(false)) );
- VERIFY( (test_category<is_compound, char>(false)) );
- VERIFY( (test_category<is_compound, signed char>(false)) );
- VERIFY( (test_category<is_compound, unsigned char>(false)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_compound, wchar_t>(false)) );
-#endif
- VERIFY( (test_category<is_compound, short>(false)) );
- VERIFY( (test_category<is_compound, unsigned short>(false)) );
- VERIFY( (test_category<is_compound, int>(false)) );
- VERIFY( (test_category<is_compound, unsigned int>(false)) );
- VERIFY( (test_category<is_compound, long>(false)) );
- VERIFY( (test_category<is_compound, unsigned long>(false)) );
- VERIFY( (test_category<is_compound, long long>(false)) );
- VERIFY( (test_category<is_compound, unsigned long long>(false)) );
- VERIFY( (test_category<is_compound, float>(false)) );
- VERIFY( (test_category<is_compound, double>(false)) );
- VERIFY( (test_category<is_compound, long double>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_compound, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_compound<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_fundamental;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_fundamental, void>(true)) );
- VERIFY( (test_category<is_fundamental, char>(true)) );
- VERIFY( (test_category<is_fundamental, signed char>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned char>(true)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_fundamental, wchar_t>(true)) );
-#endif
- VERIFY( (test_category<is_fundamental, short>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned short>(true)) );
- VERIFY( (test_category<is_fundamental, int>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned int>(true)) );
- VERIFY( (test_category<is_fundamental, long>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned long>(true)) );
- VERIFY( (test_category<is_fundamental, long long>(true)) );
- VERIFY( (test_category<is_fundamental, unsigned long long>(true)) );
- VERIFY( (test_category<is_fundamental, float>(true)) );
- VERIFY( (test_category<is_fundamental, double>(true)) );
- VERIFY( (test_category<is_fundamental, long double>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_fundamental, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_fundamental<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_member_pointer;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_member_pointer, int (ClassType::*)>(true)) );
- 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)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_member_pointer<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-11-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-// libstdc++/24808
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_object;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_object, IncompleteClass>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_object;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_object, int (int)>(false)) );
- VERIFY( (test_category<is_object, ClassType (ClassType)>(false)) );
- VERIFY( (test_category<is_object, float (int, float, int[], int&)>(false)) );
- VERIFY( (test_category<is_object, int&>(false)) );
- VERIFY( (test_category<is_object, ClassType&>(false)) );
- VERIFY( (test_category<is_object, int(&)(int)>(false)) );
- VERIFY( (test_category<is_object, void>(false)) );
- VERIFY( (test_category<is_object, const void>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_object, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_object<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.2 Composite type traits
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_scalar;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_scalar, int>(true)) );
- VERIFY( (test_category<is_scalar, float>(true)) );
- VERIFY( (test_category<is_scalar, EnumType>(true)) );
- 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)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_scalar<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.1 Const-volatile modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::add_const;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<add_const<int>::type, const int>::value) );
- VERIFY( (is_same<add_const<volatile int>::type, const volatile int>::value) );
- VERIFY( (is_same<add_const<int*>::type, int* const>::value) );
- VERIFY( (is_same<add_const<int&>::type, int&>::value) );
- VERIFY( (is_same<add_const<int (int)>::type, int (int)>::value) );
- VERIFY( (is_same<add_const<const int>::type, const int>::value) );
- VERIFY( (is_same<add_const<ClassType>::type, const ClassType>::value) );
- VERIFY( (is_same<add_const<volatile ClassType>::type,
- const volatile ClassType>::value) );
- VERIFY( (is_same<add_const<ClassType*>::type, ClassType* const>::value) );
- VERIFY( (is_same<add_const<ClassType&>::type, ClassType&>::value) );
- VERIFY( (is_same<add_const<ClassType (ClassType)>::type,
- ClassType (ClassType)>::value) );
- VERIFY( (is_same<add_const<const ClassType>::type, const ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.1 Const-volatile modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::add_cv;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<add_cv<int>::type, const volatile int>::value) );
- VERIFY( (is_same<add_cv<const int>::type, const volatile int>::value) );
- VERIFY( (is_same<add_cv<int*>::type, int* const volatile>::value) );
- VERIFY( (is_same<add_cv<int&>::type, int&>::value) );
- VERIFY( (is_same<add_cv<int (int)>::type, int (int)>::value) );
- VERIFY( (is_same<add_cv<const volatile int>::type,
- const volatile int>::value) );
- VERIFY( (is_same<add_cv<ClassType>::type, const volatile ClassType>::value) );
- VERIFY( (is_same<add_cv<volatile ClassType>::type,
- const volatile ClassType>::value) );
- VERIFY( (is_same<add_cv<ClassType*>::type,
- ClassType* const volatile>::value) );
- VERIFY( (is_same<add_cv<ClassType&>::type, ClassType&>::value) );
- VERIFY( (is_same<add_cv<ClassType (ClassType)>::type,
- ClassType (ClassType)>::value) );
- VERIFY( (is_same<add_cv<const volatile ClassType>::type,
- const volatile ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.1 Const-volatile modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::add_volatile;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<add_volatile<int>::type, volatile int>::value) );
- VERIFY( (is_same<add_volatile<const int>::type, const volatile int>::value) );
- VERIFY( (is_same<add_volatile<int*>::type, int* volatile>::value) );
- VERIFY( (is_same<add_volatile<int&>::type, int&>::value) );
- VERIFY( (is_same<add_volatile<int (int)>::type, int (int)>::value) );
- VERIFY( (is_same<add_volatile<volatile int>::type, volatile int>::value) );
- VERIFY( (is_same<add_volatile<ClassType>::type, volatile ClassType>::value) );
- VERIFY( (is_same<add_volatile<const ClassType>::type,
- const volatile ClassType>::value) );
- VERIFY( (is_same<add_volatile<ClassType*>::type,
- ClassType* volatile>::value) );
- VERIFY( (is_same<add_volatile<ClassType&>::type, ClassType&>::value) );
- VERIFY( (is_same<add_volatile<ClassType (ClassType)>::type,
- ClassType (ClassType)>::value) );
- VERIFY( (is_same<add_volatile<volatile ClassType>::type,
- volatile ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-10 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.1 Const-volatile modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_const;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_const<const volatile int>::type,
- volatile int>::value) );
- VERIFY( (is_same<remove_const<const int*>::type, const int*>::value) );
- VERIFY( (is_same<remove_const<const volatile ClassType>::type,
- volatile ClassType>::value) );
- VERIFY( (is_same<remove_const<const ClassType*>::type,
- const ClassType*>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-10 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.1 Const-volatile modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_cv;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_cv<const volatile int>::type, int>::value) );
- VERIFY( (is_same<remove_cv<const volatile int*>::type,
- const volatile int*>::value) );
- VERIFY( (is_same<remove_cv<const volatile ClassType>::type,
- ClassType>::value) );
- VERIFY( (is_same<remove_cv<const volatile ClassType*>::type,
- const volatile ClassType*>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-10 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.1 Const-volatile modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_volatile;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_volatile<const volatile int>::type,
- const int>::value) );
- VERIFY( (is_same<remove_volatile<volatile int*>::type,
- volatile int*>::value) );
- VERIFY( (is_same<remove_volatile<const volatile ClassType>::type,
- const ClassType>::value) );
- VERIFY( (is_same<remove_volatile<volatile ClassType*>::type,
- volatile ClassType*>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct extent<test_type, 2>;
+ }
+}
--- /dev/null
+// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::extent<int, 1> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::extent;
+ using namespace __gnu_test;
+
+ VERIFY( (test_property<extent, int, 0>(0)) );
+ VERIFY( (test_property<extent, int[2], 0>(2)) );
+ VERIFY( (test_property<extent, int[2][4], 0>(2)) );
+ VERIFY( (test_property<extent, int[][4], 0>(0)) );
+ VERIFY( (extent<int, 1>::value == 0) );
+ VERIFY( (extent<int[2], 1>::value == 0) );
+ VERIFY( (extent<int[2][4], 1>::value == 4) );
+ VERIFY( (extent<int[][4], 1>::value == 4) );
+ VERIFY( (extent<int[10][4][6][8][12][2], 4>::value == 12) );
+ VERIFY( (test_property<extent, ClassType, 0>(0)) );
+ VERIFY( (test_property<extent, ClassType[2], 0>(2)) );
+ VERIFY( (test_property<extent, ClassType[2][4], 0>(2)) );
+ VERIFY( (test_property<extent, ClassType[][4], 0>(0)) );
+ VERIFY( (extent<ClassType, 1>::value == 0) );
+ VERIFY( (extent<ClassType[2], 1>::value == 0) );
+ VERIFY( (extent<ClassType[2][4], 1>::value == 4) );
+ VERIFY( (extent<ClassType[][4], 1>::value == 4) );
+ VERIFY( (extent<ClassType[10][4][6][8][12][2], 4>::value == 12) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_nothrow_assign<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_nothrow_assign<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_nothrow_assign;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_nothrow_assign, void>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, float>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, EnumType>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int*>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int(*)(int)>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int (ClassType::*)>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int (ClassType::*) (int)>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int[2]>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, float[][3]>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, EnumType[2][3][4]>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int*[3]>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int(*[][2])(int)>(true)) );
+ VERIFY( (test_category<has_nothrow_assign, int (ClassType::*[2][3])>(true)) );
+ VERIFY( (test_category<has_nothrow_assign,
+ int (ClassType::*[][2][3]) (int)>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_nothrow_constructor<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-29 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_nothrow_constructor<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-29 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_nothrow_constructor;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_nothrow_constructor, void>(true)) );
+ VERIFY( (test_category<has_nothrow_constructor, int>(true)) );
+ VERIFY( (test_category<has_nothrow_constructor, float>(true)) );
+ VERIFY( (test_category<has_nothrow_constructor, EnumType>(true)) );
+ 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)) );
+ VERIFY( (test_category<has_nothrow_constructor, int*[3]>(true)) );
+ 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)) );
+ VERIFY( (test_category<has_nothrow_constructor, ClassType>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_nothrow_copy<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_nothrow_copy<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_nothrow_copy;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_nothrow_copy, void>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, float>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, EnumType>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int*>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int(*)(int)>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int (ClassType::*)>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int (ClassType::*) (int)>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int[2]>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, float[][3]>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, EnumType[2][3][4]>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int*[3]>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int(*[][2])(int)>(true)) );
+ VERIFY( (test_category<has_nothrow_copy, int (ClassType::*[2][3])>(true)) );
+ VERIFY( (test_category<has_nothrow_copy,
+ int (ClassType::*[][2][3]) (int)>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_trivial_assign<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_trivial_assign<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_trivial_assign;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_trivial_assign, void>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int>(true)) );
+ VERIFY( (test_category<has_trivial_assign, float>(true)) );
+ VERIFY( (test_category<has_trivial_assign, EnumType>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int*>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int(*)(int)>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int (ClassType::*)>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int (ClassType::*) (int)>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int[2]>(true)) );
+ VERIFY( (test_category<has_trivial_assign, float[][3]>(true)) );
+ VERIFY( (test_category<has_trivial_assign, EnumType[2][3][4]>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int*[3]>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int(*[][2])(int)>(true)) );
+ VERIFY( (test_category<has_trivial_assign, int (ClassType::*[2][3])>(true)) );
+ VERIFY( (test_category<has_trivial_assign,
+ int (ClassType::*[][2][3]) (int)>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_trivial_constructor<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_trivial_constructor<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_trivial_constructor;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_trivial_constructor, void>(true)) );
+ VERIFY( (test_category<has_trivial_constructor, int>(true)) );
+ VERIFY( (test_category<has_trivial_constructor, float>(true)) );
+ VERIFY( (test_category<has_trivial_constructor, EnumType>(true)) );
+ 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)) );
+ VERIFY( (test_category<has_trivial_constructor, int*[3]>(true)) );
+ 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)) );
+ VERIFY( (test_category<has_trivial_constructor, ClassType>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_trivial_copy<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_trivial_copy<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_trivial_copy;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_trivial_copy, void>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int>(true)) );
+ VERIFY( (test_category<has_trivial_copy, float>(true)) );
+ VERIFY( (test_category<has_trivial_copy, EnumType>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int*>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int(*)(int)>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int (ClassType::*)>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int (ClassType::*) (int)>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int[2]>(true)) );
+ VERIFY( (test_category<has_trivial_copy, float[][3]>(true)) );
+ VERIFY( (test_category<has_trivial_copy, EnumType[2][3][4]>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int*[3]>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int(*[][2])(int)>(true)) );
+ VERIFY( (test_category<has_trivial_copy, int (ClassType::*[2][3])>(true)) );
+ VERIFY( (test_category<has_trivial_copy,
+ int (ClassType::*[][2][3]) (int)>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_trivial_destructor<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_trivial_destructor<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_trivial_destructor;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<has_trivial_destructor, void>(true)) );
+ VERIFY( (test_category<has_trivial_destructor, int>(true)) );
+ VERIFY( (test_category<has_trivial_destructor, float>(true)) );
+ VERIFY( (test_category<has_trivial_destructor, EnumType>(true)) );
+ 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)) );
+ VERIFY( (test_category<has_trivial_destructor, int*[3]>(true)) );
+ 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)) );
+ VERIFY( (test_category<has_trivial_destructor, ClassType>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct has_virtual_destructor<test_type>;
+ }
+}
--- /dev/null
+// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::has_virtual_destructor<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <iostream>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::has_virtual_destructor;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<has_virtual_destructor,
+ VirtualDestructorClass>(true)) );
+ VERIFY( (test_category<has_virtual_destructor, std::iostream>(true)) );
+ VERIFY( (test_category<has_virtual_destructor, std::streambuf>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<has_virtual_destructor, PolymorphicClass>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, DerivedPolymorphic>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, AbstractClass>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, void>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, int (int)>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, int&>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, EnumType>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, ClassType>(false)) );
+ VERIFY( (test_category<has_virtual_destructor, DerivedType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+++ /dev/null
-// 2006-05-07 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2006 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.3 Helper classes
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- const bool* p = &std::tr1::integral_constant<bool, true>::value;
- VERIFY( p );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.3 Helper classes
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::true_type;
- using std::tr1::false_type;
-
- VERIFY( true_type::value == true );
- VERIFY( false_type::value == false );
- VERIFY( true_type::type::value == true );
- VERIFY( false_type::type::value == false );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::true_type true_type;
- typedef std::tr1::false_type false_type;
-
- typedef true_type::value_type true_value_type;
- typedef true_type::type true_type;
- typedef true_type::type::value_type true_type_value_type;
- typedef true_type::type::type true_type_type;
-
- typedef false_type::value_type false_value_type;
- typedef false_type::type false_type;
- typedef false_type::type::value_type false_type_value_type;
- typedef false_type::type::type false_type_type;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::integral_constant<int, 1> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct integral_constant<test_type, -3>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::integral_constant<int, 1> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2006-05-07 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.3 Helper classes
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ const bool* p = &std::tr1::integral_constant<bool, true>::value;
+ VERIFY( p );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::true_type true_type;
+ typedef std::tr1::false_type false_type;
+
+ typedef true_type::value_type true_value_type;
+ typedef true_type::type true_type;
+ typedef true_type::type::value_type true_type_value_type;
+ typedef true_type::type::type true_type_type;
+
+ typedef false_type::value_type false_value_type;
+ typedef false_type::type false_type;
+ typedef false_type::type::value_type false_type_value_type;
+ typedef false_type::type::type false_type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.3 Helper classes
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::true_type;
+ using std::tr1::false_type;
+
+ VERIFY( true_type::value == true );
+ VERIFY( false_type::value == false );
+ VERIFY( true_type::type::value == true );
+ VERIFY( false_type::type::value == false );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_abstract<test_type>;
+ }
+}
--- /dev/null
+// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_abstract<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_abstract;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_abstract, AbstractClass>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_abstract, void>(false)) );
+ VERIFY( (test_category<is_abstract, int (int)>(false)) );
+ VERIFY( (test_category<is_abstract, int&>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_abstract, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_arithmetic<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_arithmetic<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_arithmetic;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_arithmetic, void>(false)) );
+
+ VERIFY( (test_category<is_arithmetic, char>(true)) );
+ VERIFY( (test_category<is_arithmetic, signed char>(true)) );
+ VERIFY( (test_category<is_arithmetic, unsigned char>(true)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_arithmetic, wchar_t>(true)) );
+#endif
+ VERIFY( (test_category<is_arithmetic, short>(true)) );
+ VERIFY( (test_category<is_arithmetic, unsigned short>(true)) );
+ VERIFY( (test_category<is_arithmetic, int>(true)) );
+ VERIFY( (test_category<is_arithmetic, unsigned int>(true)) );
+ VERIFY( (test_category<is_arithmetic, long>(true)) );
+ VERIFY( (test_category<is_arithmetic, unsigned long>(true)) );
+ VERIFY( (test_category<is_arithmetic, long long>(true)) );
+ VERIFY( (test_category<is_arithmetic, unsigned long long>(true)) );
+ VERIFY( (test_category<is_arithmetic, float>(true)) );
+ VERIFY( (test_category<is_arithmetic, double>(true)) );
+ VERIFY( (test_category<is_arithmetic, long double>(true)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_arithmetic, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_array<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_array<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_array;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_array, int[2]>(true)) );
+ VERIFY( (test_category<is_array, int[]>(true)) );
+ VERIFY( (test_category<is_array, int[2][3]>(true)) );
+ VERIFY( (test_category<is_array, int[][3]>(true)) );
+ VERIFY( (test_category<is_array, float*[2]>(true)) );
+ VERIFY( (test_category<is_array, float*[]>(true)) );
+ VERIFY( (test_category<is_array, float*[2][3]>(true)) );
+ VERIFY( (test_category<is_array, float*[][3]>(true)) );
+ VERIFY( (test_category<is_array, ClassType[2]>(true)) );
+ VERIFY( (test_category<is_array, ClassType[]>(true)) );
+ VERIFY( (test_category<is_array, ClassType[2][3]>(true)) );
+ VERIFY( (test_category<is_array, ClassType[][3]>(true)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_array, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_base_of<test_type, test_type>;
+ }
+}
--- /dev/null
+// 2005-03-04 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_base_of<int, int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-03-04 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.6 Relationships between types
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+class HiddenCons
+{
+ HiddenCons();
+ HiddenCons(const HiddenCons&);
+};
+
+class DerivedHiddenCons
+: private HiddenCons
+{
+ DerivedHiddenCons();
+ DerivedHiddenCons(const DerivedHiddenCons&);
+};
+
+class MultiDerivedHiddenCons
+: private HiddenCons, private __gnu_test::ClassType
+{
+ MultiDerivedHiddenCons();
+ MultiDerivedHiddenCons(const MultiDerivedHiddenCons&);
+};
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_base_of;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_relationship<is_base_of, int, int>(true)) );
+ VERIFY( (test_relationship<is_base_of, EnumType, EnumType>(true)) );
+ VERIFY( (test_relationship<is_base_of, UnionType, UnionType>(true)) );
+ VERIFY( (test_relationship<is_base_of, AbstractClass,
+ AbstractClass>(true)) );
+ VERIFY( (test_relationship<is_base_of, ClassType, DerivedType>(true)) );
+ VERIFY( (test_relationship<is_base_of, ClassType, const DerivedType>(true)) );
+ VERIFY( (test_relationship<is_base_of, volatile ClassType,
+ volatile DerivedType>(true)) );
+ VERIFY( (test_relationship<is_base_of, PolymorphicClass,
+ DerivedPolymorphic>(true)) );
+ VERIFY( (test_relationship<is_base_of, HiddenCons,
+ DerivedHiddenCons>(true)) );
+ VERIFY( (test_relationship<is_base_of, HiddenCons,
+ MultiDerivedHiddenCons>(true)) );
+ VERIFY( (test_relationship<is_base_of, ClassType,
+ MultiDerivedHiddenCons>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_relationship<is_base_of, int, const int>(false)) );
+ VERIFY( (test_relationship<is_base_of, volatile UnionType,
+ UnionType>(false)) );
+ VERIFY( (test_relationship<is_base_of, int&, ClassType>(false)) );
+ VERIFY( (test_relationship<is_base_of, AbstractClass, ClassType>(false)) );
+ VERIFY( (test_relationship<is_base_of, ClassType, AbstractClass>(false)) );
+ VERIFY( (test_relationship<is_base_of, DerivedType, ClassType>(false)) );
+ VERIFY( (test_relationship<is_base_of, DerivedPolymorphic,
+ PolymorphicClass>(false)) );
+ VERIFY( (test_relationship<is_base_of, DerivedHiddenCons,
+ HiddenCons>(false)) );
+ VERIFY( (test_relationship<is_base_of, MultiDerivedHiddenCons,
+ HiddenCons>(false)) );
+ VERIFY( (test_relationship<is_base_of, MultiDerivedHiddenCons,
+ ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_class<test_type>;
+ }
+}
--- /dev/null
+// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_class<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_class;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_class, ClassType>(true)) );
+ VERIFY( (test_category<is_class, DerivedType>(true)) );
+ VERIFY( (test_category<is_class, ConvType>(true)) );
+ VERIFY( (test_category<is_class, AbstractClass>(true)) );
+ VERIFY( (test_category<is_class, PolymorphicClass>(true)) );
+ VERIFY( (test_category<is_class, DerivedPolymorphic>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_class, UnionType>(false)) );
+ VERIFY( (test_category<is_class, void>(false)) );
+ VERIFY( (test_category<is_class, int>(false)) );
+ VERIFY( (test_category<is_class, float>(false)) );
+ VERIFY( (test_category<is_class, int[2]>(false)) );
+ VERIFY( (test_category<is_class, int*>(false)) );
+ VERIFY( (test_category<is_class, int(*)(int)>(false)) );
+ VERIFY( (test_category<is_class, float&>(false)) );
+ VERIFY( (test_category<is_class, float(&)(float)>(false)) );
+ VERIFY( (test_category<is_class, int (ClassType::*)>(false)) );
+ VERIFY( (test_category<is_class, int (ClassType::*) (int)>(false)) );
+ VERIFY( (test_category<is_class, int (int)>(false)) );
+ VERIFY( (test_category<is_class, EnumType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_compound<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_compound<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_compound;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_compound, void>(false)) );
+ VERIFY( (test_category<is_compound, char>(false)) );
+ VERIFY( (test_category<is_compound, signed char>(false)) );
+ VERIFY( (test_category<is_compound, unsigned char>(false)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_compound, wchar_t>(false)) );
+#endif
+ VERIFY( (test_category<is_compound, short>(false)) );
+ VERIFY( (test_category<is_compound, unsigned short>(false)) );
+ VERIFY( (test_category<is_compound, int>(false)) );
+ VERIFY( (test_category<is_compound, unsigned int>(false)) );
+ VERIFY( (test_category<is_compound, long>(false)) );
+ VERIFY( (test_category<is_compound, unsigned long>(false)) );
+ VERIFY( (test_category<is_compound, long long>(false)) );
+ VERIFY( (test_category<is_compound, unsigned long long>(false)) );
+ VERIFY( (test_category<is_compound, float>(false)) );
+ VERIFY( (test_category<is_compound, double>(false)) );
+ VERIFY( (test_category<is_compound, long double>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_compound, ClassType>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_const<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_const<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_const;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_property<is_const, const int>(true)) );
+ VERIFY( (test_property<is_const, const volatile int>(true)) );
+ VERIFY( (test_property<is_const, cClassType>(true)) );
+ VERIFY( (test_property<is_const, cvClassType>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_property<is_const, int>(false)) );
+ VERIFY( (test_property<is_const, volatile int>(false)) );
+ VERIFY( (test_property<is_const, ClassType>(false)) );
+ VERIFY( (test_property<is_const, vClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_convertible<test_type, test_type>;
+ }
+}
--- /dev/null
+// 2005-02-23 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_convertible<int, int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-02-23 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.6 Relationships between types
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_convertible;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_relationship<is_convertible, int, int>(true)) );
+ VERIFY( (test_relationship<is_convertible, int, const int>(true)) );
+ VERIFY( (test_relationship<is_convertible, volatile int, const int>(true)) );
+ VERIFY( (test_relationship<is_convertible, int, float>(true)) );
+ VERIFY( (test_relationship<is_convertible, double, float>(true)) );
+ VERIFY( (test_relationship<is_convertible, float, int>(true)) );
+ VERIFY( (test_relationship<is_convertible, int*, const int*>(true)) );
+ VERIFY( (test_relationship<is_convertible, int*, void*>(true)) );
+ VERIFY( (test_relationship<is_convertible, int[4], int*>(true)) );
+ VERIFY( (test_relationship<is_convertible, float&, int>(true)) );
+ VERIFY( (test_relationship<is_convertible, int, const int&>(true)) );
+ VERIFY( (test_relationship<is_convertible, const int&, int>(true)) );
+ VERIFY( (test_relationship<is_convertible, float, const int&>(true)) );
+ VERIFY( (test_relationship<is_convertible, float, volatile float&>(true)) );
+ VERIFY( (test_relationship<is_convertible, int(int), int(*)(int)>(true)) );
+ VERIFY( (test_relationship<is_convertible, int(int), int(&)(int)>(true)) );
+ VERIFY( (test_relationship<is_convertible, int(&)(int), int(*)(int)>(true)) );
+ VERIFY( (test_relationship<is_convertible, EnumType, int>(true)) );
+ VERIFY( (test_relationship<is_convertible, ClassType, ClassType>(true)) );
+ VERIFY( (test_relationship<is_convertible, DerivedType, ClassType>(true)) );
+ VERIFY( (test_relationship<is_convertible, DerivedType*, ClassType*>(true)) );
+ VERIFY( (test_relationship<is_convertible, DerivedType&, ClassType&>(true)) );
+
+ VERIFY( (test_relationship<is_convertible, void, void>(true)) );
+ VERIFY( (test_relationship<is_convertible, int, void>(true)) );
+ VERIFY( (test_relationship<is_convertible, int[4], void>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_relationship<is_convertible, const int*, int*>(false)) );
+ VERIFY( (test_relationship<is_convertible, int*, float*>(false)) );
+ VERIFY( (test_relationship<is_convertible, const int[4], int*>(false)) );
+ VERIFY( (test_relationship<is_convertible, int[4], int[4]>(false)) );
+ VERIFY( (test_relationship<is_convertible, const int&, int&>(false)) );
+ VERIFY( (test_relationship<is_convertible, float&, int&>(false)) );
+ VERIFY( (test_relationship<is_convertible, float, volatile int&>(false)) );
+ VERIFY( (test_relationship<is_convertible, int(int), int(int)>(false)) );
+ VERIFY( (test_relationship<is_convertible, int(int), int(*)(void)>(false)) );
+ VERIFY( (test_relationship<is_convertible, int(*)(int), int(&)(int)>(false)) );
+ VERIFY( (test_relationship<is_convertible, int, EnumType>(false)) );
+ VERIFY( (test_relationship<is_convertible, int, ClassType>(false)) );
+ VERIFY( (test_relationship<is_convertible, ClassType, DerivedType>(false)) );
+ VERIFY( (test_relationship<is_convertible, ClassType*, DerivedType*>(false)) );
+ VERIFY( (test_relationship<is_convertible, ClassType&, DerivedType&>(false)) );
+
+ VERIFY( (test_relationship<is_convertible, void, int>(false)) );
+ VERIFY( (test_relationship<is_convertible, void, float>(false)) );
+ VERIFY( (test_relationship<is_convertible, void, int(*)(int)>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_empty<test_type>;
+ }
+}
--- /dev/null
+// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_empty<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+class EmptyClassOne
+{ typedef int type; };
+
+class EmptyClassTwo
+{ static int data; };
+
+class EmptyClassThree
+{ int f(); };
+
+class NonEmptyClassOne
+{ int data; };
+
+class NonEmptyClassTwo
+{
+ virtual int f();
+ virtual ~NonEmptyClassTwo();
+};
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_empty;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_empty, ClassType>(true)) );
+ VERIFY( (test_category<is_empty, EmptyClassOne>(true)) );
+ VERIFY( (test_category<is_empty, EmptyClassTwo>(true)) );
+ VERIFY( (test_category<is_empty, EmptyClassThree>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_empty, void>(false)) );
+ VERIFY( (test_category<is_empty, float>(false)) );
+ VERIFY( (test_category<is_empty, int[4]>(false)) );
+ VERIFY( (test_category<is_empty, int*>(false)) );
+ VERIFY( (test_category<is_empty, int&>(false)) );
+ VERIFY( (test_category<is_empty, int (ClassType::*)>(false)) );
+ VERIFY( (test_category<is_empty, EnumType>(false)) );
+ VERIFY( (test_category<is_empty, int (int)>(false)) );
+
+ VERIFY( (test_category<is_empty, AbstractClass>(false)) );
+ VERIFY( (test_category<is_empty, NonEmptyClassOne>(false)) );
+ VERIFY( (test_category<is_empty, NonEmptyClassTwo>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2005-11-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+// libstdc++/24808
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_enum;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_enum, IncompleteClass>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_enum<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_enum<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_enum;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_enum, EnumType>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_enum, void>(false)) );
+ VERIFY( (test_category<is_enum, int>(false)) );
+ VERIFY( (test_category<is_enum, float>(false)) );
+ VERIFY( (test_category<is_enum, int[2]>(false)) );
+ VERIFY( (test_category<is_enum, int*>(false)) );
+ VERIFY( (test_category<is_enum, int(*)(int)>(false)) );
+ 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)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_enum, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_floating_point<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_floating_point<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_floating_point;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_floating_point, void>(false)) );
+ VERIFY( (test_category<is_floating_point, char>(false)) );
+ VERIFY( (test_category<is_floating_point, signed char>(false)) );
+ VERIFY( (test_category<is_floating_point, unsigned char>(false)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_floating_point, wchar_t>(false)) );
+#endif
+ VERIFY( (test_category<is_floating_point, short>(false)) );
+ VERIFY( (test_category<is_floating_point, unsigned short>(false)) );
+ VERIFY( (test_category<is_floating_point, int>(false)) );
+ VERIFY( (test_category<is_floating_point, unsigned int>(false)) );
+ VERIFY( (test_category<is_floating_point, long>(false)) );
+ VERIFY( (test_category<is_floating_point, unsigned long>(false)) );
+ VERIFY( (test_category<is_floating_point, long long>(false)) );
+ VERIFY( (test_category<is_floating_point, unsigned long long>(false)) );
+
+ VERIFY( (test_category<is_floating_point, float>(true)) );
+ VERIFY( (test_category<is_floating_point, double>(true)) );
+ VERIFY( (test_category<is_floating_point, long double>(true)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_floating_point, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2005-11-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+// libstdc++/24808
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_function;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_function, IncompleteClass>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_function<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_function<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_function;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_function, int (int)>(true)) );
+ VERIFY( (test_category<is_function, ClassType (ClassType)>(true)) );
+ VERIFY( (test_category<is_function, float (int, float, int[], int&)>(true)) );
+ VERIFY( (test_category<is_function, int (int, ...)>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_function, int&>(false)) );
+ VERIFY( (test_category<is_function, void>(false)) );
+ VERIFY( (test_category<is_function, const void>(false)) );
+
+ VERIFY( (test_category<is_function, AbstractClass>(false)) );
+ VERIFY( (test_category<is_function, int(&)(int)>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_function, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_fundamental<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_fundamental<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_fundamental;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_fundamental, void>(true)) );
+ VERIFY( (test_category<is_fundamental, char>(true)) );
+ VERIFY( (test_category<is_fundamental, signed char>(true)) );
+ VERIFY( (test_category<is_fundamental, unsigned char>(true)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_fundamental, wchar_t>(true)) );
+#endif
+ VERIFY( (test_category<is_fundamental, short>(true)) );
+ VERIFY( (test_category<is_fundamental, unsigned short>(true)) );
+ VERIFY( (test_category<is_fundamental, int>(true)) );
+ VERIFY( (test_category<is_fundamental, unsigned int>(true)) );
+ VERIFY( (test_category<is_fundamental, long>(true)) );
+ VERIFY( (test_category<is_fundamental, unsigned long>(true)) );
+ VERIFY( (test_category<is_fundamental, long long>(true)) );
+ VERIFY( (test_category<is_fundamental, unsigned long long>(true)) );
+ VERIFY( (test_category<is_fundamental, float>(true)) );
+ VERIFY( (test_category<is_fundamental, double>(true)) );
+ VERIFY( (test_category<is_fundamental, long double>(true)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_fundamental, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_integral<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_integral<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_integral;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_integral, void>(false)) );
+
+ VERIFY( (test_category<is_integral, char>(true)) );
+ VERIFY( (test_category<is_integral, signed char>(true)) );
+ VERIFY( (test_category<is_integral, unsigned char>(true)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_integral, wchar_t>(true)) );
+#endif
+ VERIFY( (test_category<is_integral, short>(true)) );
+ VERIFY( (test_category<is_integral, unsigned short>(true)) );
+ VERIFY( (test_category<is_integral, int>(true)) );
+ VERIFY( (test_category<is_integral, unsigned int>(true)) );
+ VERIFY( (test_category<is_integral, long>(true)) );
+ VERIFY( (test_category<is_integral, unsigned long>(true)) );
+ VERIFY( (test_category<is_integral, long long>(true)) );
+ VERIFY( (test_category<is_integral, unsigned long long>(true)) );
+
+ VERIFY( (test_category<is_integral, float>(false)) );
+ VERIFY( (test_category<is_integral, double>(false)) );
+ VERIFY( (test_category<is_integral, long double>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_integral, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_member_function_pointer<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_member_function_pointer<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_member_function_pointer;
+ 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,
+ int (ClassType::*)>(false)) );
+ VERIFY( (test_category<is_member_function_pointer,
+ const int (ClassType::*)>(false)) );
+ VERIFY( (test_category<is_member_function_pointer,
+ ClassType (ClassType::*)>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_member_function_pointer, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_member_object_pointer<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_member_object_pointer<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_member_object_pointer;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_member_object_pointer,
+ int (ClassType::*)>(true)) );
+ VERIFY( (test_category<is_member_object_pointer,
+ const int (ClassType::*)>(true)) );
+ VERIFY( (test_category<is_member_object_pointer,
+ ClassType (ClassType::*)>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_member_object_pointer,
+ int (ClassType::*) (int)>(false)) );
+ 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)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_member_object_pointer, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_member_pointer<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_member_pointer<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_member_pointer;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_member_pointer, int (ClassType::*)>(true)) );
+ 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)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// 2005-11-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+// libstdc++/24808
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_object;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_object, IncompleteClass>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_object<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_object<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_object;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_object, int (int)>(false)) );
+ VERIFY( (test_category<is_object, ClassType (ClassType)>(false)) );
+ VERIFY( (test_category<is_object, float (int, float, int[], int&)>(false)) );
+ VERIFY( (test_category<is_object, int&>(false)) );
+ VERIFY( (test_category<is_object, ClassType&>(false)) );
+ VERIFY( (test_category<is_object, int(&)(int)>(false)) );
+ VERIFY( (test_category<is_object, void>(false)) );
+ VERIFY( (test_category<is_object, const void>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_object, ClassType>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_pod<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_pod<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_pod;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_pod, void>(true)) );
+ VERIFY( (test_category<is_pod, int>(true)) );
+ VERIFY( (test_category<is_pod, float>(true)) );
+ VERIFY( (test_category<is_pod, EnumType>(true)) );
+ 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)) );
+ VERIFY( (test_category<is_pod, ClassType>(true)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_pointer<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_pointer<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_pointer;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_pointer, int*>(true)) );
+ VERIFY( (test_category<is_pointer, ClassType*>(true)) );
+ VERIFY( (test_category<is_pointer, int(*)(int)>(true)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_pointer, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <exception>
+
+// libstdc++/24809
+static const bool b = std::tr1::is_polymorphic<std::exception>::value;
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_polymorphic<test_type>;
+ }
+}
--- /dev/null
+// 2005-03-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_polymorphic<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-03-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <iostream>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_polymorphic;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_polymorphic, PolymorphicClass>(true)) );
+ VERIFY( (test_category<is_polymorphic, DerivedPolymorphic>(true)) );
+ VERIFY( (test_category<is_polymorphic, AbstractClass>(true)) );
+ VERIFY( (test_category<is_polymorphic, VirtualDestructorClass>(true)) );
+ VERIFY( (test_category<is_polymorphic, std::iostream>(true)) );
+ VERIFY( (test_category<is_polymorphic, std::streambuf>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_polymorphic, void>(false)) );
+ VERIFY( (test_category<is_polymorphic, int (int)>(false)) );
+ VERIFY( (test_category<is_polymorphic, int&>(false)) );
+ VERIFY( (test_category<is_polymorphic, EnumType>(false)) );
+ VERIFY( (test_category<is_polymorphic, ClassType>(false)) );
+ VERIFY( (test_category<is_polymorphic, DerivedType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_reference<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-06 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_reference<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-06 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_reference;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_reference, int&>(true)) );
+ VERIFY( (test_category<is_reference, ClassType&>(true)) );
+ VERIFY( (test_category<is_reference, int(&)(int)>(true)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_reference, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_same<test_type, test_type>;
+ }
+}
--- /dev/null
+// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_same<int, int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.6 Relationships between types
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_relationship<is_same, int, int>(true)) );
+ VERIFY( (test_relationship<is_same, const int, const int>(true)) );
+ VERIFY( (test_relationship<is_same, int&, int&>(true)) );
+ VERIFY( (test_relationship<is_same, ClassType, ClassType>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_relationship<is_same, void, int>(false)) );
+ VERIFY( (test_relationship<is_same, int, const int>(false)) );
+ VERIFY( (test_relationship<is_same, int, int&>(false)) );
+ VERIFY( (test_relationship<is_same, int, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_scalar<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_scalar<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.2 Composite type traits
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_scalar;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_scalar, int>(true)) );
+ VERIFY( (test_category<is_scalar, float>(true)) );
+ VERIFY( (test_category<is_scalar, EnumType>(true)) );
+ 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)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_signed<test_type>;
+ }
+}
--- /dev/null
+// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_signed<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_signed;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_signed, void>(false)) );
+
+ VERIFY( (test_category<is_signed, char>(false)) );
+ VERIFY( (test_category<is_signed, signed char>(true)) );
+ VERIFY( (test_category<is_signed, unsigned char>(false)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_signed, wchar_t>(false)) );
+#endif
+ VERIFY( (test_category<is_signed, short>(true)) );
+ VERIFY( (test_category<is_signed, unsigned short>(false)) );
+ VERIFY( (test_category<is_signed, int>(true)) );
+ VERIFY( (test_category<is_signed, unsigned int>(false)) );
+ VERIFY( (test_category<is_signed, long>(true)) );
+ VERIFY( (test_category<is_signed, unsigned long>(false)) );
+ VERIFY( (test_category<is_signed, long long>(true)) );
+ VERIFY( (test_category<is_signed, unsigned long long>(false)) );
+
+ VERIFY( (test_category<is_signed, float>(false)) );
+ VERIFY( (test_category<is_signed, double>(false)) );
+ VERIFY( (test_category<is_signed, long double>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_signed, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_union<test_type>;
+ }
+}
--- /dev/null
+// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_union<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_union;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_category<is_union, UnionType>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_category<is_union, ClassType>(false)) );
+ VERIFY( (test_category<is_union, DerivedType>(false)) );
+ VERIFY( (test_category<is_union, ConvType>(false)) );
+ VERIFY( (test_category<is_union, AbstractClass>(false)) );
+ VERIFY( (test_category<is_union, PolymorphicClass>(false)) );
+ VERIFY( (test_category<is_union, DerivedPolymorphic>(false)) );
+ VERIFY( (test_category<is_union, void>(false)) );
+ VERIFY( (test_category<is_union, int>(false)) );
+ VERIFY( (test_category<is_union, float>(false)) );
+ VERIFY( (test_category<is_union, int[2]>(false)) );
+ VERIFY( (test_category<is_union, int*>(false)) );
+ VERIFY( (test_category<is_union, int(*)(int)>(false)) );
+ VERIFY( (test_category<is_union, float&>(false)) );
+ VERIFY( (test_category<is_union, float(&)(float)>(false)) );
+ VERIFY( (test_category<is_union, int (ClassType::*)>(false)) );
+ VERIFY( (test_category<is_union, int (ClassType::*) (int)>(false)) );
+ VERIFY( (test_category<is_union, int (int)>(false)) );
+ VERIFY( (test_category<is_union, EnumType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_unsigned<test_type>;
+ }
+}
--- /dev/null
+// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_unsigned<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_unsigned;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_unsigned, void>(false)) );
+
+ VERIFY( (test_category<is_unsigned, char>(false)) );
+ VERIFY( (test_category<is_unsigned, signed char>(false)) );
+ VERIFY( (test_category<is_unsigned, unsigned char>(true)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_unsigned, wchar_t>(false)) );
+#endif
+ VERIFY( (test_category<is_unsigned, short>(false)) );
+ VERIFY( (test_category<is_unsigned, unsigned short>(true)) );
+ VERIFY( (test_category<is_unsigned, int>(false)) );
+ VERIFY( (test_category<is_unsigned, unsigned int>(true)) );
+ VERIFY( (test_category<is_unsigned, long>(false)) );
+ VERIFY( (test_category<is_unsigned, unsigned long>(true)) );
+ VERIFY( (test_category<is_unsigned, long long>(false)) );
+ VERIFY( (test_category<is_unsigned, unsigned long long>(true)) );
+
+ VERIFY( (test_category<is_unsigned, float>(false)) );
+ VERIFY( (test_category<is_unsigned, double>(false)) );
+ VERIFY( (test_category<is_unsigned, long double>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_unsigned, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_void<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_void<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.1 Primary type categories
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_void;
+ using namespace __gnu_test;
+
+ VERIFY( (test_category<is_void, void>(true)) );
+
+ VERIFY( (test_category<is_void, char>(false)) );
+ VERIFY( (test_category<is_void, signed char>(false)) );
+ VERIFY( (test_category<is_void, unsigned char>(false)) );
+#ifdef _GLIBCXX_USE_WCHAR_T
+ VERIFY( (test_category<is_void, wchar_t>(false)) );
+#endif
+ VERIFY( (test_category<is_void, short>(false)) );
+ VERIFY( (test_category<is_void, unsigned short>(false)) );
+ VERIFY( (test_category<is_void, int>(false)) );
+ VERIFY( (test_category<is_void, unsigned int>(false)) );
+ VERIFY( (test_category<is_void, long>(false)) );
+ VERIFY( (test_category<is_void, unsigned long>(false)) );
+ VERIFY( (test_category<is_void, long long>(false)) );
+ VERIFY( (test_category<is_void, unsigned long long>(false)) );
+ VERIFY( (test_category<is_void, float>(false)) );
+ VERIFY( (test_category<is_void, double>(false)) );
+ VERIFY( (test_category<is_void, long double>(false)) );
+
+ // Sanity check.
+ VERIFY( (test_category<is_void, ClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct is_volatile<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::is_volatile<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::is_volatile;
+ using namespace __gnu_test;
+
+ // Positive tests.
+ VERIFY( (test_property<is_volatile, volatile int>(true)) );
+ VERIFY( (test_property<is_volatile, const volatile int>(true)) );
+ VERIFY( (test_property<is_volatile, vClassType>(true)) );
+ VERIFY( (test_property<is_volatile, cvClassType>(true)) );
+
+ // Negative tests.
+ VERIFY( (test_property<is_volatile, int>(false)) );
+ VERIFY( (test_property<is_volatile, const int>(false)) );
+ VERIFY( (test_property<is_volatile, ClassType>(false)) );
+ VERIFY( (test_property<is_volatile, cClassType>(false)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+++ /dev/null
-// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.8 Other transformations
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::aligned_storage;
- using std::tr1::alignment_of;
- using namespace __gnu_test;
-
- const std::size_t align_c = alignment_of<char>::value;
- VERIFY( (sizeof(aligned_storage<4, align_c>::type) >= 4) );
- VERIFY( (__alignof__(aligned_storage<4, align_c>::type) == align_c) );
-
- const std::size_t align_s = alignment_of<short>::value;
- VERIFY( (sizeof(aligned_storage<1, align_s>::type) >= 1) );
- VERIFY( (__alignof__(aligned_storage<1, align_s>::type) == align_s) );
-
- const std::size_t align_i = alignment_of<int>::value;
- VERIFY( (sizeof(aligned_storage<7, align_i>::type) >= 7) );
- VERIFY( (__alignof__(aligned_storage<7, align_i>::type) == align_i) );
-
- const std::size_t align_d = alignment_of<double>::value;
- VERIFY( (sizeof(aligned_storage<2, align_d>::type) >= 2) );
- VERIFY( (__alignof__(aligned_storage<2, align_d>::type) == align_d) );
-
- const std::size_t align_ai = alignment_of<int[4]>::value;
- VERIFY( (sizeof(aligned_storage<20, align_ai>::type) >= 20) );
- VERIFY( (__alignof__(aligned_storage<20, align_ai>::type) == align_ai) );
-
- const std::size_t align_ct = alignment_of<ClassType>::value;
- VERIFY( (sizeof(aligned_storage<11, align_ct>::type) >= 11) );
- VERIFY( (__alignof__(aligned_storage<11, align_ct>::type) == align_ct) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::aligned_storage<1, 1> test_type;
- typedef test_type::type type;
-}
+++ /dev/null
-// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.2 Reference modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::add_pointer;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<add_pointer<int>::type, int*>::value) );
- VERIFY( (is_same<add_pointer<int*>::type, int**>::value) );
- VERIFY( (is_same<add_pointer<const int>::type, const int*>::value) );
- VERIFY( (is_same<add_pointer<int&>::type, int*>::value) );
- VERIFY( (is_same<add_pointer<ClassType*>::type, ClassType**>::value) );
- VERIFY( (is_same<add_pointer<ClassType>::type, ClassType*>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.2 Reference modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_pointer;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_pointer<int*>::type, int>::value) );
- VERIFY( (is_same<remove_pointer<int>::type, int>::value) );
- VERIFY( (is_same<remove_pointer<const int*>::type, const int>::value) );
- VERIFY( (is_same<remove_pointer<int**>::type, int*>::value) );
- VERIFY( (is_same<remove_pointer<ClassType*>::type, ClassType>::value) );
- VERIFY( (is_same<remove_pointer<ClassType>::type, ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_array;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_array, int[2]>(true)) );
- VERIFY( (test_category<is_array, int[]>(true)) );
- VERIFY( (test_category<is_array, int[2][3]>(true)) );
- VERIFY( (test_category<is_array, int[][3]>(true)) );
- VERIFY( (test_category<is_array, float*[2]>(true)) );
- VERIFY( (test_category<is_array, float*[]>(true)) );
- VERIFY( (test_category<is_array, float*[2][3]>(true)) );
- VERIFY( (test_category<is_array, float*[][3]>(true)) );
- VERIFY( (test_category<is_array, ClassType[2]>(true)) );
- VERIFY( (test_category<is_array, ClassType[]>(true)) );
- VERIFY( (test_category<is_array, ClassType[2][3]>(true)) );
- VERIFY( (test_category<is_array, ClassType[][3]>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_array, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_array<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_class;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_class, ClassType>(true)) );
- VERIFY( (test_category<is_class, DerivedType>(true)) );
- VERIFY( (test_category<is_class, ConvType>(true)) );
- VERIFY( (test_category<is_class, AbstractClass>(true)) );
- VERIFY( (test_category<is_class, PolymorphicClass>(true)) );
- VERIFY( (test_category<is_class, DerivedPolymorphic>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_class, UnionType>(false)) );
- VERIFY( (test_category<is_class, void>(false)) );
- VERIFY( (test_category<is_class, int>(false)) );
- VERIFY( (test_category<is_class, float>(false)) );
- VERIFY( (test_category<is_class, int[2]>(false)) );
- VERIFY( (test_category<is_class, int*>(false)) );
- VERIFY( (test_category<is_class, int(*)(int)>(false)) );
- VERIFY( (test_category<is_class, float&>(false)) );
- VERIFY( (test_category<is_class, float(&)(float)>(false)) );
- VERIFY( (test_category<is_class, int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_class, int (ClassType::*) (int)>(false)) );
- VERIFY( (test_category<is_class, int (int)>(false)) );
- VERIFY( (test_category<is_class, EnumType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_class<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-11-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-// libstdc++/24808
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_enum;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_enum, IncompleteClass>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_enum;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_enum, EnumType>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_enum, void>(false)) );
- VERIFY( (test_category<is_enum, int>(false)) );
- VERIFY( (test_category<is_enum, float>(false)) );
- VERIFY( (test_category<is_enum, int[2]>(false)) );
- VERIFY( (test_category<is_enum, int*>(false)) );
- VERIFY( (test_category<is_enum, int(*)(int)>(false)) );
- 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)) );
-
- // Sanity check.
- VERIFY( (test_category<is_enum, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-25 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_enum<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_floating_point;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_floating_point, void>(false)) );
- VERIFY( (test_category<is_floating_point, char>(false)) );
- VERIFY( (test_category<is_floating_point, signed char>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned char>(false)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_floating_point, wchar_t>(false)) );
-#endif
- VERIFY( (test_category<is_floating_point, short>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned short>(false)) );
- VERIFY( (test_category<is_floating_point, int>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned int>(false)) );
- VERIFY( (test_category<is_floating_point, long>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned long>(false)) );
- VERIFY( (test_category<is_floating_point, long long>(false)) );
- VERIFY( (test_category<is_floating_point, unsigned long long>(false)) );
-
- VERIFY( (test_category<is_floating_point, float>(true)) );
- VERIFY( (test_category<is_floating_point, double>(true)) );
- VERIFY( (test_category<is_floating_point, long double>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_floating_point, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_floating_point<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-11-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-// libstdc++/24808
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_function;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_function, IncompleteClass>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_function;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_function, int (int)>(true)) );
- VERIFY( (test_category<is_function, ClassType (ClassType)>(true)) );
- VERIFY( (test_category<is_function, float (int, float, int[], int&)>(true)) );
- VERIFY( (test_category<is_function, int (int, ...)>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_function, int&>(false)) );
- VERIFY( (test_category<is_function, void>(false)) );
- VERIFY( (test_category<is_function, const void>(false)) );
-
- VERIFY( (test_category<is_function, AbstractClass>(false)) );
- VERIFY( (test_category<is_function, int(&)(int)>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_function, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-16 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_function<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_integral;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_integral, void>(false)) );
-
- VERIFY( (test_category<is_integral, char>(true)) );
- VERIFY( (test_category<is_integral, signed char>(true)) );
- VERIFY( (test_category<is_integral, unsigned char>(true)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_integral, wchar_t>(true)) );
-#endif
- VERIFY( (test_category<is_integral, short>(true)) );
- VERIFY( (test_category<is_integral, unsigned short>(true)) );
- VERIFY( (test_category<is_integral, int>(true)) );
- VERIFY( (test_category<is_integral, unsigned int>(true)) );
- VERIFY( (test_category<is_integral, long>(true)) );
- VERIFY( (test_category<is_integral, unsigned long>(true)) );
- VERIFY( (test_category<is_integral, long long>(true)) );
- VERIFY( (test_category<is_integral, unsigned long long>(true)) );
-
- VERIFY( (test_category<is_integral, float>(false)) );
- VERIFY( (test_category<is_integral, double>(false)) );
- VERIFY( (test_category<is_integral, long double>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_integral, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_integral<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_member_function_pointer;
- 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,
- int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_member_function_pointer,
- const int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_member_function_pointer,
- ClassType (ClassType::*)>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_member_function_pointer, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_member_function_pointer<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_member_object_pointer;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_member_object_pointer,
- int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_member_object_pointer,
- const int (ClassType::*)>(true)) );
- VERIFY( (test_category<is_member_object_pointer,
- ClassType (ClassType::*)>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_member_object_pointer,
- int (ClassType::*) (int)>(false)) );
- 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)) );
-
- // Sanity check.
- VERIFY( (test_category<is_member_object_pointer, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_member_object_pointer<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_pointer;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_pointer, int*>(true)) );
- VERIFY( (test_category<is_pointer, ClassType*>(true)) );
- VERIFY( (test_category<is_pointer, int(*)(int)>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_pointer, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_pointer<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-06 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_reference;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_reference, int&>(true)) );
- VERIFY( (test_category<is_reference, ClassType&>(true)) );
- VERIFY( (test_category<is_reference, int(&)(int)>(true)) );
-
- // Sanity check.
- VERIFY( (test_category<is_reference, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-06 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_reference<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_union;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_union, UnionType>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_union, ClassType>(false)) );
- VERIFY( (test_category<is_union, DerivedType>(false)) );
- VERIFY( (test_category<is_union, ConvType>(false)) );
- VERIFY( (test_category<is_union, AbstractClass>(false)) );
- VERIFY( (test_category<is_union, PolymorphicClass>(false)) );
- VERIFY( (test_category<is_union, DerivedPolymorphic>(false)) );
- VERIFY( (test_category<is_union, void>(false)) );
- VERIFY( (test_category<is_union, int>(false)) );
- VERIFY( (test_category<is_union, float>(false)) );
- VERIFY( (test_category<is_union, int[2]>(false)) );
- VERIFY( (test_category<is_union, int*>(false)) );
- VERIFY( (test_category<is_union, int(*)(int)>(false)) );
- VERIFY( (test_category<is_union, float&>(false)) );
- VERIFY( (test_category<is_union, float(&)(float)>(false)) );
- VERIFY( (test_category<is_union, int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_union, int (ClassType::*) (int)>(false)) );
- VERIFY( (test_category<is_union, int (int)>(false)) );
- VERIFY( (test_category<is_union, EnumType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_union<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.1 Primary type categories
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_void;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_void, void>(true)) );
-
- VERIFY( (test_category<is_void, char>(false)) );
- VERIFY( (test_category<is_void, signed char>(false)) );
- VERIFY( (test_category<is_void, unsigned char>(false)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_void, wchar_t>(false)) );
-#endif
- VERIFY( (test_category<is_void, short>(false)) );
- VERIFY( (test_category<is_void, unsigned short>(false)) );
- VERIFY( (test_category<is_void, int>(false)) );
- VERIFY( (test_category<is_void, unsigned int>(false)) );
- VERIFY( (test_category<is_void, long>(false)) );
- VERIFY( (test_category<is_void, unsigned long>(false)) );
- VERIFY( (test_category<is_void, long long>(false)) );
- VERIFY( (test_category<is_void, unsigned long long>(false)) );
- VERIFY( (test_category<is_void, float>(false)) );
- VERIFY( (test_category<is_void, double>(false)) );
- VERIFY( (test_category<is_void, long double>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_void, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_void<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct rank<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+// { dg-do compile }
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr1::rank<int> test_type;
+ typedef test_type::value_type value_type;
+ typedef test_type::type type;
+ typedef test_type::type::value_type type_value_type;
+ typedef test_type::type::type type_type;
+}
--- /dev/null
+// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.5.3 Type properties
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::rank;
+ using namespace __gnu_test;
+
+ VERIFY( (test_property<rank, int>(0)) );
+ VERIFY( (test_property<rank, int[2]>(1)) );
+ VERIFY( (test_property<rank, int[][4]>(2)) );
+ VERIFY( (test_property<rank, int[2][2][4][4][6][6]>(6)) );
+ VERIFY( (test_property<rank, ClassType>(0)) );
+ VERIFY( (test_property<rank, ClassType[2]>(1)) );
+ VERIFY( (test_property<rank, ClassType[][4]>(2)) );
+ VERIFY( (test_property<rank, ClassType[2][2][4][4][6][6]>(6)) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+++ /dev/null
-// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.2 Reference modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::add_reference;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<add_reference<int>::type, int&>::value) );
- VERIFY( (is_same<add_reference<int&>::type, int&>::value) );
- VERIFY( (is_same<add_reference<const int>::type, const int&>::value) );
- VERIFY( (is_same<add_reference<int*>::type, int*&>::value) );
- VERIFY( (is_same<add_reference<ClassType&>::type, ClassType&>::value) );
- VERIFY( (is_same<add_reference<ClassType>::type, ClassType&>::value) );
-
- VERIFY( (is_same<add_reference<void>::type, void>::value) );
- VERIFY( (is_same<add_reference<const void>::type, const void>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.7.2 Reference modifications
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::remove_reference;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- VERIFY( (is_same<remove_reference<int&>::type, int>::value) );
- VERIFY( (is_same<remove_reference<int>::type, int>::value) );
- VERIFY( (is_same<remove_reference<const int&>::type, const int>::value) );
- VERIFY( (is_same<remove_reference<int*&>::type, int*>::value) );
- VERIFY( (is_same<remove_reference<ClassType&>::type, ClassType>::value) );
- VERIFY( (is_same<remove_reference<ClassType>::type, ClassType>::value) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-03-04 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.6 Relationships between types
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-class HiddenCons
-{
- HiddenCons();
- HiddenCons(const HiddenCons&);
-};
-
-class DerivedHiddenCons
-: private HiddenCons
-{
- DerivedHiddenCons();
- DerivedHiddenCons(const DerivedHiddenCons&);
-};
-
-class MultiDerivedHiddenCons
-: private HiddenCons, private __gnu_test::ClassType
-{
- MultiDerivedHiddenCons();
- MultiDerivedHiddenCons(const MultiDerivedHiddenCons&);
-};
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_base_of;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_relationship<is_base_of, int, int>(true)) );
- VERIFY( (test_relationship<is_base_of, EnumType, EnumType>(true)) );
- VERIFY( (test_relationship<is_base_of, UnionType, UnionType>(true)) );
- VERIFY( (test_relationship<is_base_of, AbstractClass,
- AbstractClass>(true)) );
- VERIFY( (test_relationship<is_base_of, ClassType, DerivedType>(true)) );
- VERIFY( (test_relationship<is_base_of, ClassType, const DerivedType>(true)) );
- VERIFY( (test_relationship<is_base_of, volatile ClassType,
- volatile DerivedType>(true)) );
- VERIFY( (test_relationship<is_base_of, PolymorphicClass,
- DerivedPolymorphic>(true)) );
- VERIFY( (test_relationship<is_base_of, HiddenCons,
- DerivedHiddenCons>(true)) );
- VERIFY( (test_relationship<is_base_of, HiddenCons,
- MultiDerivedHiddenCons>(true)) );
- VERIFY( (test_relationship<is_base_of, ClassType,
- MultiDerivedHiddenCons>(true)) );
-
- // Negative tests.
- VERIFY( (test_relationship<is_base_of, int, const int>(false)) );
- VERIFY( (test_relationship<is_base_of, volatile UnionType,
- UnionType>(false)) );
- VERIFY( (test_relationship<is_base_of, int&, ClassType>(false)) );
- VERIFY( (test_relationship<is_base_of, AbstractClass, ClassType>(false)) );
- VERIFY( (test_relationship<is_base_of, ClassType, AbstractClass>(false)) );
- VERIFY( (test_relationship<is_base_of, DerivedType, ClassType>(false)) );
- VERIFY( (test_relationship<is_base_of, DerivedPolymorphic,
- PolymorphicClass>(false)) );
- VERIFY( (test_relationship<is_base_of, DerivedHiddenCons,
- HiddenCons>(false)) );
- VERIFY( (test_relationship<is_base_of, MultiDerivedHiddenCons,
- HiddenCons>(false)) );
- VERIFY( (test_relationship<is_base_of, MultiDerivedHiddenCons,
- ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-03-04 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_base_of<int, int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-02-23 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.6 Relationships between types
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_convertible;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_relationship<is_convertible, int, int>(true)) );
- VERIFY( (test_relationship<is_convertible, int, const int>(true)) );
- VERIFY( (test_relationship<is_convertible, volatile int, const int>(true)) );
- VERIFY( (test_relationship<is_convertible, int, float>(true)) );
- VERIFY( (test_relationship<is_convertible, double, float>(true)) );
- VERIFY( (test_relationship<is_convertible, float, int>(true)) );
- VERIFY( (test_relationship<is_convertible, int*, const int*>(true)) );
- VERIFY( (test_relationship<is_convertible, int*, void*>(true)) );
- VERIFY( (test_relationship<is_convertible, int[4], int*>(true)) );
- VERIFY( (test_relationship<is_convertible, float&, int>(true)) );
- VERIFY( (test_relationship<is_convertible, int, const int&>(true)) );
- VERIFY( (test_relationship<is_convertible, const int&, int>(true)) );
- VERIFY( (test_relationship<is_convertible, float, const int&>(true)) );
- VERIFY( (test_relationship<is_convertible, float, volatile float&>(true)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(*)(int)>(true)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(&)(int)>(true)) );
- VERIFY( (test_relationship<is_convertible, int(&)(int), int(*)(int)>(true)) );
- VERIFY( (test_relationship<is_convertible, EnumType, int>(true)) );
- VERIFY( (test_relationship<is_convertible, ClassType, ClassType>(true)) );
- VERIFY( (test_relationship<is_convertible, DerivedType, ClassType>(true)) );
- VERIFY( (test_relationship<is_convertible, DerivedType*, ClassType*>(true)) );
- VERIFY( (test_relationship<is_convertible, DerivedType&, ClassType&>(true)) );
-
- VERIFY( (test_relationship<is_convertible, void, void>(true)) );
- VERIFY( (test_relationship<is_convertible, int, void>(true)) );
- VERIFY( (test_relationship<is_convertible, int[4], void>(true)) );
-
- // Negative tests.
- VERIFY( (test_relationship<is_convertible, const int*, int*>(false)) );
- VERIFY( (test_relationship<is_convertible, int*, float*>(false)) );
- VERIFY( (test_relationship<is_convertible, const int[4], int*>(false)) );
- VERIFY( (test_relationship<is_convertible, int[4], int[4]>(false)) );
- VERIFY( (test_relationship<is_convertible, const int&, int&>(false)) );
- VERIFY( (test_relationship<is_convertible, float&, int&>(false)) );
- VERIFY( (test_relationship<is_convertible, float, volatile int&>(false)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(int)>(false)) );
- VERIFY( (test_relationship<is_convertible, int(int), int(*)(void)>(false)) );
- VERIFY( (test_relationship<is_convertible, int(*)(int), int(&)(int)>(false)) );
- VERIFY( (test_relationship<is_convertible, int, EnumType>(false)) );
- VERIFY( (test_relationship<is_convertible, int, ClassType>(false)) );
- VERIFY( (test_relationship<is_convertible, ClassType, DerivedType>(false)) );
- VERIFY( (test_relationship<is_convertible, ClassType*, DerivedType*>(false)) );
- VERIFY( (test_relationship<is_convertible, ClassType&, DerivedType&>(false)) );
-
- VERIFY( (test_relationship<is_convertible, void, int>(false)) );
- VERIFY( (test_relationship<is_convertible, void, float>(false)) );
- VERIFY( (test_relationship<is_convertible, void, int(*)(int)>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-02-23 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_convertible<int, int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.6 Relationships between types
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_same;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_relationship<is_same, int, int>(true)) );
- VERIFY( (test_relationship<is_same, const int, const int>(true)) );
- VERIFY( (test_relationship<is_same, int&, int&>(true)) );
- VERIFY( (test_relationship<is_same, ClassType, ClassType>(true)) );
-
- // Negative tests.
- VERIFY( (test_relationship<is_same, void, int>(false)) );
- VERIFY( (test_relationship<is_same, int, const int>(false)) );
- VERIFY( (test_relationship<is_same, int, int&>(false)) );
- VERIFY( (test_relationship<is_same, int, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_same<int, int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_all_extents<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-09 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.3 Array modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_all_extents;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_all_extents<int>::type, int>::value) );
+ VERIFY( (is_same<remove_all_extents<int[2]>::type, int>::value) );
+ VERIFY( (is_same<remove_all_extents<int[2][3]>::type, int>::value) );
+ VERIFY( (is_same<remove_all_extents<int[][3]>::type, int>::value) );
+ VERIFY( (is_same<remove_all_extents<const int[2][3]>::type,
+ const int>::value) );
+ VERIFY( (is_same<remove_all_extents<ClassType>::type, ClassType>::value) );
+ VERIFY( (is_same<remove_all_extents<ClassType[2]>::type, ClassType>::value) );
+ VERIFY( (is_same<remove_all_extents<ClassType[2][3]>::type,
+ ClassType>::value) );
+ VERIFY( (is_same<remove_all_extents<ClassType[][3]>::type,
+ ClassType>::value) );
+ VERIFY( (is_same<remove_all_extents<const ClassType[2][3]>::type,
+ const ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_const<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-10 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.1 Const-volatile modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_const;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_const<const volatile int>::type,
+ volatile int>::value) );
+ VERIFY( (is_same<remove_const<const int*>::type, const int*>::value) );
+ VERIFY( (is_same<remove_const<const volatile ClassType>::type,
+ volatile ClassType>::value) );
+ VERIFY( (is_same<remove_const<const ClassType*>::type,
+ const ClassType*>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_cv<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-10 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.1 Const-volatile modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_cv;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_cv<const volatile int>::type, int>::value) );
+ VERIFY( (is_same<remove_cv<const volatile int*>::type,
+ const volatile int*>::value) );
+ VERIFY( (is_same<remove_cv<const volatile ClassType>::type,
+ ClassType>::value) );
+ VERIFY( (is_same<remove_cv<const volatile ClassType*>::type,
+ const volatile ClassType*>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_extent<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-09 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.3 Array modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_extent;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_extent<int>::type, int>::value) );
+ VERIFY( (is_same<remove_extent<int[2]>::type, int>::value) );
+ VERIFY( (is_same<remove_extent<int[2][3]>::type, int[3]>::value) );
+ VERIFY( (is_same<remove_extent<int[][3]>::type, int[3]>::value) );
+ VERIFY( (is_same<remove_extent<const int[2]>::type, const int>::value) );
+ VERIFY( (is_same<remove_extent<ClassType>::type, ClassType>::value) );
+ VERIFY( (is_same<remove_extent<ClassType[2]>::type, ClassType>::value) );
+ VERIFY( (is_same<remove_extent<ClassType[2][3]>::type,
+ ClassType[3]>::value) );
+ VERIFY( (is_same<remove_extent<ClassType[][3]>::type,
+ ClassType[3]>::value) );
+ VERIFY( (is_same<remove_extent<const ClassType[2]>::type,
+ const ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_pointer<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.2 Reference modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_pointer;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_pointer<int*>::type, int>::value) );
+ VERIFY( (is_same<remove_pointer<int>::type, int>::value) );
+ VERIFY( (is_same<remove_pointer<const int*>::type, const int>::value) );
+ VERIFY( (is_same<remove_pointer<int**>::type, int*>::value) );
+ VERIFY( (is_same<remove_pointer<ClassType*>::type, ClassType>::value) );
+ VERIFY( (is_same<remove_pointer<ClassType>::type, ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_reference<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-08 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.2 Reference modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_reference;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_reference<int&>::type, int>::value) );
+ VERIFY( (is_same<remove_reference<int>::type, int>::value) );
+ VERIFY( (is_same<remove_reference<const int&>::type, const int>::value) );
+ VERIFY( (is_same<remove_reference<int*&>::type, int*>::value) );
+ VERIFY( (is_same<remove_reference<ClassType&>::type, ClassType>::value) );
+ VERIFY( (is_same<remove_reference<ClassType>::type, ClassType>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
--- /dev/null
+// { dg-do compile }
+// 2007-04-30 Benjamin Kosnik <bkoz@redhat.com>
+
+// Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// NB: This file is for testing basic_ofstream with NO OTHER INCLUDES.
+
+#include <tr1/type_traits>
+
+namespace std
+{
+ namespace tr1
+ {
+ typedef short test_type;
+ template struct remove_volatile<test_type>;
+ }
+}
--- /dev/null
+// 2004-12-10 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 4.7.1 Const-volatile modifications
+
+#include <tr1/type_traits>
+#include <testsuite_hooks.h>
+#include <testsuite_tr1.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::tr1::remove_volatile;
+ using std::tr1::is_same;
+ using namespace __gnu_test;
+
+ VERIFY( (is_same<remove_volatile<const volatile int>::type,
+ const int>::value) );
+ VERIFY( (is_same<remove_volatile<volatile int*>::type,
+ volatile int*>::value) );
+ VERIFY( (is_same<remove_volatile<const volatile ClassType>::type,
+ const ClassType>::value) );
+ VERIFY( (is_same<remove_volatile<volatile ClassType*>::type,
+ volatile ClassType*>::value) );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
+++ /dev/null
-// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::alignment_of;
- using namespace __gnu_test;
-
- VERIFY( (test_property<alignment_of, char>(__alignof__(char))) );
- VERIFY( (test_property<alignment_of, short>(__alignof__(short))) );
- VERIFY( (test_property<alignment_of, int>(__alignof__(int))) );
- VERIFY( (test_property<alignment_of, double>(__alignof__(double))) );
- VERIFY( (test_property<alignment_of, int[4]>(__alignof__(int[4]))) );
- VERIFY( (test_property<alignment_of, ClassType>(__alignof__(ClassType))) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-01-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::alignment_of<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::extent;
- using namespace __gnu_test;
-
- VERIFY( (test_property<extent, int, 0>(0)) );
- VERIFY( (test_property<extent, int[2], 0>(2)) );
- VERIFY( (test_property<extent, int[2][4], 0>(2)) );
- VERIFY( (test_property<extent, int[][4], 0>(0)) );
- VERIFY( (extent<int, 1>::value == 0) );
- VERIFY( (extent<int[2], 1>::value == 0) );
- VERIFY( (extent<int[2][4], 1>::value == 4) );
- VERIFY( (extent<int[][4], 1>::value == 4) );
- VERIFY( (extent<int[10][4][6][8][12][2], 4>::value == 12) );
- VERIFY( (test_property<extent, ClassType, 0>(0)) );
- VERIFY( (test_property<extent, ClassType[2], 0>(2)) );
- VERIFY( (test_property<extent, ClassType[2][4], 0>(2)) );
- VERIFY( (test_property<extent, ClassType[][4], 0>(0)) );
- VERIFY( (extent<ClassType, 1>::value == 0) );
- VERIFY( (extent<ClassType[2], 1>::value == 0) );
- VERIFY( (extent<ClassType[2][4], 1>::value == 4) );
- VERIFY( (extent<ClassType[][4], 1>::value == 4) );
- VERIFY( (extent<ClassType[10][4][6][8][12][2], 4>::value == 12) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-12 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::extent<int, 1> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_nothrow_assign;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_nothrow_assign, void>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int>(true)) );
- VERIFY( (test_category<has_nothrow_assign, float>(true)) );
- VERIFY( (test_category<has_nothrow_assign, EnumType>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int*>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int(*)(int)>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int (ClassType::*)>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int[2]>(true)) );
- VERIFY( (test_category<has_nothrow_assign, float[][3]>(true)) );
- VERIFY( (test_category<has_nothrow_assign, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int*[3]>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<has_nothrow_assign, int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<has_nothrow_assign,
- int (ClassType::*[][2][3]) (int)>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_nothrow_assign<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-29 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_nothrow_constructor;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_nothrow_constructor, void>(true)) );
- VERIFY( (test_category<has_nothrow_constructor, int>(true)) );
- VERIFY( (test_category<has_nothrow_constructor, float>(true)) );
- VERIFY( (test_category<has_nothrow_constructor, EnumType>(true)) );
- 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)) );
- VERIFY( (test_category<has_nothrow_constructor, int*[3]>(true)) );
- 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)) );
- VERIFY( (test_category<has_nothrow_constructor, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-29 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_nothrow_constructor<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_nothrow_copy;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_nothrow_copy, void>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int>(true)) );
- VERIFY( (test_category<has_nothrow_copy, float>(true)) );
- VERIFY( (test_category<has_nothrow_copy, EnumType>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int*>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int(*)(int)>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int (ClassType::*)>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int[2]>(true)) );
- VERIFY( (test_category<has_nothrow_copy, float[][3]>(true)) );
- VERIFY( (test_category<has_nothrow_copy, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int*[3]>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<has_nothrow_copy, int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<has_nothrow_copy,
- int (ClassType::*[][2][3]) (int)>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_nothrow_copy<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_trivial_assign;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_trivial_assign, void>(true)) );
- VERIFY( (test_category<has_trivial_assign, int>(true)) );
- VERIFY( (test_category<has_trivial_assign, float>(true)) );
- VERIFY( (test_category<has_trivial_assign, EnumType>(true)) );
- VERIFY( (test_category<has_trivial_assign, int*>(true)) );
- VERIFY( (test_category<has_trivial_assign, int(*)(int)>(true)) );
- VERIFY( (test_category<has_trivial_assign, int (ClassType::*)>(true)) );
- VERIFY( (test_category<has_trivial_assign, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<has_trivial_assign, int[2]>(true)) );
- VERIFY( (test_category<has_trivial_assign, float[][3]>(true)) );
- VERIFY( (test_category<has_trivial_assign, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<has_trivial_assign, int*[3]>(true)) );
- VERIFY( (test_category<has_trivial_assign, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<has_trivial_assign, int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<has_trivial_assign,
- int (ClassType::*[][2][3]) (int)>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_trivial_assign<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_trivial_constructor;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_trivial_constructor, void>(true)) );
- VERIFY( (test_category<has_trivial_constructor, int>(true)) );
- VERIFY( (test_category<has_trivial_constructor, float>(true)) );
- VERIFY( (test_category<has_trivial_constructor, EnumType>(true)) );
- 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)) );
- VERIFY( (test_category<has_trivial_constructor, int*[3]>(true)) );
- 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)) );
- VERIFY( (test_category<has_trivial_constructor, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_trivial_constructor<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_trivial_copy;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_trivial_copy, void>(true)) );
- VERIFY( (test_category<has_trivial_copy, int>(true)) );
- VERIFY( (test_category<has_trivial_copy, float>(true)) );
- VERIFY( (test_category<has_trivial_copy, EnumType>(true)) );
- VERIFY( (test_category<has_trivial_copy, int*>(true)) );
- VERIFY( (test_category<has_trivial_copy, int(*)(int)>(true)) );
- VERIFY( (test_category<has_trivial_copy, int (ClassType::*)>(true)) );
- VERIFY( (test_category<has_trivial_copy, int (ClassType::*) (int)>(true)) );
- VERIFY( (test_category<has_trivial_copy, int[2]>(true)) );
- VERIFY( (test_category<has_trivial_copy, float[][3]>(true)) );
- VERIFY( (test_category<has_trivial_copy, EnumType[2][3][4]>(true)) );
- VERIFY( (test_category<has_trivial_copy, int*[3]>(true)) );
- VERIFY( (test_category<has_trivial_copy, int(*[][2])(int)>(true)) );
- VERIFY( (test_category<has_trivial_copy, int (ClassType::*[2][3])>(true)) );
- VERIFY( (test_category<has_trivial_copy,
- int (ClassType::*[][2][3]) (int)>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-30 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_trivial_copy<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_trivial_destructor;
- using namespace __gnu_test;
-
- VERIFY( (test_category<has_trivial_destructor, void>(true)) );
- VERIFY( (test_category<has_trivial_destructor, int>(true)) );
- VERIFY( (test_category<has_trivial_destructor, float>(true)) );
- VERIFY( (test_category<has_trivial_destructor, EnumType>(true)) );
- 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)) );
- VERIFY( (test_category<has_trivial_destructor, int*[3]>(true)) );
- 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)) );
- VERIFY( (test_category<has_trivial_destructor, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_trivial_destructor<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <iostream>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::has_virtual_destructor;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<has_virtual_destructor,
- VirtualDestructorClass>(true)) );
- VERIFY( (test_category<has_virtual_destructor, std::iostream>(true)) );
- VERIFY( (test_category<has_virtual_destructor, std::streambuf>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<has_virtual_destructor, PolymorphicClass>(false)) );
- VERIFY( (test_category<has_virtual_destructor, DerivedPolymorphic>(false)) );
- VERIFY( (test_category<has_virtual_destructor, AbstractClass>(false)) );
- VERIFY( (test_category<has_virtual_destructor, void>(false)) );
- VERIFY( (test_category<has_virtual_destructor, int (int)>(false)) );
- VERIFY( (test_category<has_virtual_destructor, int&>(false)) );
- VERIFY( (test_category<has_virtual_destructor, EnumType>(false)) );
- VERIFY( (test_category<has_virtual_destructor, ClassType>(false)) );
- VERIFY( (test_category<has_virtual_destructor, DerivedType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2007-04-08 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::has_virtual_destructor<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_abstract;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_abstract, AbstractClass>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_abstract, void>(false)) );
- VERIFY( (test_category<is_abstract, int (int)>(false)) );
- VERIFY( (test_category<is_abstract, int&>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_abstract, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_abstract<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_const;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_property<is_const, const int>(true)) );
- VERIFY( (test_property<is_const, const volatile int>(true)) );
- VERIFY( (test_property<is_const, cClassType>(true)) );
- VERIFY( (test_property<is_const, cvClassType>(true)) );
-
- // Negative tests.
- VERIFY( (test_property<is_const, int>(false)) );
- VERIFY( (test_property<is_const, volatile int>(false)) );
- VERIFY( (test_property<is_const, ClassType>(false)) );
- VERIFY( (test_property<is_const, vClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_const<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-class EmptyClassOne
-{ typedef int type; };
-
-class EmptyClassTwo
-{ static int data; };
-
-class EmptyClassThree
-{ int f(); };
-
-class NonEmptyClassOne
-{ int data; };
-
-class NonEmptyClassTwo
-{
- virtual int f();
- virtual ~NonEmptyClassTwo();
-};
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_empty;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_empty, ClassType>(true)) );
- VERIFY( (test_category<is_empty, EmptyClassOne>(true)) );
- VERIFY( (test_category<is_empty, EmptyClassTwo>(true)) );
- VERIFY( (test_category<is_empty, EmptyClassThree>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_empty, void>(false)) );
- VERIFY( (test_category<is_empty, float>(false)) );
- VERIFY( (test_category<is_empty, int[4]>(false)) );
- VERIFY( (test_category<is_empty, int*>(false)) );
- VERIFY( (test_category<is_empty, int&>(false)) );
- VERIFY( (test_category<is_empty, int (ClassType::*)>(false)) );
- VERIFY( (test_category<is_empty, EnumType>(false)) );
- VERIFY( (test_category<is_empty, int (int)>(false)) );
-
- VERIFY( (test_category<is_empty, AbstractClass>(false)) );
- VERIFY( (test_category<is_empty, NonEmptyClassOne>(false)) );
- VERIFY( (test_category<is_empty, NonEmptyClassTwo>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-01-28 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_empty<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_pod;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_pod, void>(true)) );
- VERIFY( (test_category<is_pod, int>(true)) );
- VERIFY( (test_category<is_pod, float>(true)) );
- VERIFY( (test_category<is_pod, EnumType>(true)) );
- 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)) );
- VERIFY( (test_category<is_pod, ClassType>(true)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-26 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_pod<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// { dg-do compile }
-
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <exception>
-
-// libstdc++/24809
-static const bool b = std::tr1::is_polymorphic<std::exception>::value;
+++ /dev/null
-// 2005-03-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <iostream>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_polymorphic;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_category<is_polymorphic, PolymorphicClass>(true)) );
- VERIFY( (test_category<is_polymorphic, DerivedPolymorphic>(true)) );
- VERIFY( (test_category<is_polymorphic, AbstractClass>(true)) );
- VERIFY( (test_category<is_polymorphic, VirtualDestructorClass>(true)) );
- VERIFY( (test_category<is_polymorphic, std::iostream>(true)) );
- VERIFY( (test_category<is_polymorphic, std::streambuf>(true)) );
-
- // Negative tests.
- VERIFY( (test_category<is_polymorphic, void>(false)) );
- VERIFY( (test_category<is_polymorphic, int (int)>(false)) );
- VERIFY( (test_category<is_polymorphic, int&>(false)) );
- VERIFY( (test_category<is_polymorphic, EnumType>(false)) );
- VERIFY( (test_category<is_polymorphic, ClassType>(false)) );
- VERIFY( (test_category<is_polymorphic, DerivedType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-03-03 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_polymorphic<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_signed;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_signed, void>(false)) );
-
- VERIFY( (test_category<is_signed, char>(false)) );
- VERIFY( (test_category<is_signed, signed char>(true)) );
- VERIFY( (test_category<is_signed, unsigned char>(false)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_signed, wchar_t>(false)) );
-#endif
- VERIFY( (test_category<is_signed, short>(true)) );
- VERIFY( (test_category<is_signed, unsigned short>(false)) );
- VERIFY( (test_category<is_signed, int>(true)) );
- VERIFY( (test_category<is_signed, unsigned int>(false)) );
- VERIFY( (test_category<is_signed, long>(true)) );
- VERIFY( (test_category<is_signed, unsigned long>(false)) );
- VERIFY( (test_category<is_signed, long long>(true)) );
- VERIFY( (test_category<is_signed, unsigned long long>(false)) );
-
- VERIFY( (test_category<is_signed, float>(false)) );
- VERIFY( (test_category<is_signed, double>(false)) );
- VERIFY( (test_category<is_signed, long double>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_signed, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_signed<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_unsigned;
- using namespace __gnu_test;
-
- VERIFY( (test_category<is_unsigned, void>(false)) );
-
- VERIFY( (test_category<is_unsigned, char>(false)) );
- VERIFY( (test_category<is_unsigned, signed char>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned char>(true)) );
-#ifdef _GLIBCXX_USE_WCHAR_T
- VERIFY( (test_category<is_unsigned, wchar_t>(false)) );
-#endif
- VERIFY( (test_category<is_unsigned, short>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned short>(true)) );
- VERIFY( (test_category<is_unsigned, int>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned int>(true)) );
- VERIFY( (test_category<is_unsigned, long>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned long>(true)) );
- VERIFY( (test_category<is_unsigned, long long>(false)) );
- VERIFY( (test_category<is_unsigned, unsigned long long>(true)) );
-
- VERIFY( (test_category<is_unsigned, float>(false)) );
- VERIFY( (test_category<is_unsigned, double>(false)) );
- VERIFY( (test_category<is_unsigned, long double>(false)) );
-
- // Sanity check.
- VERIFY( (test_category<is_unsigned, ClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2005-01-24 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2005 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_unsigned<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::is_volatile;
- using namespace __gnu_test;
-
- // Positive tests.
- VERIFY( (test_property<is_volatile, volatile int>(true)) );
- VERIFY( (test_property<is_volatile, const volatile int>(true)) );
- VERIFY( (test_property<is_volatile, vClassType>(true)) );
- VERIFY( (test_property<is_volatile, cvClassType>(true)) );
-
- // Negative tests.
- VERIFY( (test_property<is_volatile, int>(false)) );
- VERIFY( (test_property<is_volatile, const int>(false)) );
- VERIFY( (test_property<is_volatile, ClassType>(false)) );
- VERIFY( (test_property<is_volatile, cClassType>(false)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-07 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::is_volatile<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}
+++ /dev/null
-// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// 4.5.3 Type properties
-
-#include <tr1/type_traits>
-#include <testsuite_hooks.h>
-#include <testsuite_tr1.h>
-
-void test01()
-{
- bool test __attribute__((unused)) = true;
- using std::tr1::rank;
- using namespace __gnu_test;
-
- VERIFY( (test_property<rank, int>(0)) );
- VERIFY( (test_property<rank, int[2]>(1)) );
- VERIFY( (test_property<rank, int[][4]>(2)) );
- VERIFY( (test_property<rank, int[2][2][4][4][6][6]>(6)) );
- VERIFY( (test_property<rank, ClassType>(0)) );
- VERIFY( (test_property<rank, ClassType[2]>(1)) );
- VERIFY( (test_property<rank, ClassType[][4]>(2)) );
- VERIFY( (test_property<rank, ClassType[2][2][4][4][6][6]>(6)) );
-}
-
-int main()
-{
- test01();
- return 0;
-}
+++ /dev/null
-// 2004-12-11 Paolo Carlini <pcarlini@suse.de>
-//
-// Copyright (C) 2004 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library. This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-//
-// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
-
-#include <tr1/type_traits>
-
-// { dg-do compile }
-
-void test01()
-{
- // Check for required typedefs
- typedef std::tr1::rank<int> test_type;
- typedef test_type::value_type value_type;
- typedef test_type::type type;
- typedef test_type::type::value_type type_value_type;
- typedef test_type::type::type type_type;
-}