diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-04-22 15:46:51 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-04-22 15:49:27 +0100 |
commit | 55650236cd97d81f42f9fdb4f6bcb12babafe51f (patch) | |
tree | 9cc5149af0c3dd39c964afdbb3ecf58defda6375 /gcc | |
parent | 3bb6a9c01f1e9b5daf9b37fca57e90804ba90d66 (diff) | |
download | gcc-55650236cd97d81f42f9fdb4f6bcb12babafe51f.zip gcc-55650236cd97d81f42f9fdb4f6bcb12babafe51f.tar.gz gcc-55650236cd97d81f42f9fdb4f6bcb12babafe51f.tar.bz2 |
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.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions