N
Neil Steiner
I have an enum foo, and a template class bar that requires a foo as its
parameter:
enum foo {};
template <foo F> class bar {};
I then want to define another template class that takes a foo and a
bar<foo> or subclass as its parameters:
template <foo F, template <foo F> class bar B> class dummy {};
I know that's wrong because gcc tells me so: "Expected '>' before 'B'"
I can drop the B and just require a bar<F> as the second parameter, but
I really want the B argument because the parameter could be a subclass
of bar<F>, and I need to know its type.
The mistake is probably obvious to many of you. If you could enlighten
me, I would much appreciate it.
parameter:
enum foo {};
template <foo F> class bar {};
I then want to define another template class that takes a foo and a
bar<foo> or subclass as its parameters:
template <foo F, template <foo F> class bar B> class dummy {};
I know that's wrong because gcc tells me so: "Expected '>' before 'B'"
I can drop the B and just require a bar<F> as the second parameter, but
I really want the B argument because the parameter could be a subclass
of bar<F>, and I need to know its type.
The mistake is probably obvious to many of you. If you could enlighten
me, I would much appreciate it.