[llvm] [ADT] Add SmallVectorImpl::append_range (PR #93384)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun May 26 16:58:44 PDT 2024


================
@@ -701,6 +701,10 @@ class SmallVectorImpl : public SmallVectorTemplateBase<T> {
     this->set_size(this->size() + NumInputs);
   }
 
+  template <typename RangeTy> void append_range(RangeTy &&R) {
+    this->append(R.begin(), R.end());
----------------
MaskRay wrote:

The `std::vector<std::vector<int>>` example will be nice to have in unittests/ADT/

https://github.com/llvm/llvm-project/pull/93384


More information about the llvm-commits mailing list