[Lldb-commits] [PATCH] D94136: [lldb] Make ModuleList iterable (NFC)

David Blaikie via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 5 16:29:48 PST 2021


dblaikie added inline comments.


================
Comment at: lldb/include/lldb/Core/ModuleList.h:70
+class ModuleIterator
+    : public std::iterator<std::bidirectional_iterator_tag, lldb::ModuleSP> {
+public:
----------------
FWIW, std::iterator is deprecated since C++17 - probably best not to add new uses of it. (I think the idea is that the typedefs that std::iterator provides are no longer needed because of auto/decltype/etc, but I might be wrong there (would have to check the iterator concepts specifications))

If you need some utility help with implementing an iterator, llvm's iterator_facade_base might help by allowing a fairly minimal implementation to autogenerate various symmetric members, etc.


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

https://reviews.llvm.org/D94136



More information about the lldb-commits mailing list