Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmh0511 opened this issue May 20, 2022 · 0 comments
Open

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented May 20, 2022

[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.
@xmh0511 xmh0511 changed the title [temp.dep.expr] p3 How a template-id that is id-expression dependent? [temp.dep.expr] p3 How an id-expression that is a template-id is dependent? May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant