[PATCH] D18579: SetVector: Add front, pop_front and additional constructor.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 11:03:36 PDT 2016


MatzeB added a comment.

In http://reviews.llvm.org/D18579#391254, @dblaikie wrote:

> That seems like a somewhat strange API - calling reserve down into the
>  vector (& possibly the set, for things like DenseSet) seems more
>  appropriate, no?


After the discussions here I felt that reserve()/resize() are details of the underlying set not necessarily a common agreed interface supported by all sets, what if the next set implementation has additional methods for tuning? An alternative to that strange constructor would be to expose the set object so people can call reserve()/resize() on it directly though it breaks isolation.


Repository:
  rL LLVM

http://reviews.llvm.org/D18579





More information about the llvm-commits mailing list