On Wednesday, 13 July 2016 at 12:40:50 UTC, Chris Wright wrote:
Why not use a free function?

'cause OP wants enum ctor to be called like this:

MyEnum.create(somedata);


2OP: to create enum from string, you can use `std.conv.to`:
  enum E { A, B, C }
  E v = to!E("A");

still not a ctor, but i think that it looks clear enough.

Reply via email to