Created on 2012-09-19.00:00:00 last changed 94 months ago
[Moved to DR at the November, 2014 meeting.]
Proposed resolution (February, 2014):
Add the following as a new paragraph before 13.7.8 [temp.alias] paragraph 3:
When a template-id refers to the specialization of an alias template, it is equivalent...
However, if the template-id is dependent, subsequent template argument substitution still applies to the template-id. [Example:
template<typename...> using void_t = void; template<typename T> void_t<typename T::foo> f(); f<int>(); // error, int does not have a nested type foo—end example]
The type-id in an alias template declaration shall not refer...
Notes from the October, 2012 meeting:
The consensus of CWG was to treat this case as substitution failure.
The treatment of unused arguments in an alias template specialization is not specified by the current wording of 13.7.8 [temp.alias]. For example:
#include <iostream> template <class T, class...> using first_of = T; template <class T> first_of<void, typename T::type> f(int) { std::cout << "1\n"; } template <class T> void f(...) { std::cout << "2\n"; } struct X { typedef void type; }; int main() { f<X>(0); f<int>(0); }
Is the reference to first_of<void, T::type> with T being int equivalent to simply void, or is it a substitution failure?
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: drwp -> cd4 |
2015-05-25 00:00:00 | admin | set | status: dr -> drwp |
2015-04-13 00:00:00 | admin | set | messages: + msg5411 |
2014-11-24 00:00:00 | admin | set | status: ready -> dr |
2014-03-03 00:00:00 | admin | set | messages: + msg4849 |
2014-03-03 00:00:00 | admin | set | status: drafting -> ready |
2012-11-03 00:00:00 | admin | set | messages: + msg4107 |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-09-19 00:00:00 | admin | create |