On Monday, 23 March 2020 at 10:45:24 UTC, Jacob Carlborg wrote:
On Monday, 23 March 2020 at 10:41:43 UTC, Jacob Carlborg wrote:class DSingleton { immutable DSingleton instance = new DSingleton; }Should of course be `static`: class DSingleton { static immutable DSingleton instance = new DSingleton; } -- /Jacob Carlborg
Cool. Thanks, Jacob.I can't take credit for the Singleton code, though. I stole it from here: https://wiki.dlang.org/Low-Lock_Singleton_Pattern
