Top "Perfect-forwarding" questions

Perfect forwarding describes a property of C++11 function templates which allows correctly deducing arguments as lvalues or rvalues and forwarding them in the same form to other functions.

What does T&& (double ampersand) mean in C++11?

I've been looking into some of the new features of C++11 and one I've noticed is the double ampersand in …

c++ c++11 rvalue-reference c++-faq perfect-forwarding
What are the main purposes of using std::forward and which problems it solves?

In perfect forwarding, std::forward is used to convert the named rvalue references t1 and t2 to unnamed rvalue references. …

c++ c++11 rvalue-reference c++-faq perfect-forwarding
make_unique and perfect forwarding

Why is there no std::make_unique function template in the standard C++11 library? I find std::unique_ptr<…

c++ c++11 variadic-templates unique-ptr perfect-forwarding
Perfect forwarding - what's it all about?

Possible Duplicate: Advantages of using forward Could someone please explain to me what perfect forwarding is about?

c++11 terminology perfect-forwarding
What's the difference between std::move and std::forward

I saw this here: Move Constructor calling base-class Move Constructor Could someone explain: the difference between std::move and std::…

c++ c++11 perfect-forwarding
How would one call std::forward on all arguments in a variadic function?

I was just writing a generic object factory and using the boost preprocessor meta-library to make a variadic template (using 2010 …

c++ c++11 variadic-templates rvalue-reference perfect-forwarding
Is there a difference between universal references and forwarding references?

An argument to this function will bind to an rvalue reference: void f(int && i); However, an argument …

c++ templates perfect-forwarding universal-reference forwarding-reference
Capturing perfectly-forwarded variable in lambda

template<typename T> void doSomething(T&& mStuff) { auto lambda([&mStuff]{ doStuff(std::forward<T&…

c++ c++11 lambda c++14 perfect-forwarding
How to combine std::bind(), variadic templates, and perfect forwarding?

I want to invoke a method from another, through a third-party function; but both use variadic templates. For example: void …

c++ templates c++11 variadic-templates perfect-forwarding
Perfect Forwarding to async lambda

I have a function template, where I want to do perfect forwarding into a lambda that I run on another …

c++ c++11 lambda perfect-forwarding stdasync