title: c++11: erase using a const_iterator
body: <p>I believe that since C++11, the <code>erase</code> function of most containers (e.g. <code>std::vector</code>) accepts a <code>const_iterator</code> as parameter:</p>
  
  <pre><code>iterator erase (const_iterator position);
  </code></pre>
  
  <p>Still my compilers (GCC 4.8 and Clang 3.2, both using GCC libstdc++) won't allow me to use such function, even when compiling with <code>--std=c++11</code>.</p>
  
  <p>Is it a compiler/libstdc++ bug, or did I do something bad? This is a sample code:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  int main( )
  {
      std::vector&lt;int&gt; v;
      v.push_back( 1 );
      v.push_back( 2 );
      v.push_back( 3 );
  
      std::vector&lt;int&gt;::const_iterator i = v.begin();
      while( i != v.end() ) {
          i = v.erase( i );
      }
  
      return 0;
  }
  </code></pre>