Compile time function execution...

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sat Feb 24 14:13:29 PST 2007


Serg Kovrov wrote:
> Sorry if this was already answered, but I can't find it..
> Is compile-time execution of library functions allowed?

That depends on what you mean by "library functions". Obviously you mean 
a function in a library, but that's not really what matters here. The 
important question is whether the source is available to the compiler. 
It doesn't care where the compiled version ends up, because it doesn't 
use it. It just needs to see the source.

So basically, for a library with declaration-only (no or incomplete 
implementation) "headers" the answer is no, for libraries that ship with 
full source (that's used to satisfy imports, so no .di modules) the 
answer is yes. Just like with normal source files.



More information about the Digitalmars-d mailing list