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 a57d53c commit fbf514cCopy full SHA for fbf514c
src/util/range.h
@@ -341,6 +341,18 @@ 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
+ void drop(std::size_t count)
347
+ {
348
+ std::size_t i = 0;
349
+ while(i < count && begin_value != end_value)
350
351
+ ++begin_value;
352
+ ++i;
353
+ }
354
355
+
356
iteratort begin() const
357
{
358
return begin_value;
0 commit comments