Skip to content

Commit 99c2e42

Browse files
Document skip and drop differences
They have similarity so its worth documenting what is different about them.
1 parent 48a313f commit 99c2e42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/range.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ struct ranget final
343343

344344
/// Drop the first \p count elements.
345345
/// If the range has fewer elements, drops everything.
346+
/// Similar to \ref skip but modifies the range in-place.
346347
void drop(std::size_t count)
347348
{
348349
std::size_t i = 0;
@@ -356,6 +357,7 @@ struct ranget final
356357
/// Return an new range containing the same elements except for the first
357358
/// \p count elements.
358359
/// If the range has fewer elements, returns an empty range.
360+
/// Similar to \ref drop but returns a new range object.
359361
ranget<iteratort> skip(std::size_t count) const
360362
{
361363
ranget<iteratort> skip_range{begin(), end()};

0 commit comments

Comments
 (0)