[PATCH] D47942: [SmallSet] Add SmallSetIterator.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 14:40:19 PDT 2018


fhahn added inline comments.


================
Comment at: include/llvm/ADT/SmallSet.h:32
+template <typename T, unsigned N, typename C>
+class SmallSetIterator
+    : public iterator_facade_base<SmallSetIterator<T, N, C>,
----------------
dblaikie wrote:
> I imagine this type needs user-defined special members (copy/move ctors and copy/move assignment operators) - the usual "rule of 5" (the user-defined dtor being an indicator here)
It looks like both the set and SmallVector iterators have trivial ctors/dtors and move/assignment operators. So it seems like the destructor is not needed either, at least the compiler does not complain about any missing functions. Would it be safe to get rid of the dtor instead in this case?


https://reviews.llvm.org/D47942





More information about the llvm-commits mailing list