https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:87ec5b369eed205dfe6802afaaec3986b246ade9

commit r13-8569-g87ec5b369eed205dfe6802afaaec3986b246ade9
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Fri Feb 9 17:06:20 2024 +0000

    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.

    (cherry picked from commit 142cc4c223d695e515ed2504501b91d8a7ac6eb8)

Reply via email to