‘X is not a template’ error

It’s what it says.

Your template parameter list says that M is a class, not a template.

If you say that it’s a class template, then everything’s fine:

template <class C, template <class C> class M>
class BlockCipherGenerator : public KeyGenerator
{
      M<C> m_cipher;
};

Remember, something like std::vector is not a class, but a class template. Something like std::vector<int> is a class (type).

Leave a Comment