Skip to content

Commit

Permalink
Remove explicit constraint on the iterator ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicYYY committed Aug 21, 2024
1 parent b910ab4 commit 6f84492
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cpp/roaring64map.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,9 @@ class Roaring64Map {

/**
* Used to go through the set bits. Not optimally fast, but convenient.
*
* strongly recommend not to implicitly construct this iterator:
* implicit construction may be prohibited in the future.
*/
class Roaring64MapSetBitBiDirectionalIterator {
public:
Expand All @@ -1718,8 +1721,8 @@ class Roaring64MapSetBitBiDirectionalIterator {
typedef int64_t difference_type;
typedef Roaring64MapSetBitBiDirectionalIterator type_of_iterator;

explicit Roaring64MapSetBitBiDirectionalIterator(const Roaring64Map &parent,
bool exhausted = false)
Roaring64MapSetBitBiDirectionalIterator(const Roaring64Map &parent,
bool exhausted = false)
: p(&parent.roarings) {
if (exhausted || parent.roarings.empty()) {
map_iter = p->cend();
Expand Down

0 comments on commit 6f84492

Please sign in to comment.