On Wednesday, 13 January 2016 at 13:53:01 UTC, Daniel N wrote:
This works:

Indeed... but interestingly, it does not work if you define the mixin before the new constructor:

 struct Test
 {
     mixin myCtors  mixed;
     alias __ctor = mixed.__ctor;

     this(string s) {}
 }

l.d(10): Error: alias l.Test.__ctor is not a constructor; identifiers starting with __ are reserved for the implementation


So yeah, you can make it work, but there do appear to be a few bugs with it anyway.

Reply via email to