On Friday, 12 February 2016 at 14:03:05 UTC, Steven Schveighoffer wrote:
On 2/10/16 11:51 PM, Matt Elkins wrote:

* The in keyword. This is nice syntactic sugar over having a special trait in C++ which deduces whether to pass by value or const-reference.
"foo(in bar)" is way more readable than something like
"foo(traits<bar>::fast_param bar)"

Hm... in is short for scope const. It is not pass by reference. Perhaps you meant auto ref?

Right...maybe I've been operating under false pretenses, but I was under the impression that the compiler was allowed to interpret scope const as either "pass by value" or "pass by const reference" freely so long as there was no custom post-blit defined? For the purposes of optimization, I mean, to avoid needless copying.

Reply via email to