title: Pass template args by const& or &&
body: <p>I have this example program:</p>
  <pre><code>#include &lt;iostream&gt;
  
  template&lt;typename Message, typename Decoration, typename PrintImpl&gt;
  void print_surrounded(Message&amp;&amp; msg, const Decoration&amp; decoration, const PrintImpl&amp; print_impl)
  {
      print_impl(decoration); // should forward be used?
      print_impl(&quot; &quot;);
      print_impl(std::forward&lt;Message&gt;(msg));
      print_impl(&quot; &quot;);
      print_impl(decoration);
  }
  
  template&lt;typename Message, typename PrintImpl&gt;
  void pretty_print(Message&amp;&amp; msg, const PrintImpl&amp; print_impl)
  {
      print_surrounded(std::forward&lt;Message&gt;(msg), &quot;***&quot;, print_impl);
  }
  
  int main()
  {
      pretty_print(&quot;So pretty!&quot;, [](const char* msg) {
          std::cout &lt;&lt; msg;
      });
  }
  </code></pre>
  <p><a href="http://coliru.stacked-crooked.com/a/7320f0828a53568c" rel="nofollow noreferrer">I also posted it on Coliru.</a></p>
  <p>As you can see I use different ways to pass the arguments:</p>
  <ul>
  <li>Message is passed as a universal reference because it eventually needs to be forwarded to the PrintImpl function.</li>
  <li>Decoration is passed as const ref here because its value is used twice and I'm not sure if using forward twice would be safe. (It might be moved away by the first forward?)</li>
  <li>PrintImpl is passed as const reference because I don't see any reason to use forward. However, I'm not certain if this is wise. (Should I pass by <code>&amp;&amp;</code>? If yes, should I also use <code>std::forward</code>?)</li>
  </ul>
  <p>Am I making the right choices?</p>