]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Begin lifetime of storage in std::vector<bool> [PR114367]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 18 Mar 2024 13:00:17 +0000 (13:00 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 19 Mar 2024 15:13:18 +0000 (15:13 +0000)
commit16afbd9c9c4282d56062cef95e6eccfdcf3efe03
tree0e1a87feb99671f398c5db7e066836ea4a07e518
parentc7a774edbf802d79b95871ede5b80f6e9adf8e88
libstdc++: Begin lifetime of storage in std::vector<bool> [PR114367]

This doesn't cause a problem with GCC, but Clang correctly diagnoses a
bug in the code. The objects in the allocated storage need to begin
their lifetime before we start using them.

This change uses the allocator's construct function instead of using
std::construct_at directly, in order to support fancy pointers.

libstdc++-v3/ChangeLog:

PR libstdc++/114367
* include/bits/stl_bvector.h (_M_allocate): Use allocator's
construct function to begin lifetime of words.
libstdc++-v3/include/bits/stl_bvector.h
This page took 0.061809 seconds and 6 git commands to generate.