[PATCH] D146232: [NFC] Add iterator traits to BitVector set_bits_iterator
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 02:12:14 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGee928e322861: [NFC] Add iterator traits to BitVector set_bits_iterator (authored by Orlando).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146232/new/
https://reviews.llvm.org/D146232
Files:
llvm/include/llvm/ADT/BitVector.h
Index: llvm/include/llvm/ADT/BitVector.h
===================================================================
--- llvm/include/llvm/ADT/BitVector.h
+++ llvm/include/llvm/ADT/BitVector.h
@@ -24,6 +24,7 @@
#include <cstdint>
#include <cstdlib>
#include <cstring>
+#include <iterator>
#include <utility>
namespace llvm {
@@ -40,6 +41,12 @@
}
public:
+ using iterator_category = std::forward_iterator_tag;
+ using difference_type = void;
+ using value_type = int;
+ using pointer = value_type*;
+ using reference = value_type&;
+
const_set_bits_iterator_impl(const BitVectorT &Parent, int Current)
: Parent(Parent), Current(Current) {}
explicit const_set_bits_iterator_impl(const BitVectorT &Parent)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146232.506879.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/1be2c38c/attachment.bin>
More information about the llvm-commits
mailing list