November 18, 2013 implicit indirection | ||||
---|---|---|---|---|
| ||||
struct Blah { int val; Blah* next; } Blah x, y; Blah* p; p = &x; p.next = &y; //don't need (*p).next --- very nice Can someone point me to where this feature of D is documented please. |
November 18, 2013 Re: implicit indirection | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carl Sturtivant | On 11/18/2013 08:18 AM, Carl Sturtivant wrote: > > struct Blah { > int val; > Blah* next; > } > > Blah x, y; > Blah* p; > > p = &x; > p.next = &y; //don't need (*p).next --- very nice > > Can someone point me to where this feature of D is documented please. Other than being "well known", I don't know where it is specified. :) I cover it under the "The . (dot) operator to access a member of the pointee" section here: http://ddili.org/ders/d.en/pointers.html Ali |
Copyright © 1999-2021 by the D Language Foundation