Getting the initial value of a class field in compile time.

realhet real_het at hotmail.com
Sun Feb 9 12:19:05 UTC 2020


On Sunday, 9 February 2020 at 01:19:55 UTC, Paul Backus wrote:
> On Sunday, 9 February 2020 at 00:57:05 UTC, realhet wrote:
>> On Sunday, 9 February 2020 at 00:41:12 UTC, realhet wrote:
>>> On Sunday, 9 February 2020 at 00:27:21 UTC, Adam D. Ruppe
>             enum initValue = (new typeof(this)).tupleof[i];

Wow, thx! Accessing by index instead of name. Really powerful!



More information about the Digitalmars-d-learn mailing list