title: C++ - std::decay<T> and std::make_tuple<D> - cannot convert argument from 'D' to 'D &&'
body: <p>I have this code:</p>
  
  <pre><code>template &lt;typename T&gt;
  void someFunction(){
     typedef std::decay&lt;T&gt;::type D;
  
     D val = GetValue&lt;D&gt;();
     std::tuple&lt;D&gt; t = std::make_tuple&lt;D&gt;(val);
  
     //... tuple is stored outside this scope in global variable
  }
  </code></pre>
  
  <p><code>GetValue&lt;D&gt;()</code> returns value from dictionary based on <code>typeid(D)</code>, it is working correctly and I return <code>MyData</code> to <code>D</code> - I tested it if I comment out the next problematic line, see the problem below.</p>
  
  <p>If I compile this, for <code>T = const MyData &amp;</code> I got this</p>
  
  <pre><code> error C2664: 'std::tuple&lt;MyData &gt; std::make_tuple&lt;D&gt;(D &amp;&amp;)': cannot convert argument 1 from 'D' to 'D &amp;&amp;'
  </code></pre>
  
  <p>Why is this error produced and how to remove it? I want to store only non-ref values in my tuple, even if template T is refd'.</p>
  
  <p>I can get it compile, by using <code>std::make_tuple&lt;D&gt;(std::forward&lt;D&gt;(val))</code>, but it calls my move ctor and I want to cal copy ctor, because <code>val</code> is destroyed at the end of method and so its internal data and move ctor just moved them, so they are gone.</p>