Call site 'ref'

Alvaro alvaroDotSegura at gmail.com
Sun Jan 15 16:17:44 PST 2012


El 15/01/2012 20:04, Tobias Pankrath escribió:
>> I also know that people dislike using reference parameters in C++ due to
>> the lack of visibility at the call site (causing them to use pointers).
>
> Which is true for me. Every single one of my reference parameters is const
> ref or pointer.

swap(ref a, ref b); //  ??

No, thanks.

swap(a, b); // obvious that the arguments will be mutated, and cleaner


More information about the Digitalmars-d mailing list