title: How to avoid a "template template template" template in c++
body: <p>I have tried to implement a "template template template" - template class to fullfill my needs ( I am quite new in using template metaprogramming). Unfortunately, I have found the following topic too late: 
  <a href="https://stackoverflow.com/questions/6484484/template-template-parameters">Template Template Parameters</a></p>
  
  <p>Nevertheless, I need to implement something like listed below. </p>
  
  <p>According to the compiler the last typedef is not working. I am not sure, but I think this is due to the limitation of 3x template restriction. Is there any possibility to bypass a 3xtemplate definition in this simple example?</p>
  
  <pre><code>template &lt; typename TValueType &gt;
  class ITTranslator
  {
  public:
      ITTranslator() = 0;
      virtual ~ITTranslator() = 0;
      virtual void doSomething() = 0;
  }
  
  template &lt; typename TValueType &gt;
  class TConcreteTranslator1 : public ITTranslator&lt;TValueType&gt;
  {
  public:
      TConcreteTranslator1(){}
      ~TConcreteTranslator1(){}
      void doSomething() {}
  }
  
  template &lt; typename TValueType &gt;
  class TConcreteTranslator2 : public ITTranslator&lt;TValueType&gt;
  {
  public:
      TConcreteTranslator2(){}
      ~TConcreteTranslator2(){}
      void doSomething() {}
  }
  
  template &lt; 
      typename TValueType, 
      template &lt; typename TValueType &gt; class TTranslatorValueType 
      &gt;
  class ITClassifier
  {
  public:
      ITClassifier() = 0;
      virtual ~ITClassifier() = 0;
  }
  
  template &lt; 
      typename TValueType, 
      template &lt; typename TValueType &gt; class TTranslatorValueType 
      &gt;
  class TConcreteClassifier1 : public ITClassifier&lt;TValueType,TTranslatorValueType &gt;
  {
  public:
      TConcreteClassifier1() {}
      ~TConcreteClassifier1() {}
      void dodo(){}
  }
  
  
  template &lt; 
      typename TValueType,
      template &lt;typename TValueType&gt; class TTranslatorValueType,
      template &lt;template&lt;typename TValueType&gt; class TTranslatorValueType&gt; class TClassifierValueType
   &gt;
  class ITAlgorithm
  {
  public:
      ITAlgorithm()=0;
      virtual ~TAlgorithm()=0;
      virtual run() = 0;
  }
  
  
  template &lt; 
      typename TValueType,
      template &lt;typename TValueType&gt; class TTranslatorValueType,
      template &lt;template&lt;typename TValueType&gt; class TTranslatorValueType&gt; class TClassifierValueType
   &gt;
  class TConcreteAlgorithm1 : public ITAlgorithm&lt;TValueType,TTranslatorValueType,TTranslatorValueType&gt;
  {
  public:
      TConcreteAlgorithm1 (){}
      ~TConcreteAlgorithm1 (){}
      run()
      {
          TClassifierValueType&lt; TTranslatorValueType&gt;* l_classifier_pt = new TClassifierValueType&lt; TTranslatorValueType&gt;( );
          // add this object to a internal list...
      }
  }
  
  
  
  int main()
  {
      typedef TConcreteTranslator1&lt; cvbase::uint32_t &gt; translator_t;
      typedef TConcreteClassifier1&lt; cvbase::uint32_t, TConcreteTranslator1&gt; classifier_t;
      typedef TConcreteAlgorithm1 &lt; cvbase::uint32_t, TConcreteTranslator1, TConcreteClassifier1&gt; algorithm_t; // not possible
      return 0;
  }
  </code></pre>
  
  <p>Thanks a lot, I really appreciate any help!</p>
  
  <p>EDIT:
  I have extended my listing (I am pretty sure it will not compile :)) to show the motivation why I am using my weird concept :)</p>