On Friday, 17 June 2016 at 10:53:40 UTC, Lodovico Giaretta wrote:
struct Foo(T) { private int _bar = 1;this(int bar) { this._bar = bar; } } auto foo = Foo!(string)(); This should do the trick.
Thanks, I forgot to mention I'm also doing lots of other stuff in the constructor to private fields too.
struct Foo(T) { private int _bar; private void* _baz; this(int bar = 8) { this._bar = bar; this._baz = malloc(this._bar); } } So I have to at least run a constructor.