title: Error push back reference to elements of const vector
body: <p>Please consider the following:</p>
  
  <pre><code>// from main file
  
  // first arguement gets enc_array
  Rock rock (voice.getEncArray());
  // getEncArray() gets a vector of vectors:
  // std::vector&lt;std::vector&lt;unsigned int&gt; &gt; enc_array;
  
  // in rock.hpp file, consider members
  Rock( const std::vector&lt;std::vector&lt;unsigned int&gt; &gt; &amp;);
  
  std::vector&lt;std::vector&lt;unsigned int&gt; * &gt; remaining;
  
  const std::vector&lt;std::vector&lt;unsigned int&gt; &gt; * population;
  
  // in rock.cpp
  Rock::Rock ( const vector&lt;vector&lt;unsigned int&gt; &gt; &amp; v) :
    population (&amp;v),
    ....
  
  // in one of the class member functions
  for ( vector&lt;vector&lt;unsigned int&gt; &gt;::const_iterator ci = population-&gt;begin(); ci != population-&gt;end(); ++ci ) {
      // for some indexes...
      remaining.push_back (&amp; (*ci));      // &lt;------  PROBLEM
  }
  </code></pre>
  
  <p>gcc reports:</p>
  
  <pre><code>error: no matching function for call to 'std::vector&lt;std::vector&lt;unsigned int&gt;*&gt;::push_back(const std::vector&lt;unsigned int&gt;*)'
  
  note: void std::vector&lt;_Tp, _Alloc&gt;::push_back(const value_type&amp;) [with _Tp = std::vector&lt;unsigned int&gt;*; _Alloc = std::allocator&lt;std::vector&lt;unsigned int&gt;*&gt;; std::vector&lt;_Tp, _Alloc&gt;::value_type = std::vector&lt;unsigned int&gt;*] &lt;near match&gt;
  
  note:   no known conversion for argument 1 from 'const std::vector&lt;unsigned int&gt;*' to 'std::vector&lt;unsigned int&gt;* const&amp;'
  </code></pre>
  
  <p>I understand that I'm trying to push the addresses of <code>vector&lt;int&gt;</code> that were considered <code>const</code> to a non-const <code>vector</code>.
  After <code>remaining</code> is filled-up, no other method will change its data, so in fact it should be <code>const</code>.
  But I cannot declare <code>remaining</code> as a <code>const vector</code>, as it would give an error.</p>
  
  <pre><code>error: no matching function for call to 'std::vector&lt;std::vector&lt;unsigned int&gt;*&gt;::push_back(const std::vector&lt;unsigned int&gt;*) const'
  
  note: candidate is:
  note: void std::vector&lt;_Tp, _Alloc&gt;::push_back(const value_type&amp;) [with _Tp = std::vector&lt;unsigned int&gt;*; _Alloc = std::allocator&lt;std::vector&lt;unsigned int&gt;*&gt;; std::vector&lt;_Tp, _Alloc&gt;::value_type = std::vector&lt;unsigned int&gt;*] &lt;near match&gt;
  
  note:   no known conversion for argument 1 from 'const std::vector&lt;unsigned int&gt;*' to 'std::vector&lt;unsigned int&gt;* const&amp;'
  </code></pre>
  
  <p>Do I really need to copy elements from <code>population</code> to <code>remaining</code>? Or is there anything else I can do in order not to have this overhead?</p>