gcc/libstdc++-v3/testsuite/23_containers
Daniel Trebbien 4c1d999a7e PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize
Construct new elements before moving existing ones, so that if a default
constructor throws, the existing elements are not left in a moved-from
state.

2018-06-14  Daniel Trebbien <dtrebbien@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83982
	* include/bits/vector.tcc (vector::_M_default_append(size_type)):
	Default-construct new elements before moving existing ones.
	* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
	New.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r261585
2018-06-14 10:26:51 +01:00
..
array Update copyright years. 2018-01-03 11:03:58 +01:00
bitset Update copyright years. 2018-01-03 11:03:58 +01:00
deque deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
forward_list 2018-01-10 François Dumont <fdumont@gcc.gnu.org> 2018-01-10 16:59:02 +00:00
headers Update copyright years. 2018-01-03 11:03:58 +01:00
list deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
map 2018-05-18 François Dumont <fdumont@gcc.gnu.org> 2018-05-18 20:49:49 +00:00
multimap 2018-05-18 François Dumont <fdumont@gcc.gnu.org> 2018-05-18 20:49:49 +00:00
multiset 2018-05-18 François Dumont <fdumont@gcc.gnu.org> 2018-05-18 20:49:49 +00:00
priority_queue Update copyright years. 2018-01-03 11:03:58 +01:00
queue Update copyright years. 2018-01-03 11:03:58 +01:00
set 2018-05-18 François Dumont <fdumont@gcc.gnu.org> 2018-05-18 20:49:49 +00:00
stack Update copyright years. 2018-01-03 11:03:58 +01:00
unordered_map re PR libstdc++/83709 (Inserting duplicates into an unordered associative containers causes the container to invalidate iterators) 2018-01-09 21:05:10 +00:00
unordered_multimap Update copyright years. 2018-01-03 11:03:58 +01:00
unordered_multiset Update copyright years. 2018-01-03 11:03:58 +01:00
unordered_set re PR libstdc++/83709 (Inserting duplicates into an unordered associative containers causes the container to invalidate iterators) 2018-01-09 21:05:10 +00:00
vector PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize 2018-06-14 10:26:51 +01:00