cplusplus / cplusplus/draft

[res.on.requirements] Not sufficiently clear on transitiveness and disjunctions LWG 3429

Open
#3,912 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lwg not-editorial
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

-1- A sequence Args of template arguments is said to model a concept C if Args satisfies C (13.5.2 [temp.constr.decl]) and meets all semantic requirements (if any) given in the specification of C.
-2- If the validity or meaning of a program depends on whether a sequence of template arguments models a concept, and the concept is satisfied but not modeled, the program is ill-formed, no diagnostic required.
-3- If the semantic requirements of a declaration's constraints ([structure.requirements]) are not modeled at the point of use, the program is ill-formed, no diagnostic required.

With this wording:

  • Does random_access_range<span<int>> impose any semantic requirement at all? Because its specification is only code.
  • How about viewable_range<span<int>>? Is it clear that we're only requiring transitively modeling concepts only in the first part of the disjunction which evaluates to true (so borrowed_range and not view)?
  • Is it clear that viewable_range<drop_view<span<int>>> does it the other way around?

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 reviewing the quoted [res.on.requirements] wording and its interaction with random_access_range, viewable_range, borrowed_range, view, and drop_view. Determine whether the three questions are answered unambiguously, then propose clarified standard wording and confirm that each example has the intended interpretation.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.