title: How to overload std::vector::operator=()
body: <p>I need to have assignment of type std::vector = arma::vec, i.e. to assign vector from armadillo math library to a std::vector.</p>
  
  <pre><code>template &lt;typename T&gt;
  std::vector&lt;T&gt;&amp; std::vector&lt;T&gt;::operator=(arma::vec right) {
    std::size_t s(right.size());
    this-&gt;resize(s);
    for (std::size_t i = 0; i &lt; s; i++)
      *this[i] = right(i);
    return *this;
  }
  </code></pre>
  
  <p>I tried this way, but the compiler is not agree:
  <code>error: invalid use of incomplete type ‘class std::vector&lt;_RealType&gt;’</code></p>
  
  <p>Is it possible to overload the assignment operator for std::vector class?</p>