On 05/08/14 12:30, Dominik Charousset wrote: [snip]
[3] https://github.com/Neverlord/boost.actor/blob/a0cab41e2946df7d751c59dfead0c2...
https://github.com/Neverlord/boost.actor/blob/a0cab41e2946df7d751c59dfead0c2... uses a recursive call using a List<typename ...Ts> which is 1 shorter than the argument list, List<T0, Ts...>. Why not just pass sizeof...(T0, Ts...): http://en.cppreference.com/w/cpp/language/sizeof... and keep adding indices while decreasing this sizeof value, as done here: http://svn.boost.org/svn/boost/sandbox/variadic_templates/boost/mpl/package_... in the package_range_c template class where: Start value would be 0 and Finish value would be sizeof...(T0, Ts...) It achieves the same result, but without producing unneeded instantiations. For example: package_range_c<std::size_t,0,sizeof...(mpl::vector<T0,T2,T3>>::type package_range_c<std::size_t,0,sizeof...(mpl::vector<S0,S2,S3>>::type would produce 1 instantiation of: package_range_c<std::size_t,0,3> whereas the int_list.hpp code would, IIUC, produce the same instantiations for the T's as well as the S's. -regards, Larry