title: declaring an STL container to store a variable of a template type
body: <p>I have a class which has a member <code>args</code> which stores a <code>std::string</code> and a <code>std::type_index</code>.</p>
  
  <p>A template function <code>setArgument()</code> adds the name of an attribute and its <code>typeid</code> to <code>args</code>. </p>
  
  <pre><code>class OperationEntry:
  {
      std::vector&lt;std::pair&lt;std::string, std::type_index&gt;&gt; args;
  
      template &lt;class AttrType&gt;
      inline OperationEntry&amp; setArgument(const std::string&amp; name)
      {
          args_.push_back({name, typeid(AttrType)});
          return *this;
  
      }
  </code></pre>
  
  <p>I want to extend the definition of <code>args</code> to be an <code>std::tuple</code> and hold an additional value which will be populated in <code>setArgument()</code>. However the type of the
  value is the template type <code>AttrType</code>. </p>
  
  <p>My question is how do I declare <code>args</code> to store this template type as I don't know in advance the type' ? </p>
  
  <p>for example - <code>std::vector&lt;std::tuple&lt;std::string, std::type_index, AttrType&gt;&gt; args;</code></p>
  
  <p>for example <code>setArgument()</code> could add </p>
  
  <pre><code>"alpha", f, 3.3
  "beta", i, 3
  </code></pre>