title: use vector and push_back function with my template class with dummy business validation in vector.push_back(...) -- Can it be done with stl?
body: <p>I have a template class so idea of this <code>template</code> <code>class</code> is that I want to create vector object of type same as my template class <code>abc</code>. Can I pass int or char as <code>T</code> and use something like following</p>
  <pre><code>vector&lt;abc&lt;int&gt;&gt; g1;// &lt;&lt;-------how to do this correctly?
          g1.push_back({               //&lt;-----  looks wrong
             {{1,1,1},{2,2,2},{3,3,3}} //&lt;----- this is obvious wrong
      
          })
  </code></pre>
  <p>this is my template class</p>
  <pre><code>template &lt;typename T&gt;
  class abc: /*drived from what???*/{
  private:
      T *px=x;
      T *py=y;
      T *pz=z;
  public:
      //these members must be included
      T x[10];
      T y[10];
      T z[10];
  
  
  abc(const T _px[],T _py[],T _pz[]):x{{10}},y{{10}},z{{10}}
  {
  
  }
  
  int writeto_HW()
  {
      //member write to ...x,y,z to...  and other work
  }
  };
  
  
  int main()
  {
      vector&lt;abc&lt;int&gt;&gt; g1;// &lt;&lt;-------how to do this correctly?
      g1.push_back({               //&lt;-----  looks wrong
         {{1,1,1},{2,2,2},{3,3,3}} //&lt;----- this is obvious wrong
  
      })
      g1.push_back({{1, 2, 3, 4, 5, 6, 7, 8, 9, 10},// &lt;----wrong
                    {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
                    {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
      });
  
  
  
  
  }
  </code></pre>
  <p>is it possible? if yes then how to achieve this</p>
  <p>I don't  need any fancy <code>push_back</code> function from vector I just like to have access to inside of <code>push_back</code> code I will do some business validation on <code>class abc</code> members <code>x[],y[],z[]</code> to stl vector's <code>push_back</code>. so I need just structure what if its possible.</p>
  <p>thanks for help</p>