title: std::vector as a template function argument
body: <p>I want to make a class method that takes a std::vector reference as an argument and I want to use it with different types of data.</p>
  
  <p>The function should look like:
  </p>
  
  <pre><code>void some_function(const std::vector &amp; vect){ //do something with vector }
  </code></pre>
  
  <p>and I want use it with for example:</p>
  
  <pre><code>std::vector&lt;int&gt; v1;
  some_function(v1);
  std::vector&lt;string&gt; v2;
  some_function(v2);
  </code></pre>
  
  <p>I hope that I made my point clear.
  Do I have to make a template method like that:</p>
  
  <pre><code>template&lt;class T&gt;
  void some_function(std::vector&lt;T&gt; &amp; vect){}
  </code></pre>
  
  <p>or can I do it in another way? If I have to, please tell me how I can write that method in a class.</p>
  
  <p>Thanks for help!</p>