From 0462fd5e01941647bfb8b3706443fd9de8b585c2 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 9 Jan 2010 11:16:42 +0000 Subject: [PATCH] set.h: Revert last change, per DR 1204 [Ready]; mention the latter in comment. 2010-01-09 Paolo Carlini * include/debug/set.h: Revert last change, per DR 1204 [Ready]; mention the latter in comment. * include/debug/unordered_map: Likewise. * include/debug/multiset.h: Likewise. * include/debug/vector: Likewise. * include/debug/unordered_set: Likewise. * include/debug/deque: Likewise. * include/debug/map.h: Likewise. * include/debug/list: Likewise. * include/debug/multimap.h: Likewise. * include/tr1_impl/unordered_map: Likewise. * include/tr1_impl/unordered_set: Likewise. * include/profile/set.h: Likewise. * include/profile/unordered_map: Likewise. * include/profile/multiset.h: Likewise. * include/profile/unordered_set: Likewise. * include/profile/vector: Likewise. * include/profile/deque: Likewise. * include/profile/map.h: Likewise. * include/profile/list: Likewise. * include/profile/multimap.h: Likewise. * include/ext/vstring.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/forward_list.h: Remove pre-existing check. * include/ext/vstring.h: Likewise. * testsuite/ext/vstring/cons/self_move_assign.cc: Remove. * testsuite/23_containers/unordered_map/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/multimap/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/set/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/unordered_multimap/cons/ self_move_assign.cc: Likewise. * testsuite/23_containers/forward_list/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/unordered_set/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/vector/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/deque/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/multiset/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/list/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/unordered_multiset/cons/ self_move_assign.cc: Likewise. * testsuite/23_containers/map/cons/self_move_assign.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Adjust dg-error line numbers. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Likewise. From-SVN: r155756 --- libstdc++-v3/ChangeLog | 87 +++++++++++++++++++ libstdc++-v3/include/bits/forward_list.h | 11 ++- libstdc++-v3/include/bits/stl_bvector.h | 1 + libstdc++-v3/include/bits/stl_deque.h | 10 +-- libstdc++-v3/include/bits/stl_list.h | 10 +-- libstdc++-v3/include/bits/stl_map.h | 10 +-- libstdc++-v3/include/bits/stl_multimap.h | 10 +-- libstdc++-v3/include/bits/stl_multiset.h | 10 +-- libstdc++-v3/include/bits/stl_set.h | 12 ++- libstdc++-v3/include/bits/stl_vector.h | 10 +-- libstdc++-v3/include/debug/deque | 10 +-- libstdc++-v3/include/debug/list | 12 ++- libstdc++-v3/include/debug/map.h | 10 +-- libstdc++-v3/include/debug/multimap.h | 10 +-- libstdc++-v3/include/debug/multiset.h | 10 +-- libstdc++-v3/include/debug/set.h | 10 +-- libstdc++-v3/include/debug/unordered_map | 20 ++--- libstdc++-v3/include/debug/unordered_set | 11 ++- libstdc++-v3/include/debug/vector | 10 +-- libstdc++-v3/include/ext/vstring.h | 9 +- libstdc++-v3/include/profile/deque | 10 +-- libstdc++-v3/include/profile/list | 10 +-- libstdc++-v3/include/profile/map.h | 10 +-- libstdc++-v3/include/profile/multimap.h | 10 +-- libstdc++-v3/include/profile/multiset.h | 10 +-- libstdc++-v3/include/profile/set.h | 10 +-- libstdc++-v3/include/profile/unordered_map | 20 ++--- libstdc++-v3/include/profile/unordered_set | 20 ++--- libstdc++-v3/include/profile/vector | 12 ++- libstdc++-v3/include/tr1_impl/unordered_map | 20 ++--- libstdc++-v3/include/tr1_impl/unordered_set | 20 ++--- .../deque/cons/self_move_assign.cc | 40 --------- .../deque/requirements/dr438/assign_neg.cc | 2 +- .../requirements/dr438/constructor_1_neg.cc | 2 +- .../requirements/dr438/constructor_2_neg.cc | 2 +- .../deque/requirements/dr438/insert_neg.cc | 2 +- .../forward_list/cons/self_move_assign.cc | 40 --------- .../requirements/dr438/assign_neg.cc | 4 +- .../requirements/dr438/constructor_1_neg.cc | 4 +- .../requirements/dr438/constructor_2_neg.cc | 4 +- .../requirements/dr438/insert_neg.cc | 4 +- .../list/cons/self_move_assign.cc | 40 --------- .../list/requirements/dr438/assign_neg.cc | 2 +- .../requirements/dr438/constructor_1_neg.cc | 2 +- .../requirements/dr438/constructor_2_neg.cc | 2 +- .../list/requirements/dr438/insert_neg.cc | 2 +- .../map/cons/self_move_assign.cc | 44 ---------- .../multimap/cons/self_move_assign.cc | 44 ---------- .../multiset/cons/self_move_assign.cc | 43 --------- .../set/cons/self_move_assign.cc | 43 --------- .../unordered_map/cons/self_move_assign.cc | 44 ---------- .../cons/self_move_assign.cc | 44 ---------- .../cons/self_move_assign.cc | 43 --------- .../unordered_set/cons/self_move_assign.cc | 43 --------- .../vector/cons/self_move_assign.cc | 40 --------- .../vector/requirements/dr438/assign_neg.cc | 2 +- .../requirements/dr438/constructor_1_neg.cc | 2 +- .../requirements/dr438/constructor_2_neg.cc | 2 +- .../vector/requirements/dr438/insert_neg.cc | 2 +- .../ext/vstring/cons/self_move_assign.cc | 41 --------- 60 files changed, 249 insertions(+), 775 deletions(-) delete mode 100644 libstdc++-v3/testsuite/23_containers/deque/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/forward_list/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/list/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/map/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/multimap/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/multiset/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/set/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/unordered_map/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/unordered_set/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/23_containers/vector/cons/self_move_assign.cc delete mode 100644 libstdc++-v3/testsuite/ext/vstring/cons/self_move_assign.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fe5de436971..a8276a32413 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,90 @@ +2010-01-09 Paolo Carlini + + * include/debug/set.h: Revert last change, per DR 1204 [Ready]; + mention the latter in comment. + * include/debug/unordered_map: Likewise. + * include/debug/multiset.h: Likewise. + * include/debug/vector: Likewise. + * include/debug/unordered_set: Likewise. + * include/debug/deque: Likewise. + * include/debug/map.h: Likewise. + * include/debug/list: Likewise. + * include/debug/multimap.h: Likewise. + * include/tr1_impl/unordered_map: Likewise. + * include/tr1_impl/unordered_set: Likewise. + * include/profile/set.h: Likewise. + * include/profile/unordered_map: Likewise. + * include/profile/multiset.h: Likewise. + * include/profile/unordered_set: Likewise. + * include/profile/vector: Likewise. + * include/profile/deque: Likewise. + * include/profile/map.h: Likewise. + * include/profile/list: Likewise. + * include/profile/multimap.h: Likewise. + * include/ext/vstring.h: Likewise. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_map.h: Likewise. + * include/bits/stl_set.h: Likewise. + * include/bits/stl_multimap.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/bits/stl_deque.h: Likewise. + * include/bits/stl_multiset.h: Likewise. + + * include/bits/forward_list.h: Remove pre-existing check. + * include/ext/vstring.h: Likewise. + + * testsuite/ext/vstring/cons/self_move_assign.cc: Remove. + * testsuite/23_containers/unordered_map/cons/self_move_assign.cc: + Likewise. + * testsuite/23_containers/multimap/cons/self_move_assign.cc: Likewise. + * testsuite/23_containers/set/cons/self_move_assign.cc: Likewise. + * testsuite/23_containers/unordered_multimap/cons/ + self_move_assign.cc: Likewise. + * testsuite/23_containers/forward_list/cons/self_move_assign.cc: + Likewise. + * testsuite/23_containers/unordered_set/cons/self_move_assign.cc: + Likewise. + * testsuite/23_containers/vector/cons/self_move_assign.cc: Likewise. + * testsuite/23_containers/deque/cons/self_move_assign.cc: Likewise. + * testsuite/23_containers/multiset/cons/self_move_assign.cc: Likewise. + * testsuite/23_containers/list/cons/self_move_assign.cc: Likewise. + * testsuite/23_containers/unordered_multiset/cons/ + self_move_assign.cc: Likewise. + * testsuite/23_containers/map/cons/self_move_assign.cc: Likewise. + + * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: + Adjust dg-error line numbers. + * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: + Likewise. + * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/dr438/ + assign_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/dr438/ + insert_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/list/requirements/dr438/ + constructor_2_neg.cc: Likewise. + 2010-01-08 Paolo Carlini * include/debug/set.h: Protect move assignment operator vs self diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index 409c93e031c..10af47e74e1 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -554,12 +554,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) forward_list& operator=(forward_list&& __list) { - if (&__list != this) - { - this->clear(); - this->swap(__list); - } - return *this; + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__list); + return *this; } /** diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index 6227a1fe951..cce04841aec 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -565,6 +565,7 @@ template vector& operator=(vector&& __x) { + // NB: DR 1204. // NB: DR 675. this->clear(); this->swap(__x); diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index b0b2f4940d8..7e60b658b65 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -884,12 +884,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) deque& operator=(deque&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index b6ce11382ef..22a1bcb9625 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -606,12 +606,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) list& operator=(list&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 33364bfe917..a13eeb56fbb 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -265,12 +265,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) map& operator=(map&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index 0bff20a0735..b582e38729a 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -262,12 +262,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) multimap& operator=(multimap&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index bb84b6b7d08..dfbef1bb823 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -234,12 +234,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) multiset& operator=(multiset&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index 2388382ad31..3b0d86f9367 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -241,13 +241,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) set& operator=(set&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } - return *this; + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); + return *this; } /** diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index f681cf0e855..96fc86c5dc9 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -335,12 +335,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) vector& operator=(vector&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index 1c9535ec756..0c98006badb 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -110,12 +110,10 @@ namespace __debug deque& operator=(deque&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 78462e45905..36caee4eb56 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -112,13 +112,11 @@ namespace __debug list& operator=(list&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } - return *this; + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); + return *this; } list& diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 8ef28a19790..24f5ea6c06c 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -115,12 +115,10 @@ namespace __debug map& operator=(map&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index 4ef2990acd0..32a54290406 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -116,12 +116,10 @@ namespace __debug multimap& operator=(multimap&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index 4a7ed9e6688..9f65ba34b28 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -113,12 +113,10 @@ namespace __debug multiset& operator=(multiset&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 99f83fa9aa8..2bd3ddfa5dc 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -113,12 +113,10 @@ namespace __debug set& operator=(set&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 61a3a0a3686..63b292b49f2 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -115,12 +115,10 @@ namespace __debug unordered_map& operator=(unordered_map&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } @@ -391,12 +389,10 @@ namespace __debug unordered_multimap& operator=(unordered_multimap&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index f704f016794..d34b2816e70 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -115,12 +115,10 @@ namespace __debug unordered_set& operator=(unordered_set&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } @@ -389,6 +387,7 @@ namespace __debug unordered_multiset& operator=(unordered_multiset&& __x) { + // NB: DR 1204. // NB: DR 675. clear(); swap(__x); diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index 227905a513d..ca326e4194d 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -124,12 +124,10 @@ namespace __debug vector& operator=(vector&& __x) { - if (this != &__x) - { - // NB: DR 675. - clear(); - swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + clear(); + swap(__x); return *this; } diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 691915f5c7f..bc3d829d8e1 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -260,11 +260,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __versa_string& operator=(__versa_string&& __str) { - if (this != &__str) - { - this->clear(); - this->swap(__str); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__str); return *this; } diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque index 12f45d646fc..55e8d49d686 100644 --- a/libstdc++-v3/include/profile/deque +++ b/libstdc++-v3/include/profile/deque @@ -102,12 +102,10 @@ namespace __profile deque& operator=(deque&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list index 9979a5211b2..09510a04205 100644 --- a/libstdc++-v3/include/profile/list +++ b/libstdc++-v3/include/profile/list @@ -102,12 +102,10 @@ namespace __profile list& operator=(list&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 6335ee774f3..fc698a9fa84 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -121,12 +121,10 @@ namespace __profile map& operator=(map&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h index c240e331aa6..d5627ad1d0a 100644 --- a/libstdc++-v3/include/profile/multimap.h +++ b/libstdc++-v3/include/profile/multimap.h @@ -106,12 +106,10 @@ namespace __profile multimap& operator=(multimap&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h index 22c1c53738c..653ba5b4653 100644 --- a/libstdc++-v3/include/profile/multiset.h +++ b/libstdc++-v3/include/profile/multiset.h @@ -104,12 +104,10 @@ namespace __profile multiset& operator=(multiset&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h index c5d462747f7..e2e357339dc 100644 --- a/libstdc++-v3/include/profile/set.h +++ b/libstdc++-v3/include/profile/set.h @@ -104,12 +104,10 @@ namespace __profile set& operator=(set&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 7ef629a9094..74781de2dd4 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -130,12 +130,10 @@ namespace __profile unordered_map& operator=(unordered_map&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } @@ -358,12 +356,10 @@ namespace __profile unordered_multimap& operator=(unordered_multimap&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 8c9e7669c49..62bb1a423bd 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -129,12 +129,10 @@ namespace __profile unordered_set& operator=(unordered_set&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } @@ -346,12 +344,10 @@ namespace __profile unordered_multiset& operator=(unordered_multiset&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index 5ae45323dcb..e4e680f8699 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -140,13 +140,11 @@ namespace __profile vector& operator=(vector&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } - return *this; + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); + return *this; } vector& diff --git a/libstdc++-v3/include/tr1_impl/unordered_map b/libstdc++-v3/include/tr1_impl/unordered_map index d6975900739..ba8f6729017 100644 --- a/libstdc++-v3/include/tr1_impl/unordered_map +++ b/libstdc++-v3/include/tr1_impl/unordered_map @@ -229,12 +229,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 unordered_map& operator=(unordered_map&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } @@ -315,12 +313,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 unordered_multimap& operator=(unordered_multimap&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/include/tr1_impl/unordered_set b/libstdc++-v3/include/tr1_impl/unordered_set index 1270b17186a..c11d9f3021b 100644 --- a/libstdc++-v3/include/tr1_impl/unordered_set +++ b/libstdc++-v3/include/tr1_impl/unordered_set @@ -222,12 +222,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 unordered_set& operator=(unordered_set&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } @@ -305,12 +303,10 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 unordered_multiset& operator=(unordered_multiset&& __x) { - if (this != &__x) - { - // NB: DR 675. - this->clear(); - this->swap(__x); - } + // NB: DR 1204. + // NB: DR 675. + this->clear(); + this->swap(__x); return *this; } diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/self_move_assign.cc deleted file mode 100644 index e3c5180f5de..00000000000 --- a/libstdc++-v3/testsuite/23_containers/deque/cons/self_move_assign.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - std::deque d0(10, 1); - const std::deque d1(d0); - d0 = std::move(d0); - VERIFY( d0.size() == 10 ); - VERIFY( d0 == d1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc index 0a50b6d9220..4263371f814 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1578 } +// { dg-error "no matching" "" { target *-*-* } 1576 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc index a63fcfa5ea6..0a32f12d049 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1517 } +// { dg-error "no matching" "" { target *-*-* } 1515 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc index 298ec2de532..11993a9752b 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1517 } +// { dg-error "no matching" "" { target *-*-* } 1515 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc index cb303949ac8..f1c45b269fb 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1662 } +// { dg-error "no matching" "" { target *-*-* } 1660 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/self_move_assign.cc deleted file mode 100644 index d7b7298c67f..00000000000 --- a/libstdc++-v3/testsuite/23_containers/forward_list/cons/self_move_assign.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - std::forward_list fl0(10, 1); - const std::forward_list fl1(fl0); - fl0 = std::move(fl0); - // VERIFY( fl0.size() == 10 ); - VERIFY( fl0 == fl1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc index 0d167718278..1625e3bc76b 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1197 } +// { dg-error "no matching" "" { target *-*-* } 1196 } // { dg-excess-errors "" } -// Copyright (C) 2009 Free Software Foundation +// Copyright (C) 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc index d72b9fa4c9d..5acfcd1f47f 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1197 } +// { dg-error "no matching" "" { target *-*-* } 1196 } // { dg-excess-errors "" } -// Copyright (C) 2009 Free Software Foundation +// Copyright (C) 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc index f0481a3f453..dcf69089b00 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1197 } +// { dg-error "no matching" "" { target *-*-* } 1196 } // { dg-excess-errors "" } -// Copyright (C) 2009 Free Software Foundation +// Copyright (C) 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc index c4a84ff38da..22574fd081a 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1197 } +// { dg-error "no matching" "" { target *-*-* } 1196 } // { dg-excess-errors "" } -// Copyright (C) 2009 Free Software Foundation +// Copyright (C) 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/list/cons/self_move_assign.cc deleted file mode 100644 index d406ecda4b3..00000000000 --- a/libstdc++-v3/testsuite/23_containers/list/cons/self_move_assign.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - std::list l0(10, 1); - const std::list l1(l0); - l0 = std::move(l0); - VERIFY( l0.size() == 10 ); - VERIFY( l0 == l1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc index 24ee3fac6e7..d41e1498069 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1412 } +// { dg-error "no matching" "" { target *-*-* } 1410 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc index 3e0f7d936cb..01d9135c860 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1381 } +// { dg-error "no matching" "" { target *-*-* } 1379 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc index ec29e3b0f08..c13f6565df4 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1381 } +// { dg-error "no matching" "" { target *-*-* } 1379 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc index 0d4a001c117..262a7a15f94 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1381 } +// { dg-error "no matching" "" { target *-*-* } 1379 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/map/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/map/cons/self_move_assign.cc deleted file mode 100644 index dbf153caecc..00000000000 --- a/libstdc++-v3/testsuite/23_containers/map/cons/self_move_assign.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::map map_type; - typedef map_type::value_type value_type; - - map_type m0{ value_type(1, 1), value_type(2, 2), value_type(3, 3) }; - - const map_type m1(m0); - m0 = std::move(m0); - VERIFY( m0.size() == 3 ); - VERIFY( m0 == m1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/multimap/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/multimap/cons/self_move_assign.cc deleted file mode 100644 index 0d2f9e7b8c8..00000000000 --- a/libstdc++-v3/testsuite/23_containers/multimap/cons/self_move_assign.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::multimap mmap_type; - typedef mmap_type::value_type value_type; - - mmap_type mm0{ value_type(1, 1), value_type(2, 2), value_type(3, 3) }; - - const mmap_type mm1(mm0); - mm0 = std::move(mm0); - VERIFY( mm0.size() == 3 ); - VERIFY( mm0 == mm1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/multiset/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/multiset/cons/self_move_assign.cc deleted file mode 100644 index f1e4e1d33ab..00000000000 --- a/libstdc++-v3/testsuite/23_containers/multiset/cons/self_move_assign.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::multiset mset_type; - - mset_type ms0{ 1, 2, 3 }; - - const mset_type ms1(ms0); - ms0 = std::move(ms0); - VERIFY( ms0.size() == 3 ); - VERIFY( ms0 == ms1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/set/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/set/cons/self_move_assign.cc deleted file mode 100644 index d8f676b635b..00000000000 --- a/libstdc++-v3/testsuite/23_containers/set/cons/self_move_assign.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::set set_type; - - set_type s0{ 1, 2, 3 }; - - const set_type s1(s0); - s0 = std::move(s0); - VERIFY( s0.size() == 3 ); - VERIFY( s0 == s1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/self_move_assign.cc deleted file mode 100644 index a31a1ee7fd8..00000000000 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/self_move_assign.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::unordered_map umap_type; - typedef umap_type::value_type value_type; - - umap_type um0{ value_type(1, 1), value_type(2, 2), value_type(3, 3) }; - - const umap_type um1(um0); - um0 = std::move(um0); - VERIFY( um0.size() == 3 ); - // VERIFY( um0 == um1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/self_move_assign.cc deleted file mode 100644 index c44e8d8bfb5..00000000000 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/self_move_assign.cc +++ /dev/null @@ -1,44 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::unordered_multimap ummap_type; - typedef ummap_type::value_type value_type; - - ummap_type umm0{ value_type(1, 1), value_type(2, 2), value_type(3, 3) }; - - const ummap_type umm1(umm0); - umm0 = std::move(umm0); - VERIFY( umm0.size() == 3 ); - // VERIFY( umm0 == umm1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/self_move_assign.cc deleted file mode 100644 index 7929f6bef3b..00000000000 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/self_move_assign.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::unordered_multiset umset_type; - - umset_type ums0{ 1, 2, 3 }; - - const umset_type ums1(ums0); - ums0 = std::move(ums0); - VERIFY( ums0.size() == 3 ); - // VERIFY( ums0 == ums1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/self_move_assign.cc deleted file mode 100644 index 7ce6db0172e..00000000000 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/self_move_assign.cc +++ /dev/null @@ -1,43 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - typedef std::unordered_set uset_type; - - uset_type us0{ 1, 2, 3 }; - - const uset_type us1(us0); - us0 = std::move(us0); - VERIFY( us0.size() == 3 ); - // VERIFY( us0 == us1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/self_move_assign.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/self_move_assign.cc deleted file mode 100644 index d7c5d285465..00000000000 --- a/libstdc++-v3/testsuite/23_containers/vector/cons/self_move_assign.cc +++ /dev/null @@ -1,40 +0,0 @@ -// { dg-options "-std=gnu++0x" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - std::vector v0(10, 1); - const std::vector v1(v0); - v0 = std::move(v0); - VERIFY( v0.size() == 10 ); - VERIFY( v0 == v1 ); -} - -int main() -{ - test01(); - return 0; -} diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc index bb9a56e924f..f0fae0083ba 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1057 } +// { dg-error "no matching" "" { target *-*-* } 1055 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc index 02ae1c4c727..ea0acfb5a91 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 997 } +// { dg-error "no matching" "" { target *-*-* } 995 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc index f9c3f4a2205..67dd1f33e11 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 997 } +// { dg-error "no matching" "" { target *-*-* } 995 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc index 82acbbc97b9..9eb0ab15acf 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1098 } +// { dg-error "no matching" "" { target *-*-* } 1096 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/ext/vstring/cons/self_move_assign.cc b/libstdc++-v3/testsuite/ext/vstring/cons/self_move_assign.cc deleted file mode 100644 index caa8e4ff9ab..00000000000 --- a/libstdc++-v3/testsuite/ext/vstring/cons/self_move_assign.cc +++ /dev/null @@ -1,41 +0,0 @@ -// { dg-options "-std=gnu++0x" } -// { dg-require-string-conversions "" } - -// 2010-01-08 Paolo Carlini - -// Copyright (C) 2010 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -void test01() -{ - bool test __attribute__((unused)) = true; - - __gnu_cxx::__vstring vs0(10, 'a'); - const __gnu_cxx::__vstring vs1(vs0); - vs0 = std::move(vs0); - VERIFY( vs0.size() == 10 ); - VERIFY( vs0 == vs1 ); -} - -int main() -{ - test01(); - return 0; -}