Created on 2012-12-03.00:00:00 last changed 121 months ago
[Moved to DR at the September, 2013 meeting.]
Proposed resolution (June, 2013):
Change 13.4.4 [temp.arg.template] paragraph 3 as follows:
A template-argument matches a template template-parameter (call it P) when each of the template parameters in the template-parameter-list of the template-argument's corresponding class template or alias template (call it A) matches the corresponding template parameter in the template-parameter-list of P. Two template parameters match if they are of the same kind (type, non-type, template), for non-type template-parameters, their types are equivalent (13.7.7.2 [temp.over.link]), and for template template-parameters, each of their corresponding template-parameters matches, recursively. When P's template-parameter-list contains a template parameter pack...
According to 13.4.4 [temp.arg.template] paragraph 3,
A template-argument matches a template template-parameter (call it P) when each of the template parameters in the template-parameter-list of the template-argument's corresponding class template or alias template (call it A) matches the corresponding template parameter in the template-parameter-list of P.
There does not appear to be a formal definition of the criteria for whether two template parameters “match,” however, and there is implementation variance in the treatment of an example like
struct A {
typedef int T1;
typedef int T2;
};
template<template<typename T, typename T::T1 N> class U>
struct B {
U<A, 0> u;
};
template<typename T, typename T::T2 N>
struct C {
};
B<C> b; // ok?
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-11-24 00:00:00 | admin | set | status: drwp -> c++14 |
2014-03-03 00:00:00 | admin | set | status: dr -> drwp |
2013-10-14 00:00:00 | admin | set | messages: + msg4700 |
2013-10-14 00:00:00 | admin | set | status: tentatively ready -> dr |
2013-09-03 00:00:00 | admin | set | messages: + msg4467 |
2013-09-03 00:00:00 | admin | set | status: drafting -> tentatively ready |
2013-05-03 00:00:00 | admin | set | status: open -> drafting |
2012-12-03 00:00:00 | admin | create |