We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9468913 commit 36a2fe2Copy full SHA for 36a2fe2
src/util/range.h
@@ -341,6 +341,20 @@ struct ranget final
341
return begin_value == end_value;
342
}
343
344
+ /// Drop the first \p count elements.
345
+ /// If the range has fewer elements, drops everything.
346
+ /// \return true if the range still contains element after the drop
347
+ bool drop(std::size_t count)
348
+ {
349
+ for( ; count > 0; --count)
350
351
+ if(begin_value == end_value)
352
+ return false;
353
+ ++begin_value;
354
+ }
355
+ return begin_value != end_value;
356
357
+
358
iteratort begin() const
359
{
360
return begin_value;
0 commit comments