ORNL / ORNL/cpp-proposals-pub

P0009: LWG feedback 2022/06/24

Open
#273 0 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

P0009

Class mdspan
  • (not a change) Leave mdspan's is_(always_)contiguous(), is_(always_)strided() and is_(always_)unique() etc. as they are; don't make them noexcept. (Implementations could make them conditionally noexcept on the mapping.)

  • [mdspan.mdspan.overview] (above mdspan()): 3.1 and 3.2 need to become a new paragraph that is outside Mandates. (Those are not checkable as Mandates.)

  • (not a change) Tomasz proposed wording to support default construction of mdspan with all static extents, but we don't have to do it. "extents.static_extent(i) is equal to either 0 or dynamic_extent for at least one i in range [0, rank())"

  • [mdspan.mdspan.ctor]: 15 does not initialize accessor; same as 12.

  • (not a change) [mdspan.mdspan.members]: (no change, just for later) Justification for adding empty(): size() == 0 has a precondition; empty() will not. Also, empty() might be faster.

Class extents
  • Para 8 (m(i...)): "less than numeric_limits<size_t>::max() -> "less than or equal to numeric_limits<size_t>::max()"

P2599R2 (change SizeType to IndexType)

  • (not needed) Delete third bullet in second change set, since redundant.

P2604R0 (rename pointer and contiguous)

(no changes)

P2613 (add empty to mdspan)

  • "Effects: Equivalent to size() == 0" defeats the purpose of this function. Should say, returns true if ... is empty / has size zero, else .... (Wording is wrong, will need to go through review.) "Returns: true if size of multidimensional index space extents() is 0, otherwise false."

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

Start by locating the P0009, P2599R2, P2604R0, and P2613 wording in the repository and compare the affected mdspan and extents sections with the feedback here. Done means the applicable wording changes are incorporated while the items explicitly marked as no change remain unchanged; no tests or specific files are named.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.