title: Default function that just returns the passed value?
body: <p>As a lazy developer, I like to use this trick to specify a default function:</p>
  
  <pre><code>template &lt;class Type, unsigned int Size, class Function = std::less&lt;Type&gt; &gt;
  void arrange(std::array&lt;Type, Size&gt; &amp;x, Function&amp;&amp; f = Function())
  {
      std::sort(std::begin(x), std::end(x), f);
  }
  </code></pre>
  
  <p>But I have a problem in a very particular case, which is the following:</p>
  
  <pre><code>template &lt;class Type, unsigned int Size, class Function = /*SOMETHING 1*/&gt;
  void index(std::array&lt;Type, Size&gt; &amp;x, Function&amp;&amp; f = /*SOMETHING 2*/)
  {
      for (unsigned int i = 0; i &lt; Size; ++i) {
          x[i] = f(i);
      }
  }
  </code></pre>
  
  <p>In this case, I would like the default function to be the equivalent of: <code>[](const unsigned int i){return i;}</code> (a function that just returns the passed value).</p>
  
  <p>In order to do that, what do I have to write instead of <code>/*SOMETHING 1*/</code> and <code>/*SOMETHING 2*/</code>?</p>