title: Pass a templated class instance to another class' constructor
body: <p>I am looking for a way to pass an instance of a templated class to another class.</p>
  
  <p>The context: 
  I am working with a library (that I don't want to edit for now) containing a templated class of this style:</p>
  
  <pre><code>//my templated class
  template&lt;int a, int b&gt; //non-type
  class Tclass{
     ...
  }
  </code></pre>
  
  <p>I would like to use this class in combination with another library I am currently writing myself. My library contains a class that requires an instance of the templated class. It looks somewhat like this:</p>
  
  <pre><code>//another class that I want to receive the instance of Tclass
  class A{
    private:
       Tclass _in; //I want this private variable to hold the passed instance 
    public:
      void A(const Tclass&lt;&gt; &amp; in); //constructor that receives the instance of Tclass
  }
  
  //The constructor code:
  void A(const Tclass&lt;&gt; &amp; in){
          _in = in; //assign the passed instance to a hidden variable
      }
  </code></pre>
  
  <p>My main file then would look somewhat like this:</p>
  
  <pre><code>//my main file
  int main() {
     Tclass&lt;1,5&gt; tclass; //initialize the templated class with two integers
     A a(tclass); //pass the Tclass instance to another class
     return 0;
  }
  </code></pre>
  
  <p>I saw that on the forum there are a few hints how to do so for a templated class where the variable type is templated, but in my case I have an integer that is templated.</p>
  
  <p>Thank you in advance for your ideas and help.</p>