title: Sort std::vector<myclass> in one line using sort function from STL
body: <p>Question is about sorting <code>std::vector&lt;myclass&gt;</code> using function <code>sort</code> from STL's algorithms class.<br>
  Standard way is : <code>sort(v.begin(), v.end(), &amp;myfunct)</code><br>
  where <code>myfunct</code> is:</p>
  
  <pre><code>bool myfunct( myclass first, myclass second ) {   
      if (first.value &lt; second.value)   
          return true;   
      else return false;   
  }
  </code></pre>
  
  <p>Approach above takes more than one line. I am curious how to do it in one line. Is it possible define function that compares myclass objects inside sort function? May be somehow use this <code>(a &lt; b) ? a : b</code>. I remember that there is something like this in C#, but I forgot how is it called. Is it possible to do in C++.</p>