Declaring constant references in struct members

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 15 17:12:10 PST 2017


On Thursday, 16 February 2017 at 01:05:58 UTC, David  Zhang wrote:
> Is there a similar mechanism for one struct holding another?

You'd have to make the member a pointer to the struct.


immutable(B)* b;



More information about the Digitalmars-d-learn mailing list