[Issue 20183] Assigning statement scope of struct literal or temporary to variable with longer lifetime
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 19 07:55:49 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20183
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Hardware|x86 |All
OS|Windows |All
--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> ---
The problem is that the lifetime of a struct literal or temporary is only to
the end of the expression it appears in. Assigning the address of them to a
longer lived variable is not valid.
--
More information about the Digitalmars-d-bugs
mailing list