diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-04-11 17:44:14 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-04-11 17:59:50 +0100 |
commit | 73da9ec55609efa532b9ac85ac2dbe121c134e18 (patch) | |
tree | a58b51c6f7dfbe3f627e9f32f98706a0ad99ea8c /gcc | |
parent | bdb9639ee99b68a8c7541e78057e96fe6a2c62ed (diff) | |
download | gcc-73da9ec55609efa532b9ac85ac2dbe121c134e18.zip gcc-73da9ec55609efa532b9ac85ac2dbe121c134e18.tar.gz gcc-73da9ec55609efa532b9ac85ac2dbe121c134e18.tar.bz2 |
libstdc++: Fix std::basic_stacktrace special members [PR105031]
The PR points out that there is a non-constant condition used for an
if-constexpr statement, but there are several other problems with the
copy, move and swap members of std::basic_stacktrace.
libstdc++-v3/ChangeLog:
PR libstdc++/105031
* include/std/stacktrace (basic_stacktrace::basic_stacktrace):
Fix allocator usage in constructors.
(basic_stacktrace::operator=(const basic_stacktrace&)): Do not
try to reallocate using const allocator.
(basic_stacktrace::operator=(basic_stacktrace&&)): Fix
if-constexpr with non-constant condition. Do not allocate new
storage if allocator propagates. Do not set _M_size if
allocation fails.
(basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
assertion that non-propagating allocators are equal.
* testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions