Recursively unpacking a template pack for a parameter-less function
问题 I'm trying to create a struct template with a variadic template type pack, that can deduct the sum of the size of all types passed in. Below you find a simplified example, in the real-world context, the size computed is used to create further member objects. template <typename... Types> struct OverallSize { template <typename FirstType, typename... NextTypes> static constexpr size_t sizesum() { return sizeof (FirstType) + sizesum<NextTypes...>(); } template <typename LastType> static