Created on 2013-08-14.00:00:00 last changed 122 months ago
[Moved to DR at the February, 2014 meeting.]
Proposed resolution (November, 2013):
Change 13.8.3.3 [temp.dep.expr] paragraph 3 as follows:
An id-expression is type-dependent if it contains
an identifier associated by name lookup with one or more declarations declared with a dependent type,
an identifier associated by name lookup with one or more declarations of member functions of the current instantiation declared with a return type that contains a placeholder type (9.2.9.7 [dcl.spec.auto]),
a template-id that is dependent,
a conversion-function-id that specifies a dependent type, or
a nested-name-specifier or a qualified-id that names a member of an unknown specialization;
or if it names a dependent member...
Since we don't deduce the return type of a function temploid until it is instantiated, it seems that a call to such a function as a member of the current instantiation must have a dependent type, but 13.8.3.3 [temp.dep.expr] doesn't appear to say that. For example:
template<typename T> struct X { typedef int type; }; template<typename T> struct S { auto f() { return 0; } void g() { X<decltype(f())>::type x; // typename presumably needed here } }
Presumably there should be a bullet in 13.8.3.2 [temp.dep.type] paragraph 8 for this case.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-11-24 00:00:00 | admin | set | status: dr -> c++14 |
2014-03-03 00:00:00 | admin | set | messages: + msg4967 |
2014-03-03 00:00:00 | admin | set | status: tentatively ready -> dr |
2014-01-20 00:00:00 | admin | set | messages: + msg4739 |
2014-01-20 00:00:00 | admin | set | status: drafting -> tentatively ready |
2013-10-14 00:00:00 | admin | set | status: open -> drafting |
2013-08-14 00:00:00 | admin | create |