ORNL / ORNL/cpp-proposals-pub

Traditional access a[i][j]k] seems missing

Open
#60 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

follow on paper subject - mdspan (P0009)
Dominant language
HTML
Stars
29
Forks
26
PR merge metrics
No merged PRs in 30d

Description

It looks like the current proposal does not have the usual a[j][j][k] syntax.
Since it cannot be an omission :-) , what are the reasons for this absence?
It is available in std::valarray, https://www.boost.org/doc/libs/release/libs/multi_array/ and so on.
Since I have not attended many recent ISO C++ meetings about array_ref or mdspan, I do not remember this discussion.

If I understand the good honey pot of a(i,j,k)syntax for Fortran programmers, it seems strange or repulsive for C/C++ programmers. It also prevents writing generic code taking either a multidimensional C++ array or a mdspan.

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

Review the proposal context around array_ref and mdspan, then compare the requested a[i][j][k] form with std::valarray and Boost.MultiArray. Determine whether the proposal documents a rationale for the chosen syntax and whether generic code compatibility is an explicit design goal; done means a decided rationale or a clearly scoped proposal change.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.