Created on 2008-02-27.00:00:00 last changed 32 months ago
Rationale (July, 2009):
This suggestion would need a full proposal and discussion by the EWG before the CWG could consider it.
[Addressed with a different approach by paper P0846R0, adopted at the November, 2017 meeting.]
Consider the following:
namespace N {
struct A { };
template<typename T>
T func(const A&) { return T(); }
}
void f() {
N::A a;
func<int>(a); // error
}
Although argument-dependent lookup would allow N::func to be found in this call, the < is taken as a less-than operator rather than as the beginning of a template argument list. If the use of the template keyword for syntactic disambiguation were permitted for unqualified-ids, this problem could be solved by prefixing the function name with template, allowing the template-id to be parsed and argument-dependent lookup to be performed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-28 06:18:22 | admin | set | status: extension -> nad |
2009-08-03 00:00:00 | admin | set | messages: + msg2281 |
2009-08-03 00:00:00 | admin | set | status: open -> extension |
2008-02-27 00:00:00 | admin | create |