This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


1737. Type dependence of call to a member of the current instantiation

Section:  [temp.dep.type]     Status: C++14     Submitter: Richard Smith     Date: 2013-08-14

[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 [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 [temp.dep.type] paragraph 8 for this case.

Proposed resolution (November, 2013):

Change [temp.dep.expr] paragraph 3 as follows:

An id-expression is type-dependent if it contains

or if it names a dependent member...