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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:55650236cd97d81f42f9fdb4f6bcb12babafe51f

commit r12-64-g55650236cd97d81f42f9fdb4f6bcb12babafe51f
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Thu Apr 22 15:46:51 2021 +0100

    libstdc++: Reject std::make_shared<T[]> [PR 99006]

    Prior to C++20 it should be ill-formed to use std::make_shared with an
    array type (and we don't support the C++20 feature to make it valid yet
    anyway).

    libstdc++-v3/ChangeLog:

            PR libstdc++/99006
            * include/bits/shared_ptr.h (allocate_shared): Assert that _Tp
            is not an array type.
            * include/bits/shared_ptr_base.h (__allocate_shared): Likewise.
            * testsuite/20_util/shared_ptr/creation/99006.cc: New test.

Reply via email to