title: Comparing 2 values using template metaprogramming C++
body: <p>I want to have a default function as a "Predicate" template in case the user doesn't provide one. So far I've been doing something like:</p>
  
  <pre><code>template&lt;typename T&gt;
  struct simple_compare{
      bool operator()(T const&amp; a, T const&amp; b){
          return a &gt; b;
      }
  };
  
  template&lt;typename T, typename Predicate=simple_compare&lt;T&gt; &gt;
  bool compare(T a, T b, Predicate pred) {
      return pred(a, b);
  }
  </code></pre>
  
  <p>Can this be done using template metaprogramming in C++ instead of having a struct with an overloaded () operator?</p>