title: Why do I have to always specify the range in STL's algorithm functions explicitly, even if I want to work on the whole container?
body: <p>When using STL's functions like <a href="http://en.cppreference.com/w/cpp/algorithm/sort"><code>sort()</code></a> or <a href="http://en.cppreference.com/w/cpp/algorithm/min_element"><code>min_element()</code></a> I always have to specify the range by begin and end explicitly:</p>
  
  <pre><code>void range_example()
  {
      std::vector&lt;int&gt; list = {7, 3, 9, 1, 5, 2};
      auto found_element = std::min_element(list.begin(), list.end());
      std::cout &lt;&lt; *found_element &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>This makes sense if I intend to work only on part of my container, but more often I need the functions to work on the whole container. Is there a reason why there isn't an overloaded function that allows for this:</p>
  
  <pre><code>std::vector&lt;int&gt; list = {7, 3, 9, 1, 5, 2};
  auto found_element = std::min_element(list);
  </code></pre>
  
  <p>Is there a way to accomplish a function call for the total range of a container that I have overlooked?</p>
  
  <p><strong>EDIT:</strong> I'm aware that I can encapsulate that in a function myself, but because this must be done for all functions I'd like to avoid that if there is a better way.</p>