Vote count:
0
How should I give template template argument(s) to class S below?
#include "tuple"
template<
class C1,
template<class... C3> class C2,
class... C3/*,
template<class... C5> class C4,
class... C5*/
> struct S {};
int main() {
S<
int,
std::tuple<int, char>/*,
std::tuple<double>*/
> s;
return 0;
}
GCC 4.8.3 complains:
expected a class template, got 'std::tuple<int, char>'
What should I use instead of tuple? S has to know C3 in its operator() but I can't give C3 there because boost::mpl::for_each expects a specific signature for operator(). Previously I've handled this by giving tuple<int, char>() as a regular argument to deduce the templates but that doesn't seem possible here.
asked 2 mins ago
How to give template template arguments to class
Aucun commentaire:
Enregistrer un commentaire