aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.cc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-03-20 09:52:35 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2025-03-21 10:28:06 +0000
commit3e1d760bf49d0e9a89dcfa0450a6d1ae5ceb756e (patch)
tree7186bd774fb7ef7ae70a75e53430e97905a75c67 /gcc/tree-loop-distribution.cc
parent3355e44dd2b35488facfec66aad628c5999c89d6 (diff)
downloadgcc-3e1d760bf49d0e9a89dcfa0450a6d1ae5ceb756e.zip
gcc-3e1d760bf49d0e9a89dcfa0450a6d1ae5ceb756e.tar.gz
gcc-3e1d760bf49d0e9a89dcfa0450a6d1ae5ceb756e.tar.bz2
libstdc++: Simplify std::vector::vector(from_range_t, const Alloc&)
Tomasz suggested replacing this constructor with just append_range(rg), after using a delegating constructor so that the destructor will run if append_range exits via an exception. This is slightly less simple than his suggestion, because I want to avoid the overhead of reserve's slow path and the ASan annotations. Neither of those is needed for this constructor, because we have no existing storage to reallocate and no unused capacity to tell ASan about. libstdc++-v3/ChangeLog: * include/bits/stl_vector.h (vector(from_range_t, Alloc)): Use delegating constructor instead of RAII guards. Use append_range for unsized input range case. Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
Diffstat (limited to 'gcc/tree-loop-distribution.cc')
0 files changed, 0 insertions, 0 deletions