c++: confusion about forwarding reference
<p>I read <a href="https://isocpp.org/blog/2012/11/universal-references-in-c11-scott-meyers" rel="nofollow">this</a> (incredibly well written) article about <strong>Forwarding  Reference</strong> in C++11 by Scott Meyers.</p>

<p>Now, focus on this part of the article:</p>

<blockquote>
<pre><code>template &lt;class... Args&gt;
void emplace_back(Args&amp;&amp;... args); // deduced parameter types ⇒ type deduction;
...                                // &amp;&amp; ≡ universal references
</code></pre>
</blockquote>

<p>So, in contrast with other cases, the ellipses doesn't make the <code>&amp;&amp;</code> an rvalue reference, but it's still universal references.</p>

<p>From what I've understood, when we have universal references, we can call the function passing both rvalue and lvalues (wow, so cool!)</p>

<p>Now, I've implemented this function:</p>

<pre><code>template &lt;typename ReturnType, typename... Args&gt;
ReturnType callFunction(MemFunc&lt;ReturnType, Args...&gt; memFunc, Args&amp;&amp; ... args) { ...
</code></pre>

<p>So (using the same logic of the previous example), <code>&amp;&amp;</code> means forwarding references.</p>

<p><strong>But</strong> if I try to make this call:</p>

<pre><code>typedef vector&lt;double&gt; vecD;
vecD vec;
mem.callFunction&lt;vecD, vecD&gt;(sortFunc, vec);
</code></pre>

<p>The compiler is going to complain with <code>You cannot bind an lvalue to an rvalue reference</code></p>

<p>Why this happens?</p>

<p><strong>THE WHOLE CODE:</strong></p>

<pre><code>#include &lt;functional&gt;
#include &lt;vector&gt;

using namespace std;
struct MultiMemoizator {
    template &lt;typename ReturnType, typename... Args&gt;
    ReturnType callFunction(std::function&lt;ReturnType(Args...)&gt; memFunc, Args&amp;&amp;... args) {

    }
};

typedef vector&lt;double&gt; vecD;

vecD sort_vec (vecD const&amp; vec) {
    return vec;
}

int main()
{
    vecD vec;
    std::function&lt;vecD(vecD)&gt; sortFunc(sort_vec);
    MultiMemoizator mem;
    mem.callFunction&lt;vecD, vecD&gt;(sortFunc, vec);
}
</code></pre>