Why allow initializers of non-static members that allocate?
Salih Dincer
salihdb at hotmail.com
Sat Jun 11 06:24:11 UTC 2022
On Saturday, 11 June 2022 at 02:22:28 UTC, matheus wrote:
>
> Well would this be annoying? Yes, mainly if I already know
> this, but if not, then it would be like a nice to know warning
> for newbies like myself. By the way this would be only in the
> cases that a static array field being initialized with dynamic
> allocation like in the case of struct declaration, not on every
> place.
>
I agree...
I'd be wrong too if I didn't know that while reading the code. I
think there should be a warning when compiling.
Really, is it so hard to put up a warning?
SDB at 79
More information about the Digitalmars-d-learn
mailing list