[Bug c++/52963] New: Missing error on pack expansion
xinliangli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 22:14:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52963
Bug #: 52963
Summary: Missing error on pack expansion
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: xinliangli@gmail.com
template <class T, class U> struct S {};
template <typename... Ts> void f(Ts...);
template <typename... Ts> struct X {
template <typename... Us> void g() {
f(S<Ts, Us>()...);
}
};
void test(X<int, float> x) {
x.g<int, float, double>();
}
/*
oscar-wilde.cpp:6:18: error: pack expansion contains parameter packs 'Ts'
and 'Us' that have different lengths (2 vs. 3)
f(S<Ts, Us>()...);
~~ ~~ ^
oscar-wilde.cpp:11:5: note: in instantiation of function template
specialization 'X<int, float>::g<int, float, double>' requested here
x.g<int, float, double>();
^
1 error generated.
*/
More information about the Gcc-bugs
mailing list