title: The reason of using `std::greater` for creating min heap via `priority_queue`
body: <p>I am wondering why for creating a min heap using the <code>priority_queue</code>, the <code>std::greater</code> should be used?</p>
  
  <pre><code>std::priority_queue&lt;T, std::vector&lt;T&gt;, std::greater&lt;T&gt; &gt; min_heap;
  </code></pre>
  
  <p>To me, since the smallest value is always located at the top of the heap, the employed class should be <code>std::less</code></p>
  
  <p><strong>Update:</strong>
  On the other hand, since the default behavior of <code>priority_queue</code> (max heap) is to hold the greatest value at the top, it looks to me that the <code>std::greater</code> should be used for the max heap creation and not for min heap creation</p>