order of static constructor execution
Michel Fortin
michel.fortin at michelf.com
Fri Mar 12 16:27:37 PST 2010
On 2010-03-12 19:10:10 -0500, Max Samukha <spambox at d-coding.com> said:
> If static constructors in templates ran during the initialization of
> the module where they are defined, the problem with mixed-in code could
> be solved like this:
But templates can take function and types as argument. If the 'static
this' of a template calls something through one of its argument, the
module this function or type resides in needs to be initialized first.
So you can't always call a template's static this at the same time as
the module the template is defined in.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list