Created on 2010-02-03.00:00:00 last changed 28 months ago
Additional note (February, 2011):
The resolution of this issue can't simply replace the word “definition” with the word “declaration,” mutatis mutandis, because there can be multiple declarations in a translation unit (which isn't true of “the definition”). As a result, the issue was moved back to "open" status for further consideration.
[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]
The current wording of 13.8.4 [temp.dep.res] seems to assume that dependent names can only appear in the definition of a template:
In resolving dependent names, names from the following sources are considered:
Declarations that are visible at the point of definition of the template.
Declarations from namespaces associated with the types of the function arguments both from the instantiation context (13.8.4.1 [temp.point]) and from the definition context.
However, dependent names can occur in non-defining declarations of the template as well; for instance,
template<typename T> T foo(T, decltype(bar(T())));
bar needs to be looked up, even though there is no definition of foo in the translation unit.
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: open -> accepted |
2011-02-28 00:00:00 | admin | set | messages: + msg3266 |
2011-02-28 00:00:00 | admin | set | status: drafting -> open |
2010-08-23 00:00:00 | admin | set | status: open -> drafting |
2010-02-03 00:00:00 | admin | create |