[clang] [NFC][clang][AST] Add compile-time dispatch for random access iterators in append() (PR #162000)
Samarth Narang via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 23 10:52:01 PDT 2025
================
@@ -180,9 +180,21 @@ class ASTVector {
size_t capacity() const { return this->capacity_ptr() - Begin; }
/// append - Add the specified range to the end of the SmallVector.
- template<typename in_iter>
+ template <typename in_iter>
void append(const ASTContext &C, in_iter in_start, in_iter in_end) {
- size_type NumInputs = std::distance(in_start, in_end);
+ using size_type =
+ typename std::remove_reference_t<decltype(*this)>::size_type;
----------------
snarang181 wrote:
Thanks for catching that, resolved.
https://github.com/llvm/llvm-project/pull/162000
More information about the cfe-commits
mailing list