This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] 77864 Fix noexcept conditions for map/set default constructors


I added conditional noexcept to maps and sets, but forgot to account
for the comparison function, which could throw when constructed.

	PR libstdc++/77864
	* include/bits/stl_map.h (map::map()): Use nothrow constructibility
	of comparison function in conditional noexcept.
	* include/bits/stl_multimap.h (multimap::multimap()): Likewise.
	* include/bits/stl_multiset.h (multiset::multiset()): Likewise.
	* include/bits/stl_set.h (set::set()): Likewise.
	* testsuite/23_containers/map/cons/noexcept_default_construct.cc:
	New test.
	* testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
	Likewise.
	* testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
	Likewise.
	* testsuite/23_containers/set/cons/noexcept_default_construct.cc:
	Likewise.

Tested powerpc64le-linux, committing to trunk, gcc-5 and gcc-6.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]