Yet another debug check for unordered containers
François Dumont
frs.dumont@gmail.com
Wed Oct 17 20:05:00 GMT 2012
Hi
Here is another check on the max load factor.
2012-10-18 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h (_Debug_msg_id): Add
__msg_valid_load_factor.
* include/debug/macros.h (__glibcxx_check_max_load_factor): New.
* include/debug/unordered_set
(unordered_set<>::max_load_factor(float)): Check max load factor
is positive.
(unordered_multiset<>::max_load_factor(float)): Likewise.
* include/debug/unordered_map
(unordered_map<>::max_load_factor(float)): Likewise.
(unordered_multimap<>::max_load_factor(float)): Likewise.
* testsuite/23_containers/unordered_map/debug/max_load_factor_neg.cc:
New.
* testsuite/23_containers/unordered_multimap/debug/
max_load_factor_neg.cc: New.
* testsuite/23_containers/unordered_set/debug/max_load_factor_neg.cc:
New.
* testsuite/23_containers/unordered_multiset/debug/
max_load_factor_neg.cc: New.
Tested under Linux x86_64.
Ok to commit ?
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: safe_unordered.patch
Type: text/x-patch
Size: 9336 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20121017/bef35ce0/attachment.bin>
More information about the Libstdc++
mailing list