title: C++ multimap with range-based for loop iterating over equal_range: error message
body: <p>I am trying to iterate over an equal_range of a multimap using a range-based for loop. I'm imitating code I've seen posted, but getting an error.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;map&gt;
  
  int main() {
      std::multimap&lt;const unsigned long, const std::string&gt; colors;
  
      colors.insert({2UL, "red"});
      colors.insert({2UL, "orange"});
      colors.insert({3UL, "yellow"});
      colors.insert({4UL, "green"});
      colors.insert({4UL, "blue"});
      colors.insert({5UL, "violet"});
  
      for (const auto &amp;it : colors.equal_range(4UL)) {
          std::cout &lt;&lt; "    " &lt;&lt; it.second &lt;&lt; std::endl;
      }
  }
  </code></pre>
  
  <p>Here's what happens when compiling:</p>
  
  <pre><code>g++ --version
  g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  
  g++ 
  $g++ -o foo foo.cc
  foo.cc: In function ‘int main()’:
  foo.cc:14:49: error: no matching function for call to 
  ‘begin(std::pair&lt;std::_Rb_tree_iterator&lt;std::pair&lt;const long unsigned int, const std::__cxx11::basic_string&lt;char&gt; &gt; &gt;, std::_Rb_tree_iterator&lt;std::pair&lt;const long unsigned int, const std::__cxx11::basic_string&lt;char&gt; &gt; &gt; &gt;&amp;)’
   for (const auto &amp;it : colors.equal_range(4UL)) {
  </code></pre>
  
  <p>The last time I used C++ was before C++11. What am I doing wrong?</p>