This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/69978] Invalid sizeof... value for variadic template arguments


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69978

--- Comment #2 from Ibrahim Gokhan YANIKLAR <yanikibo at yandex dot com> ---
template < class T, class U, class... TL >
void goo( T, U, TL... )
{
    std::cout << (B<T, U, TL...>::value) << std::endl;
    std::cout << (D<T, U, TL...>::value) << std::endl;
    std::cout << (C< B<T, U, TL...> >::type::value << std::endl;
}

int main()
{
    goo(10, 20, 30, 40, 50);
}

//-----------------------
// output(g++4.7):
//-----------------------
// 3
// 3
// 3

//-----------------------
// output(g++4.8-g++5.2):
//-----------------------
// 5
// 5
// 3

//-----------------------
// output(correct)
//-----------------------
// 5
// 5
// 5

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]