aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-06-20 15:53:13 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-07-05 12:18:34 +0100
commit6025256d47b36fed455cc4f8dd4becf53208bbae (patch)
tree99bd47d94416f0980a4c4aac4ec02e243d333d57 /gcc
parentde19b516edbf919d31e9d22fdbf6066342d904a2 (diff)
downloadgcc-6025256d47b36fed455cc4f8dd4becf53208bbae.zip
gcc-6025256d47b36fed455cc4f8dd4becf53208bbae.tar.gz
gcc-6025256d47b36fed455cc4f8dd4becf53208bbae.tar.bz2
libstdc++: Use RAII in <bits/stl_uninitialized.h>
This adds an _UninitDestroyGuard class template, similar to ranges::_DestroyGuard used in <bits/ranges_uninitialized.h>. This allows us to remove all the try-catch blocks and rethrows, because any required cleanup gets done in the guard destructor. libstdc++-v3/ChangeLog: * include/bits/stl_uninitialized.h (_UninitDestroyGuard): New class template and partial specialization. (__do_uninit_copy, __do_uninit_fill, __do_uninit_fill_n) (__uninitialized_copy_a, __uninitialized_fill_a) (__uninitialized_fill_n_a, __uninitialized_copy_move) (__uninitialized_move_copy, __uninitialized_fill_move) (__uninitialized_move_fill, __uninitialized_default_1) (__uninitialized_default_n_a, __uninitialized_default_novalue_1) (__uninitialized_default_novalue_n_1, __uninitialized_copy_n) (__uninitialized_copy_n_pair): Use it.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions