From 6f84492e168594d8cddaa23dd24e8242e3825e1d Mon Sep 17 00:00:00 2001 From: cubicYYY Date: Thu, 22 Aug 2024 04:31:41 +0800 Subject: [PATCH] Remove `explicit` constraint on the iterator ctor --- cpp/roaring64map.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cpp/roaring64map.hh b/cpp/roaring64map.hh index 73acd74a..31fcc5b1 100644 --- a/cpp/roaring64map.hh +++ b/cpp/roaring64map.hh @@ -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: @@ -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();