[libc-commits] [PATCH] D135540: clean up std::iterator in LibcBenchmark.h

Schrodinger ZHU Yifan via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Oct 9 09:31:46 PDT 2022


SchrodingerZhu updated this revision to Diff 466381.
SchrodingerZhu added a comment.

Remove std::iterator usage in LibcBenchmark.h


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135540

Files:
  libc/benchmarks/LibcBenchmark.h


Index: libc/benchmarks/LibcBenchmark.h
===================================================================
--- libc/benchmarks/LibcBenchmark.h
+++ libc/benchmarks/LibcBenchmark.h
@@ -272,8 +272,8 @@
   using difference_type = ssize_t;
   using size_type = size_t;
 
-  class const_iterator
-      : public std::iterator<std::input_iterator_tag, T, ssize_t> {
+  class const_iterator {
+    using iterator_category = std::input_iterator_tag;
     llvm::ArrayRef<T> Array;
     size_t Index;
     size_t Offset;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135540.466381.patch
Type: text/x-patch
Size: 510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221009/3ef77e46/attachment.bin>


More information about the libc-commits mailing list