This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Moved to DR at the February, 2014 meeting.]
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.
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...