cplusplus / cplusplus/draft

[range.chunk.by.view] Should the help function `find-next`/`find-prev` of `chunk_by_view` be `private`?

Open
#5,484 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

From [range.chunk.by.view]

namespace std::ranges {
template<forward_range V, indirect_­binary_­predicate<iterator_t<V>, iterator_t<V>> Pred>
  requires view<V> && is_object_v<Pred>
class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
  // ...

public:
  chunk_by_view() requires default_­initializable<V> && default_­initializable<Pred> = default;
  constexpr explicit chunk_by_view(V base, Pred pred);

  constexpr V base() const & requires copy_­constructible<V> { return base_; }
  constexpr V base() && { return std::move(base_); }

  constexpr const Pred& pred() const;

  constexpr iterator begin();
  constexpr auto end();

  constexpr iterator_t<V> find-next(iterator_t<V>);                 // exposition only
  constexpr iterator_t<V> find-prev(iterator_t<V>)                  // exposition only
    requires bidirectional_­range<V>;
};

Although find-next and find-prev are exposition only, is it more appropriate to move them to the private block?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked [range.chunk.by.view] specification and inspect the chunk_by_view declaration, especially the exposition-only find-next and find-prev members. Review the existing comment thread and compare the member placement with surrounding standard wording; done means the visibility question has a documented resolution and the specification reflects the agreed wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.