title: is any difference between std::forward<T> and std::forward<decltype(t)>?
body: <p>are these functions equivalent?</p>
  
  <pre><code>template &lt;class T&gt;
  void foo(T &amp;&amp; t)
  {
      bar(std::forward&lt;T&gt;(t));
  }
  
  template &lt;class T&gt;
  void foo2(T &amp;&amp; t)
  {
      bar(std::forward&lt;decltype(t)&gt;(t));
  }
  
  template &lt;class T&gt;
  void foo3(T &amp;&amp; t)
  {
      bar(std::forward(t));
  }
  </code></pre>
  
  <p>if they are, can I always use this macro for perfect forwarding?</p>
  
  <pre><code>#define MY_FORWARD(var) std::forward&lt;decltype(var)&gt;(var)
  </code></pre>
  
  <p>or just use </p>
  
  <pre><code>bar(std::forward(t));
  </code></pre>
  
  <p>I believe <code>foo2</code> and <code>foo3</code> are same, but I found people are always use forward like <code>foo</code>, is any reason to explicitly write the type?</p>
  
  <p>I understand that <code>T</code> and <code>T&amp;&amp;</code> are two different types, but I think <code>std::forward&lt;T&gt;</code> and <code>std::forward&lt;T&amp;&amp;&gt;</code> always give the same result? </p>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>the reason I want to use macro is I want to save some typing on following C++1y code, I have many similar code in different places</p>
  
  <pre><code>#define XLC_FORWARD_CAPTURE(var) var(std::forward&lt;decltype(var)&gt;(var))
  #define XLC_MOVE_CAPTURE(var) var(std::move(var))
  
  template &lt;class T, class U&gt;
  auto foo(T &amp;&amp; func, U &amp;&amp; para )
  {
      auto val = // some calculation
      return [XLC_FORWARD_CAPTURE(func),
              XLC_FORWARD_CAPTURE(para),
              XLC_MOVE_CAPTURE(val)](){
                // some code use val
                func(std::forward&lt;U&gt;(para)); 
            };
  }
  </code></pre>