Is there an easy way to have variable template template options. For example, consider the following function signature
template<template<typename,size_t...> class Pack, typename T, size_t ... Args> void foo(const Pack<T,Args...>& a);
If we want to transfer two Pack , we have to do an overload
template<template<typename,size_t...> class Pack, typename T, size_t ... Args0, size_t ... Args1> void foo(const Pack<T,Args0...>& a, const Pack<T,Args1...>& b);
Now, if we want to pass a variable number of Pack objects with different variation parameters, for example. Args0...,Args1...,Args2...
So, I was wondering if there is a practical way to do something line by line (the following, of course, is a sketch view).
template<template<typename,size_t...> ... class Pack, typename T,...> void foo(const Pack<T,...> ... packs);
c ++ c ++ 11 variadic-functions variadic-templates template-templates
Tasam farkie
source share