DMD won't compile re-init of variable

Minty Fresh mintiewute+dlang at gmail.com
Fri Jan 31 14:01:04 UTC 2020


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;




More information about the Digitalmars-d-learn mailing list