title: How can I use lambda for container comparison operator ?
body: <p>This is how I would use inbuilt function or new class as a custom comparator</p>
  
  <pre><code>priority_queue&lt; int, vector&lt;int&gt;, greater&lt;int&gt; &gt; third (myints,myints+4);
  
    // using mycomparison:
    priority_queue&lt; int, vector&lt;int&gt;, mycomparison &gt; q1;
  class mycomparison
  { 
  public: 
    bool operator() (const int&amp; lhs, const int&amp;rhs) const
    {
       return (lhs&lt;rhs);
    }
  };
    typedef priority_queue&lt;int,vector&lt;int&gt;,mycomparison&gt; q2;
  </code></pre>
  
  <p>But I wonder if I can use lambda functions there ..</p>