Is Boost.Tuple compatible with C++0x variadic templates ?
- by Thomas Petit
Hi,
I was playing around with variadic templates (gcc 4.5) and hit this problem :
template <typename... Args>
boost::tuple<Args...>
my_make_tuple(Args... args)
{
return boost::tuple<Args...>(args...);
}
int main (void)
{
boost::tuple<int, char> t = my_make_tuple(8, 'c');
}
GCC error message :
sorry, unimplemented: cannot expand 'Arg ...' into a fixed-length argument list
In function 'int my_make_tuple(Arg ...)'
If I replace every occurrence of boost::tuple by std::tuple, it compiles fine.
Is there a problem in boost tuple implementation ? Or is this a gcc bug ?
I must stick with Boost.Tuple for now. Do you know any workaround ?
Thanks.