Binding rvalues to const ref in D

Guillaume Piolat via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 19 12:43:20 PDT 2016


On Wednesday, 19 October 2016 at 15:18:36 UTC, Atila Neves wrote:
> My question is: do you _really_ need rvalues to bind to const 
> ref for performance? If not, what _do_ you need it for? Is it 
> an instinctive reaction against passing structs by value from 
> C++98 days?

imho it's the compiler job to pass by value or ref. For a 
function that is inlined it should be able to make its on choice.


More information about the Digitalmars-d mailing list