How to implement this?

Era Scarecrow rtcvb32 at yahoo.com
Fri Apr 8 04:54:35 UTC 2022


On Friday, 8 April 2022 at 04:31:45 UTC, Elvis Zhou wrote:
> B b;
> init(\&b);
> structs ~= cast(A*)\&b;
> //Error: copying `cast(A*)\& b` into allocated memory escapes a 
> reference to local variable `b`

Maybe it should be `cast(A*) \&b.a`?




More information about the Digitalmars-d-learn mailing list