Created on 2018-12-03.00:00:00 last changed 25 months ago
The Standard is not clear, and there is implementation divergence, for an example like the following:
template<class ...Types> struct Tuple_ { // _VARIADIC_TEMPLATE
template<Types ...T, int I> int f() {
return sizeof...(Types);
}
};
int main() {
Tuple_<char,int> a;
int b = a.f<1, 2, 3>();
}
The question is whether the 3 is accepted as the argument for I or an error, exceeding the number of arguments for T, which is set as 2 by the template arguments for Tuple_. See also issue 2383 for a related example.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-25 07:27:45 | admin | set | status: open -> drafting |
2018-12-03 00:00:00 | admin | create |