title: "no type named 'const_reference' " error when implementing a string-like class
body: <p>I'm trying to implement a class with similar behavior to std::string and I'm getting the error in the std::copy line:</p>
  
  <pre><code>Str&amp; operator+=(const Str&amp; s){
      std::copy(s.data.begin(), s.data.end(), std::back_inserter(data));
      return *this;
  }
  </code></pre>
  
  <p>'data' is an object of type vec &lt; char> , and vec is a vector-like class that I implemented myself and it seems to be working fine on its own.</p>
  
  <p>It also says this:</p>
  
  <p>C:\MinGW\bin..\lib\gcc\mingw32\3.4.2........\include\c++\3.4.2\bits\stl_iterator.h||In instantiation of `std::back_insert_iterator &lt; vec&lt; char> >':|</p>