aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorDaniel Trebbien <dtrebbien@gmail.com>2018-06-14 09:26:51 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2018-06-14 10:26:51 +0100
commit4c1d999a7e937da0d417e8153f54b646603bb210 (patch)
treea759ed4858add51262b507d4cd3eb47b79f73fad /gcc/tree-ssa-structalias.c
parentc7a42ade9befecb8fca501b5e2021c09496f3554 (diff)
downloadgcc-4c1d999a7e937da0d417e8153f54b646603bb210.zip
gcc-4c1d999a7e937da0d417e8153f54b646603bb210.tar.gz
gcc-4c1d999a7e937da0d417e8153f54b646603bb210.tar.bz2
PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize
Construct new elements before moving existing ones, so that if a default constructor throws, the existing elements are not left in a moved-from state. 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/83982 * include/bits/vector.tcc (vector::_M_default_append(size_type)): Default-construct new elements before moving existing ones. * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc: New. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r261585
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
0 files changed, 0 insertions, 0 deletions