ORNL / ORNL/cpp-proposals-pub

P0009: Fix mdspan.subspan definition

Open
#73 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
29
Forks
26
PR merge metrics
No merged PRs in 30d

Description

@crtrott @dsunder

  1. The code defining first, last, and R is not valid source code, because it uses a run-time value r to get the r-th entry of a parameter pack slices....
  2. R needs to be constexpr, because Ensures needs the R[k]-th entry of a parameter pack slices....
  3. We need a different notation for R, since we use that elsewhere in the document as the rank (an integer value, not an array).

I think we could define R with math instead of code. We can say in a Note that we know its length and entries at compile time. This would make it easier to define first and last in code.

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

Locate the mdspan.subspan definition in the proposal documents and read the surrounding definitions of first, last, R, and rank. Check the existing notation and the Ensures wording; the work is done when the parameter-pack indexing is described with valid compile-time notation and R is distinct from the document's rank value.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.