Max Samukha wrote:
Still looking for a solution. Basically, there should be a way to enable
the following:
module a;
template Foo()
{
static int a;
static this()
{
a = 42;
}
}
----
module b;
import c;
import a;
mixin Foo;
----
module c;
import b;
import a;
mixin Foo;
template Foo()
{
static int _a;
static int a()
{
static bool _a_inited;
if (!_a_inited)
{ _a_inited = true;
_a = 42;
}
return _a;
}
}
