title: Using `std::min` as an algorithm parameter
body: <p>So I ran into this problem: I need to replace every element of the <code>std::vector&lt;int&gt;</code> with the minimum of whatever came before it (inclusive).  </p>
  
  <p>Naturally <code>std::partial_sum</code> comes to mind - if I could pass <code>std::min</code> as the <code>BinaryOp</code>, it would do the job.  </p>
  
  <p>Well turns out I can't do that because <code>std::min&lt;int&gt;</code> is an overloaded function - it works for both <code>int</code> and <code>initializer_list&lt;int&gt;</code> and <code>partial_sum</code> template can't be instantiated with the unknown type.  </p>
  
  <p>Usually this is resolved by having a class with a templated <code>operator()</code>, like <code>std::plus&lt;void&gt;</code> etc, but standard library doesn't seem to have one for <code>min</code> and <code>max</code>.  </p>
  
  <p>I feel like I either have to implement my own <code>T min&lt;T&gt;(T,T)</code>, which will be an exact clone of <code>std::min</code> with the exception of not having an <code>initializer_list</code> overload, or to implement my own <code>class min</code> akin to <code>std::plus</code>. Both feel kinda wrong because one would expect standard library to have such a basic thing, and also basic things are often tricky to implement:)  </p>
  
  <p>So here are my questions:  </p>
  
  <ol>
  <li>Is there any <strong>proper</strong> way to solve the problem in question? i.e. without introducing new vague constructs/writing more than a couple of lines of code.</li>
  <li>Is it correct to assume that this became a problem in C++11, after <code>initializer_list</code> overload of <code>min</code> was introduced? So C++11 broke the code that relied on explicitly instantiated <code>std::min</code>?</li>
  </ol>
  
  <p>Thank you!</p>