Created on 2015-10-06.00:00:00 last changed 94 months ago
Rationale (March, 2016):
There is no problem with the specification, only with the implementations; the default argument for n is dependent because V has a dependent type.
Consider the following example:
template<typename T, T V, int n = sizeof(V)> using X = int[n]; template<typename T> void f(X<T, 0>*) {} void g() { f<char>(0); }
Current implementations get confused here because they substitute V=0 into the default argument of X before knowing the type T and end up with f having type void (int (*)[sizeof(0)]), that is, the array bound does not depend on T. It's not clear what should happen here.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | messages: + msg5991 |
2017-02-06 00:00:00 | admin | set | status: open -> nad |
2015-10-06 00:00:00 | admin | create |