相关疑难解决方法(0)

'X不是模板'错误

我在声明模板类时遇到问题.我尝试了一些不易读和非感性的组合.

template <class C, class M >
class BlockCipherGenerator : public KeyGenerator
{
  ...
  private:
      M < C > m_cipher;
};
Run Code Online (Sandbox Code Playgroud)

template <class C, class M >
class BlockCipherGenerator : public KeyGenerator
{
  typedef typename C::value_type CIPHER;
  typedef typename M::value_type MODE;
  private:
      MODE < CIPHER > m_cipher;
};
Run Code Online (Sandbox Code Playgroud)

c++ gcc templates

28
推荐指数
1
解决办法
3万
查看次数

标签 统计

c++ ×1

gcc ×1

templates ×1