[PATCH] D90882: [SmallVector] Add range versions of append/assign.

Sean Silva via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 16:02:10 PST 2020


silvas added a comment.

In D90882#2377528 <https://reviews.llvm.org/D90882#2377528>, @dblaikie wrote:

> Maybe these would be more effective as generic range-based functions? (is "append(begin, end)" part of the container concept? Not 100% clear to me on a quick check) - would make it usable with a variety of containers in one go instead of adding it to individual containers (& not being able to add it to standard containers)?

Good point! I added such a function to STLExtras.h here: https://reviews.llvm.org/D90894
(I didn't add one for "assign" since I didn't have an immediate use case. I handled it in assign for this patch for consistency since it seemed there was parallel functionality there for SmallVector in particular)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90882/new/

https://reviews.llvm.org/D90882



More information about the llvm-commits mailing list