Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Why is passing by value (if a copy is needed) recommended in C++11 if a const reference only costs a single copy as well? – stackoverflow.com

I am trying to understand move semantics, rvalue references, std::move, etc. I have been trying to figure out, by searching through various questions on this site, why Passing a const std::string ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot



This post first appeared on ONLINE WEB TRICKS, please read the originial post: here

Share the post

Why is passing by value (if a copy is needed) recommended in C++11 if a const reference only costs a single copy as well? – stackoverflow.com

×

Subscribe to Online Web Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×