title: c++ std::map get element with highest key below X?
body: <p>Given a C++ map (or multimap) where the key is an integer, is it possible using STL to request the range of elements whose key is the largest number below a given number?</p>
  
  <p>So if I had:</p>
  
  <pre><code>map = {{1,'x'}, {2, 'g'}, {3, 'n'}, {3, 'm'}, {4, 'z'}, {5, 'a'}}
  </code></pre>
  
  <p>and I want to find the element(s) just before 4, it would return:</p>
  
  <pre><code>{{3, 'n'}, {3, 'm'}}
  </code></pre>
  
  <p>(I'm more interested in <code>std::map</code> but kept the question general for <code>std::multimap</code> too).</p>