title: std::move or std::forward when assigning universal constructor to member variable in C++
body: <p>Consider the following classes <code>foo1</code> and <code>foo2</code></p>
  
  <pre><code>template &lt;typename T&gt;
  struct foo1
  {
      T t_;
  
      foo1(T&amp;&amp; t) :
          t_{ std::move(t) }
      {
      }
  };
  
  template &lt;typename T&gt;
  struct foo2
  {
      foo1&lt;T&gt; t_;
  
      foo2(T&amp;&amp; t) :
          t_{ std::forward&lt;T&gt;(t) }
      {
      }
  };
  </code></pre>
  
  <p>Is it always the case that the constructor of <code>foo1</code> represents the correct way to initialise the member variable <code>T</code>? i.e. by using <code>std::move</code>.</p>
  
  <p>Is it always the case that the constructor of <code>foo2</code> represents the correct way to initialise the member variable <code>foo1&lt;T&gt;</code> due to needing to forward to foo1's constructor? i.e. by using <code>std::forward</code>.</p>
  
  <p><strong>Update</strong></p>
  
  <p>The following example fails for <code>foo1</code> using <code>std::move</code>:</p>
  
  <pre><code>template &lt;typename T&gt;
  foo1&lt;T&gt; make_foo1(T&amp;&amp; t)
  {
      return{ std::forward&lt;T&gt;(t) };
  }
  
  struct bah {};
  
  int main()
  {
      bah b;
  
      make_foo1(b); // compiler error as std::move cannot be used on reference
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>Which is a problem as I want T to be both a reference type and a value type.</p>