title: What is the preferred way to use auto to declare a lambda variable in C++?
body: <p>Does anyone have any insight into the pros and cons of the various ways to use auto to declare a lambda variable?<br>
  For e.g.:  </p>
  
  <pre><code> auto Val = [] { };           // #1
   const auto &amp;LVRef = [] { };  // #2
   auto &amp;&amp;RVRef = [] { };       // #3
  </code></pre>
  
  <p>Can anyone think of a compelling reason to not always prefer #1?</p>
  
  <p>I imagine for a template function, the preferred way to declare a callable parameter is to use a universal reference?  </p>
  
  <pre><code>template&lt;class F&gt; void foo(F&amp;&amp; f) { f(); }
  </code></pre>
  
  <p>Or do most guidelines prefer to declare it as a non-reference parameter?  </p>
  
  <pre><code>template&lt;class F&gt; void foo(F f) { f(); }
  </code></pre>
  
  <p>Thank you!</p>