[PATCH] D93992: [STLExtras] Use return type from operator* of the wrapped iter.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 03:17:43 PST 2021


fhahn added inline comments.


================
Comment at: llvm/unittests/ADT/STLExtrasTest.cpp:458
+struct CustomPointerIterator
+    : public std::iterator<std::forward_iterator_tag, int *> {
+  std::list<int>::iterator Iter;
----------------
dblaikie wrote:
> std::iterator is deprecated - you could try using llvm::iterator_adaptor_base, it'll also simplify the implementation by providing default implementations of several operations required for the iterator concepts.
Thanks, that indeed really simplifies the code :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93992



More information about the llvm-commits mailing list