Created on 2012-03-10.00:00:00 last changed 27 months ago
[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]
According to 13.3 [temp.names] paragraph 4,
When the name of a member template specialization appears after . or -> in a postfix-expression or after a nested-name-specifier in a qualified-id, and the object expression of the postfix-expression is type-dependent or the nested-name-specifier in the qualified-id refers to a dependent type, but the name is not a member of the current instantiation (13.8.3.2 [temp.dep.type]), the member template name must be prefixed by the keyword template.
In other words, the template keyword is only required when forming a template-id. However, current compilers reject an example like:
template<typename T, template<typename> class U = T::X> struct A;
and require the template keyword before X. Should the rule be amended to require the template keyword in cases like this?
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: drwp -> cd6 |
2021-02-24 00:00:00 | admin | set | status: accepted -> drwp |
2020-12-15 00:00:00 | admin | set | status: drafting -> accepted |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-03-10 00:00:00 | admin | create |