title: Transparent comparator code minimization
body: <p>Let's say we store a struct with a string key and we want to find it by that string in a container like <code>std::set</code>, so common implementation would look like this:</p>
  
  <pre><code>struct Foo {
      std::string id;
  };
  
  struct FooComp {
      using is_transparent = std::true_type;
  
      bool operator()( const Foo &amp;foo, const std::string &amp;str ) const
      {
          return foo.id &lt; str;
      }
  
      bool operator()( const std::string &amp;str, const Foo &amp;foo ) const
      {
          return str &lt; foo.id;
      }
  
      bool operator()( const Foo &amp;foo1, const Foo &amp;foo2 ) const
      {
          return foo1.id &lt; foo2.id;
      }
  };
  
   std::set&lt;Foo,FooComp&gt; foo_set;
   ...
  </code></pre>
  
  <p>This works fine, but writing three methods for <code>FooComp</code> that do prety match the same (logically) is monotonic and error prone. Is there a way to minimize that code?</p>