cplusplus / cplusplus/draft

[temp.dep.expr] p3 How an id-expression that is a template-id is dependent?

Open
#5,480 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

[temp.dep.expr] p3 says

An id-expression is type-dependent if it is a template-id that is not a concept-id and is dependent;

Presumably, the "dependent" might mean type-dependent or/and value-dependent. However, whether an id-expression that is a template-id is type-dependent or not is being specified in this subclause. The value-dependent also cross-references to [temp.dep.expr]. [temp.dep.general] p1 just says an expression is either type-dependent or value-dependent with the reference to [temp.dep.expr] and [temp.dep.constexpr]. So, whether an id-expression that is a template-id is type-dependent or value-dependent is not clearly specified in their respect subclauses.

We should clearly define how a template-id is type-dependent in [temp.dep.expr] and how it is value-dependent in [temp.dep.expr] to avoid the circular reference without clarifying anything.

Unlike the clear definition of whether a concept-id is value-dependent in [temp.dep.expr]

An id-expression is value-dependent if:

  • it is a concept-id and any of its arguments are dependent,

We do not have a clear definition for how a template-id is type-dependent. We should specify the relevant rule for template-id , which might be

An id-expression is type-dependent if it is a template-id that is not a concept-id and

  • the terminal name of the template-id is dependent, or
  • any of its template-arguments is dependent.

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 with [temp.dep.expr] p3 and compare its template-id wording with the concept-id rule, then trace the references to [temp.dep.general] p1 and [temp.dep.constexpr]. The change is complete when type- and value-dependence for template-ids is stated without circular or ambiguous references.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, tex
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.