re PR libstdc++/78389 (list::merge and list::sort are not exception safe)
authorVille Voutilainen <ville.voutilainen@gmail.com>
Fri, 13 Jan 2017 14:46:25 +0000 (16:46 +0200)
committerVille Voutilainen <ville@gcc.gnu.org>
Fri, 13 Jan 2017 14:46:25 +0000 (16:46 +0200)
commite5dcfacf4390abe657d186eff582835e8d1b8370
tree0b93988d916d1c7b514a4937985f463ef43f4cb6
parent45cac8baeb358b76c7255841543190cf3eeff2be
re PR libstdc++/78389 (list::merge and list::sort are not exception safe)

PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)):
Adjust list sizes if the comparator throws.
(merge(list&&, _StrictWeakOrdering)): Likewise.
(sort()): Splice elements back from the scratch buffers
if the comparator throws.
(sort(_StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: New.

From-SVN: r244439
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/list.tcc
libstdc++-v3/testsuite/23_containers/list/operations/78389.cc [new file with mode: 0644]