[llvm] [llvm] Use llvm::append_range (NFC) (PR #136066)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 18 10:55:50 PDT 2025
kazutakahirata wrote:
@kuhar @nikic FWIW, in `libcxx/include/__vector/vector.h`, `std::vector::insert` dispatches to either `__insert_with_sentinel` for input iterators and `__insert_with_size` for forward iterators. `__insert_with_size` does `std::distance(__first, __last)`. Interestingly, `std::vector::append_range` from C++26 performs at most one allocation on certain conditions according to:
https://en.cppreference.com/w/cpp/container/vector/append_range
https://github.com/llvm/llvm-project/pull/136066
More information about the llvm-commits
mailing list