[Issue 14517] Templated static ctor + separate compilation = module cycles
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Apr 28 14:36:18 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14517
Martin Nowak <code at dawg.eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |code at dawg.eu
--- Comment #3 from Martin Nowak <code at dawg.eu> ---
You probably learned that for C++, avoid static constructors because the
initialization order quickly becomes a mess.
The problem here is that both mod2 and mod3 depend on a constructor, but also
have a cyclic dependency. We could somehow (using linker tricks) try to push
the ctors/dtors into mod1.
I'm not sure I understand your idea Steven.
--
More information about the Digitalmars-d-bugs
mailing list