DMD won't compile re-init of variable

Simon lehmayr+d at gmail.com
Mon Feb 3 16:56:56 UTC 2020


On Friday, 31 January 2020 at 14:01:04 UTC, Minty Fresh wrote:
> On Thursday, 30 January 2020 at 21:36:53 UTC, Adam D. Ruppe 
> wrote:
>> On Thursday, 30 January 2020 at 21:09:41 UTC, Simon wrote:
>>> How do I revert my variable to the init state?
>>
>> null is the initial state for those.
>
> More generally, .init can be used as to get the initial state 
> for any type.
>
> ie.
>   m_string2edge = typeof(m_string2edge).init;

Thank you, Minty Fresh, this was the solution!



More information about the Digitalmars-d-learn mailing list