struct Struct
{
this(int _n) {
n = _n; x = 5;
}
this(int _n, float _x) {
n = _n; x = _x;
}
int n;
float x;
}
enum A = Struct(1);
enum A = Struct(1,2);
Both calls fail. But if you /don't/ define any constructors then the second one would work.
Comment #1 by wbaxter — 2009-11-20T15:50:40Z
Additional note: static opCall does work with CTFE.
Comment #2 by clugdbug — 2010-01-10T11:44:54Z
I have sent Walter a patch for this. This was much more difficult than you might expect.