Very clear and much appreciated.
On Tuesday, 6 November 2012 at 23:38:00 UTC, Jonathan M Davis
wrote:
If a function requires an lvalue, then you have to pass a
[snip]
You'd have to do something like
string file = __FILE__;
size_t line = __LINE__;
auto f = foo();
auto b = bar(7);
Googling to see differences between *in* and *const ref* I found
detailed explanation here:
http://stackoverflow.com/questions/8515579/difference-between-const-ref-and-in
One response is: If you have identified the copying as a
bottleneck and you want to optimize, using *const ref* is a good
On Tuesday, November 06, 2012 22:52:53 Dan wrote:
Later on another response is: A huge difference between *in* and
*const ref* which you don't cover at all is the fact that *const
ref* must take an lvalue, whereas *in* doesn't have to
Why is this benefit huge? Is it just the convenience of