title: Can't use function name distance
body: <p>The following code compiles fine:</p>
  
  <pre><code>#include &lt;string&gt;
  
  int dist(std::string&amp; a, std::string&amp; b) {
    return 0;
  }
  
  int main() {
    std::string a, b;
    dist(a, b);
    return 0;
  }
  </code></pre>
  
  <p>But when I rename the function from dist to distance:</p>
  
  <pre><code>#include &lt;string&gt;
  
  int distance(std::string&amp; a, std::string&amp; b) {
    return 0;
  }
  
  int main() {
    std::string a, b;
    distance(a, b);
    return 0;
  }
  </code></pre>
  
  <p>I get this error when compiling (gcc 4.2.1):</p>
  
  <pre><code>/usr/include/c++/4.2.1/bits/stl_iterator_base_types.h: In instantiation of ‘std::iterator_traits&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;’:
  b.cpp:9:   instantiated from here
  /usr/include/c++/4.2.1/bits/stl_iterator_base_types.h:129: error: no type named ‘iterator_category’ in ‘struct std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;’
  </code></pre>
  
  <p>Why can't I name the function distance?</p>