make_pair/make_tuple: perfect forwarding

Scott Meyers said specifically make_shared and make_unique are the 2 make functions using perfect forwarding and returning a smart pointer. Scott didn’t mention make_pair because there’s no smart pointer.

https://en.cppreference.com/w/cpp/utility/tuple/make_tuple shows perfect forwarding.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s