RFC: scope and borrowing
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 24 00:50:04 PDT 2014
On 9/23/2014 4:19 AM, Manu via Digitalmars-d wrote:
>> BTW, ref (as you know) is part of the type in C++. However, I can vouch for
>> it being a special case everywhere in C++, and is a horrifying quagmire of
>> strange edge cases. That's why it's not part of the type in D.
> I've never had any problems with ref in C++. D presents the horrible quagmire
> of edge cases in my experience, some of which I've presented, but I've had
> many more issues in the past. Can you give me some examples of the problems
> in C++ you set out to avoid?
Q: Given a T&, and type deduction, when do you get the T and when do you get the
A: It's different for every situation. Nobody can remember or enumerate the
cases. Maybe Scott Meyers.
More information about the Digitalmars-d