title: Default Argument for Function Template not working
body: <p>I have a function that prints out value_one if it is greater than or less value_two based on the comparison passed through.</p>
  
  <pre><code>template&lt;typename T, typename cmp = less&lt;T&gt; &gt;
  void function(T value_one, T value_two, cmp) {
      cmp comparator;
      if (comparator(value_one, value_two)) {
          std::cout &lt;&lt; value_one;
      }
  }
  </code></pre>
  
  <p>Now, this function defaults to using the less function object to decide to print value_one out or not, but can also use the more function object.</p>
  
  <pre><code>template&lt;typename T&gt;
  class more {
  public:
      bool operator()(const T&amp; value_one, const T&amp; value_two) {
          return value_one &gt; value_two;
      }
  };
  
  template&lt;typename T&gt;
  class less{
  public:
      bool operator()(const T&amp; value_one, const T&amp; value_two) {
          return value_one &lt; value_two;
      }
  };
  </code></pre>
  
  <p>when i call the following code in main</p>
  
  <pre><code>more&lt;int&gt; a;
  function(7,5,a);
  </code></pre>
  
  <p>7 is printed out as expected but the next code is deemed illegal, and VS tells me that no matching overloaded function can be found.</p>
  
  <pre><code>function(5,7);
  </code></pre>
  
  <p>I thought that the cmp function object would default to less when not explicitly provided and thus would still be able to work. Why does this not work? Is there a way to make this code work without overloading it to just have two parameters?</p>