[llvm] [ADT] Add DenseSet::insert_range (PR #131567)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 17 09:21:59 PDT 2025


kazutakahirata wrote:

> Can't we use 'append_range'?

We cannot quite use `append_range` with `std::map` or `DenseSet` because it is implemented like so:

```
template <typename Container, typename Range>
void append_range(Container &C, Range &&R) {
  C.insert(C.end(), adl_begin(R), adl_end(R));
}
```

Note that neither `std::map::insert` nor `DenseSet` accepts `C.end()`.


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


More information about the llvm-commits mailing list