diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8aa4ecc7a8d..ccb473e462c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,19 @@ +2005-04-27 Paolo Carlini + + * include/tr1/type_traits (has_trivial_copy, has_trivial_assign, + has_nothrow_copy, has_nothrow_assign): Adjust according to the + resolution of TR1 issue 3.21. + * testsuite/testsuite_tr1.h (test_copy_property, + test_assign_property): Remove. + * testsuite/tr1/4_metaprogramming/type_properties/ + has_nothrow_assign/has_nothrow_assign.cc: Adjust. + * testsuite/tr1/4_metaprogramming/type_properties/ + has_nothrow_copy/has_nothrow_copy.cc: Likewise. + * testsuite/tr1/4_metaprogramming/type_properties/ + has_trivial_assign/has_trivial_assign.cc: Likewise. + * testsuite/tr1/4_metaprogramming/type_properties/ + has_trivial_copy/has_trivial_copy.cc: Likewise. + 2005-04-26 Jones Desougi PR libstdc++/21131 diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits index 55f585f9f4b..0bd05bb1198 100644 --- a/libstdc++-v3/include/tr1/type_traits +++ b/libstdc++-v3/include/tr1/type_traits @@ -366,14 +366,11 @@ namespace tr1 template struct has_trivial_copy - : public integral_constant::value - && !is_volatile<_Tp>::value)> { }; + : public integral_constant::value> { }; template struct has_trivial_assign - : public integral_constant::value - && !is_const<_Tp>::value - && !is_volatile<_Tp>::value)> { }; + : public integral_constant::value> { }; template struct has_trivial_destructor @@ -385,14 +382,11 @@ namespace tr1 template struct has_nothrow_copy - : public integral_constant::value - && !is_volatile<_Tp>::value)> { }; + : public integral_constant::value> { }; template struct has_nothrow_assign - : public integral_constant::value - && !is_const<_Tp>::value - && !is_volatile<_Tp>::value)> { }; + : public integral_constant::value> { }; template struct has_virtual_destructor diff --git a/libstdc++-v3/testsuite/testsuite_tr1.h b/libstdc++-v3/testsuite/testsuite_tr1.h index ea6affb37c1..ff0a3cefce3 100644 --- a/libstdc++-v3/testsuite/testsuite_tr1.h +++ b/libstdc++-v3/testsuite/testsuite_tr1.h @@ -62,40 +62,6 @@ namespace __gnu_test return ret; } - template class Property, - typename Type> - bool - test_copy_property(bool value) - { - bool ret = true; - ret &= Property::value == value; - ret &= Property::value == value; - ret &= Property::value == !value; - ret &= Property::value == !value; - ret &= Property::type::value == value; - ret &= Property::type::value == value; - ret &= Property::type::value == !value; - ret &= Property::type::value == !value; - return ret; - } - - template class Property, - typename Type> - bool - test_assign_property(bool value) - { - bool ret = true; - ret &= Property::value == value; - ret &= Property::value == !value; - ret &= Property::value == !value; - ret &= Property::value == !value; - ret &= Property::type::value == value; - ret &= Property::type::value == !value; - ret &= Property::type::value == !value; - ret &= Property::type::value == !value; - return ret; - } - template class Relationship, typename Type1, typename Type2> bool diff --git a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc index e07fa4f589f..f8f25e8c84e 100644 --- a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc +++ b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_assign/has_nothrow_assign.cc @@ -1,6 +1,6 @@ // 2004-12-30 Paolo Carlini // -// Copyright (C) 2004 Free Software Foundation, Inc. +// 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 @@ -30,23 +30,21 @@ void test01() using std::tr1::has_nothrow_assign; using namespace __gnu_test; - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); } diff --git a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc index 7ba63bfa954..7d59d5aafff 100644 --- a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc +++ b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_nothrow_copy/has_nothrow_copy.cc @@ -1,6 +1,6 @@ // 2004-12-30 Paolo Carlini // -// Copyright (C) 2004 Free Software Foundation, Inc. +// 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 @@ -30,23 +30,21 @@ void test01() using std::tr1::has_nothrow_copy; using namespace __gnu_test; - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); } diff --git a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc index 66b2bc18c38..466697429a7 100644 --- a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc +++ b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_assign/has_trivial_assign.cc @@ -1,6 +1,6 @@ // 2004-12-30 Paolo Carlini // -// Copyright (C) 2004 Free Software Foundation, Inc. +// 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 @@ -30,23 +30,21 @@ void test01() using std::tr1::has_trivial_assign; using namespace __gnu_test; - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); - VERIFY( (test_assign_property(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); } diff --git a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc index 64eed997d60..fabe255bbf8 100644 --- a/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc +++ b/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/has_trivial_copy/has_trivial_copy.cc @@ -1,6 +1,6 @@ // 2004-12-30 Paolo Carlini // -// Copyright (C) 2004 Free Software Foundation, Inc. +// 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 @@ -30,23 +30,21 @@ void test01() using std::tr1::has_trivial_copy; using namespace __gnu_test; - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); - VERIFY( (test_copy_property(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); + VERIFY( (test_category(true)) ); }