Title
Dependency of alias template specializations
Status
drafting
Section
13.8.3.2 [temp.dep.type]
Submitter
Johannes Schaub

Created on 2011-09-04.00:00:00 last changed 146 months ago

Messages

Date: 2012-10-15.00:00:00

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.

Date: 2011-09-04.00:00:00

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

  • a simple-template-id in which either the template name is a template parameter or any of the template arguments is a dependent type or an expression that is type-dependent or value-dependent

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?

History
Date User Action Args
2012-11-03 00:00:00adminsetmessages: + msg4108
2012-11-03 00:00:00adminsetstatus: open -> drafting
2011-09-04 00:00:00admincreate