gcc/libstdc++-v3/include
Jonathan Wakely 056551414a libstdc++: Clear RB tree after moving elements [PR103501]
If the allocator-extended move constructor move-constructs each element
into the new container, the contents of the old container are left in
moved-from states. We cannot know if those states preserve the
container's ordering and uniqueness guarantees, so just erase all
moved-from elements.

libstdc++-v3/ChangeLog:

	PR libstdc++/103501
	* include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&, false_type)):
	Clear container if elements have been moved-from.
	* testsuite/23_containers/map/allocator/move_cons.cc: Expect
	moved-from container to be empty.
	* testsuite/23_containers/multimap/allocator/move_cons.cc:
	Likewise.
	* testsuite/23_containers/multiset/allocator/103501.cc: New test.
	* testsuite/23_containers/set/allocator/103501.cc: New test.
2021-12-01 15:00:33 +00:00
..
backward Update copyright years. 2021-01-04 10:26:59 +01:00
bits libstdc++: Clear RB tree after moving elements [PR103501] 2021-12-01 15:00:33 +00:00
c Update copyright years. 2021-01-04 10:26:59 +01:00
c_compatibility Update copyright years. 2021-01-04 10:26:59 +01:00
c_global libstdc++: Enable type traits for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
c_std Update copyright years. 2021-01-04 10:26:59 +01:00
debug libstdc++: Define std::__is_constant_evaluated() for internal use 2021-12-01 15:00:33 +00:00
decimal libstdc++: Fix doxygen markup for group close commands 2021-04-06 16:43:24 +01:00
experimental libstdc++: [_GLIBCXX_DEBUG] Reduce performance impact on std::erase_if 2021-11-20 16:11:22 +01:00
ext libstdc++: Fix circular dependency for bitmap_allocator [PR103381] 2021-11-23 12:30:57 +00:00
parallel Update copyright years. 2021-01-04 10:26:59 +01:00
precompiled libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
pstl libstdc++: Fix up parallel_backend_serial.h [PR97549] 2021-02-23 09:28:14 +01:00
std libstdc++: Define std::__is_constant_evaluated() for internal use 2021-12-01 15:00:33 +00:00
tr1 libstdc++: Enable type traits for wchar_t unconditionally [PR98725] 2021-10-09 00:57:49 +01:00
tr2 libstdc++: Fix doxygen markup for group close commands 2021-04-06 16:43:24 +01:00
Makefile.am libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
Makefile.in libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00