I have a function template with a variadic number of template parameters:
template <typename T1, typename... Ts>
void doSomething()
{
...
}
Furthermore I have an mpl set defined as follows:
template <typename... Ts>
struct MyContainerCreator
{
using type = boost::mpl::set<Ts...>;
};
using MyContainer= MyContainerCreator<T1, T2>;
Now I want to write a function doSomethingForAll() that calls doSomething() with the types in the mpl set as template parameters. Something like:
void doSomethingForAll()
{
//pseudocode:
doSomething<expandTypesToTemplateParameters<MyContainer::type>>();
}
Is this possible?
Aucun commentaire:
Enregistrer un commentaire