Can we just have struct inheritence already?
Manu
turkeyman at gmail.com
Tue Jun 11 23:47:00 UTC 2019
On Tue, Jun 11, 2019 at 1:25 PM Meta via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> Quick question, Manu. What are referring to when you say
> "uninitialized data"? Do you mean:
>
> int n = void;
> n++; //Undefined behaviour
>
> Struct S { int getVal() { return 1; } }
> S s = void;
> s.getVal(); //Undefined behaviour
>
> Or do you mean:
>
> int n;
> n++;
>
> S s;
> s.getVal();
I mean uninitialised, ie, the former code (= void). Your later code is
default initialised.
More information about the Digitalmars-d
mailing list