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


1390. Dependency of alias template specializations

Section: 13.8.3.2  [temp.dep.type]     Status: drafting     Submitter: Johannes Schaub     Date: 2011-09-04

According to 13.8.3.2 [temp.dep.type] paragraph 8, a type is dependent (among other things) if it is

This applies to alias template specializations, even if the resulting type does not depend on the template argument:

    struct B { typedef int type; };
    template<typename> using foo = B;
    template<typename T> void f() {
      foo<T>::type * x;  //error: typename required
    }

Is a change to the rules for cases like this warranted?

Notes from the October, 2012 meeting:

CWG agreed that no typename should be required in this case. In some ways, an alias template specialization is like the current instantiation and can be known at template definition time.