Member function increases size of a struct defined in a function - is this a bug?
Max Samukha
maxsamukha at gmail.com
Fri Feb 7 22:27:26 UTC 2020
On Friday, 7 February 2020 at 21:38:52 UTC, Steven Schveighoffer
wrote:
>
> There are some cases in D which *could* be done with enough
> analysis, but aren't because it would complicate the compiler
> for little benefit (or make the language dependent on how
> clever the compiler is).
>
> This is one of those cases. Just add static to the struct
> declaration.
>
> -Steve
What analysis? Doesn't compiler already know the set of variables
in the closure environment?
More information about the Digitalmars-d
mailing list