title: Error:"invalid comparator" when sorting using custom comparison function
body: <p>I am trying to sort some integers and make odd integers followed by even ones. I am using Visual Studio 2015.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>int w[]={1,2,3,4,5,6};
  sort(w,w+6,[](const int&amp;i,const int&amp;j)-&gt;bool {
  return (i&amp;1)==(j&amp;1)//When both are odd or even, the order is OK
  ||i&amp;1;//if one is odd and one is even,check if the first one is odd
  });
  </code></pre>
  
  <p>When executed, it encounters an error says "Expression: invalid comparator". I don't know why it would cause this error. How to modify it?</p>