P0009: LWG small group review 2022/06/21
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 29
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
@crtrott @dalg24 @nliber
-
Adding
empty()(see PR #262) will require an LEWG paper or NB comment -
noexceptadditions (see PR #262) are OK (?) -
extents(const array&)andextents(span)constructors: RenameSizeType(local) template parameter toOtherSizeType, to prevent shadowing class template parameter -
Change "integral type other than
bool" to "a signed or unsigned integer type" (to exclude character types) -
"is a representable value of type
SizeType" -> "is representable as a value of typeSizeType(2.2, above [mdspan.extents.helpers] -- also update every instance, e.g., [mdspan.extents.ctor] 2.2) (justification: it's not of typeSizeType; it's of some other type) -
para 9, below
extents(const array&): "Preconditions: ..." line is duplicated. -
para 9.2, below
extents(const array&): Could remove the N is zero subcase, as it's redundant. -
para 11:
extents(Integrals...)deduction guide: changesize_typetosize_t(justification: the class doesn't exist yet, sosize_typedoesn't exist) -
[mdspan.layout.reqmts]: for layout mapping
operator(), we also need to say that this is less than or equal tosize_tmax, becausesize_typecould be (e.g.,)__int128and bigger thansize_t. -
(Note on [mdspan.layout.reqmts]: Use of "Result" vs. "Returns" not consistent, but not bad to leave it.)
-
[mdspan.layoutleft.ctor]: para 3 (actually should be 4): change "Preconditions" to "Precondition" (as there is only one precondition); also fix paragraph numbering (three paragraph 3s in this section)
-
[mdspan.layoutleft.obs]: Para 3 (Preconditions on
operator()(Indices... i)): It's just one Precondition, andextents_should be code font, not italics. -
[mdspan.layoutright]: generally apply above
mdspan.layoutleft.*changes to corresponding paragraphs -
[mdspan.layoutstride]: In synopsis and
mapping(const extents_type&, span<SizeType, rank_>), etc.: useOtherSizeTypeinstead ofSizeTypefor consistency -
[mdspan.layoutstride]: Change
constexpr span<const size_type, rank_> strides()to returnarray(by value) instead ofspan, as it was in R16. -
[mdspan.layoutstride.ctor]: Change
SizeTypetoOtherSizeType(see above synopsis notes). -
[mdspan.layoutstride.obs]:
operator(): This wording forbids implementations from detecting out-of-bounds access for integer-like types, because it juststatic_casts tosize_type. It needs tostatic_castin order to support custom (class type) index types. Apply to this and to all layouts:num-cast<size_type>(i)isiifremove_cvref_t<decltype(i)>is an integer-like type, otherwisestatic_cast<size_type>(i). -
mdspan(CArray&)deduction guide: add spaces around==to avoid>==being considered as a single token. -
mdspan(Pointer&)deduction guide: Look again at whether we need lvalue reference; why do we forbid rvalue reference? Do temporary pointers work? Add a test that takesstd::move(CArray)orstd::move(Pointer). -
[mdspan.mdspan.members] para 2 and para 6 (
operator[]): The samestatic_cast<size_type>(std::move(indices))as above; use abovenum-castwording. Move "LetPbe a parameter pack" up sooner, so you can apply that wording. -
mdspan::size()needs to returnsize_t, notsize_type(fixed in overview already, not in description).
-
P2604R0: LWG probably won't like this non-diff form.
-
P2604R0: "two uses of contiguous in prose text in notes will be replaced"
- P2599R1: For additions (not renaming), need to see proper diffs against the paper reviewed in this meeting (R17).
Contributor guide
No contributing guide indexed for this repository
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
Begin by comparing the R17 paper with PR #262, then review the listed [mdspan] sections and the P2604R0 and P2599R1 notes. Done means resolving the open design questions, applying the requested wording and consistency changes, and producing proper diffs against the reviewed paper.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100