<range_algorithm_support.hpp>: Rework the handling of test::iterator references
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
test::ProxyRef is a scoped enumeration used to tell test::iterator what kind of reference type you'd like it to have. Before implementing join_view, test::ProxyRef::no would produce iterators with lvalue reference types, and test::ProxyRef::yes iterators that used test::proxy_reference as their reference type. To fully exercise join_view we needed to add support for prvalue reference types, so we hacked up enum class ProxyRef { no, yes, prvalue } which is completely unintuitive.
We should replace test::ProxyRef with the fully-general enum class RefStyle { lvalue, xvalue, prvalue, proxy } with what I hope are the obvious semantics.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the definitions and uses of test::ProxyRef and test::iterator, then read how the current enum values select reference types. Replace the enum and its usages with RefStyle values for lvalue, xvalue, prvalue, and proxy, and verify that the iterator test coverage still exercises the intended reference styles for join_view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100