]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Value-initialize objects held by EBO helpers [PR 100863]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 2 Jun 2021 11:34:48 +0000 (12:34 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 12 Oct 2021 19:40:37 +0000 (20:40 +0100)
commit573c2ffd3cacde5c54605eb0d8b312d22594f7fa
tree6682f96c5a559fc37246e9a38f3934b1d85b0f0f
parent4407f0d739c25021665f26d7666ace0258e45ca3
libstdc++: Value-initialize objects held by EBO helpers [PR 100863]

The allocator, hash function and equality function should all be
value-initialized by the default constructor of an unordered container.
Do it in the EBO helper, so we don't have to get it right in multiple
places.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/100863
PR libstdc++/65816
* include/bits/hashtable_policy.h (_Hashtable_ebo_helper):
Value-initialize subobject.
* testsuite/23_containers/unordered_map/allocator/default_init.cc:
Remove XFAIL.
* testsuite/23_containers/unordered_set/allocator/default_init.cc:
Remove XFAIL.

(cherry picked from commit f8f0193b5b83f6e85d65015e79c803295baf5166)
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/testsuite/23_containers/unordered_map/allocator/default_init.cc
libstdc++-v3/testsuite/23_containers/unordered_set/allocator/default_init.cc