Exporting template function instances to C

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 23 09:38:02 PDT 2017


On Thursday, 23 March 2017 at 16:28:18 UTC, data pulverizer wrote:
> alias mult!double dmult;
> alias mult!float fmult;

Those are just aliases in the D compiler, they don't actually 
exist in the object file for C to use like regular functions.

Templates need to actually be *used* to be instantiated for 
export, and aliases make them easier to use, but don't actually 
use them yet.
> Why is that?




More information about the Digitalmars-d-learn mailing list