Skip to content

Commit 50c3841

Browse files
Document skip and drop differences
They have similarity so its worth documenting what is different about them.
1 parent 22fdaa1 commit 50c3841

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
/// \return true if the range still contains element after the drop
347348
bool drop(std::size_t count)
348349
{
@@ -358,6 +359,7 @@ struct ranget final
358359
/// Return an new range containing the same elements except for the first
359360
/// \p count elements.
360361
/// If the range has fewer elements, returns an empty range.
362+
/// Similar to \ref drop but returns a new range object.
361363
ranget<iteratort> skip(std::size_t count) const
362364
{
363365
ranget<iteratort> skip_range{begin(), end()};

0 commit comments

Comments
 (0)