title: Using custom std::set comparator
body: <p>I am trying to change the default order of the items in a set of integers to be lexicographic instead of numeric, and I can't get the following to compile with g++:</p>
  
  <p>file.cpp:</p>
  
  <pre><code>bool lex_compare(const int64_t &amp;a, const int64_t &amp;b) 
  {
      stringstream s1,s2;
      s1 &lt;&lt; a;
      s2 &lt;&lt; b;
      return s1.str() &lt; s2.str();
  }
  
  void foo()
  {
      set&lt;int64_t, lex_compare&gt; s;
      s.insert(1);
      ...
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>error: type/value mismatch at argument 2 in template parameter list for ‘template&lt;class _Key, class _Compare, class _Alloc&gt; class std::set’
  error:   expected a type, got ‘lex_compare’
  </code></pre>
  
  <p>what am I doing wrong?</p>