[Bug libstdc++/105031] wrong constexpr if statement in basic_stacktrace::operator=(basic_stacktrace&&)

2022-04-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105031

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Jonathan Wakely  ---
Fixed, thanks for the report.

[Bug libstdc++/105031] wrong constexpr if statement in basic_stacktrace::operator=(basic_stacktrace&&)

2022-04-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105031

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:73da9ec55609efa532b9ac85ac2dbe121c134e18

commit r12-8089-g73da9ec55609efa532b9ac85ac2dbe121c134e18
Author: Jonathan Wakely 
Date:   Mon Apr 11 17:44:14 2022 +0100

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.

[Bug libstdc++/105031] wrong constexpr if statement in basic_stacktrace::operator=(basic_stacktrace&&)

2022-04-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105031

Jonathan Wakely  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2022-04-10
 Status|UNCONFIRMED |NEW
   Target Milestone|--- |12.0

[Bug libstdc++/105031] wrong constexpr if statement in basic_stacktrace::operator=(basic_stacktrace&&)

2022-04-10 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105031

--- Comment #1 from 康桓瑋  ---
Hey, Jonathan, would you mind taking a look?