alias this and initialisation

lalit.singhh lalit.singhh007 at gmail.com
Mon May 25 13:11:52 UTC 2020


On Monday, 25 May 2020 at 01:35:47 UTC, Danni Coy wrote:
> can anybody tell me why
>
> struct S
> {
>     int x;
>     alias x this;
> }
>
> void test()
> {
>     S s;
>     s = 8; // this works
>     S s = 8 // but this does not?
> }




More information about the Digitalmars-d-learn mailing list