aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-02-09 17:06:20 +0000
committerJonathan Wakely <jwakely@redhat.com>2024-03-22 22:39:06 +0000
commit142cc4c223d695e515ed2504501b91d8a7ac6eb8 (patch)
tree28b38d9292fc4d6e777044fcd170783787b5d3a5 /libgcc
parent8539c5610a7c36099af2ea756d8bbfa398a40e0b (diff)
downloadgcc-142cc4c223d695e515ed2504501b91d8a7ac6eb8.zip
gcc-142cc4c223d695e515ed2504501b91d8a7ac6eb8.tar.gz
gcc-142cc4c223d695e515ed2504501b91d8a7ac6eb8.tar.bz2
libstdc++: Constrain std::vector default constructor [PR113841]
This is needed to avoid errors outside the immediate context when evaluating is_default_constructible_v<vector<T, A>> when A is not default constructible. To avoid diagnostic regressions for 23_containers/vector/48101_neg.cc we need to make the std::allocator<cv T> partial specializations default constructible, which they probably should have been anyway. libstdc++-v3/ChangeLog: PR libstdc++/113841 * include/bits/allocator.h (allocator<cv T>): Add default constructor to partial specializations for cv-qualified types. * include/bits/stl_vector.h (_Vector_impl::_Vector_impl()): Constrain so that it's only present if the allocator is default constructible. * include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl()): Likewise. * testsuite/23_containers/vector/cons/113841.cc: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions