Any way to automatically convert structs on return?

Nick Treleaven nick at geany.org
Thu Aug 1 15:35:27 UTC 2024


On Thursday, 1 August 2024 at 08:46:00 UTC, IchorDev wrote:
> P.S. You might want to put `value = void`, otherwise it’ll 
> always be default-constructed.

Doing `= void` can violate the assumptions of a destructor of T. 
Nullable uses a union to store T, so it can decide when to call 
the destructor.


More information about the Digitalmars-d-learn mailing list