CTFE attribute

Manu turkeyman at gmail.com
Sat Jan 28 06:50:35 PST 2012


This has come up lots of times before.. I just wanted to effectively +1
this request.

I have some templates, and some reasonably complex functions I use strictly
via CTFE to produce enums and evaluate conditions within the templates.
When I build my code, I notice that the CTFE functions, which are never
referenced in any runtime code, are still present in the object file.
Additionally, one of these functions requires I import std.string, which is
only used in CTFE code, and is otherwise a pointless import.

I'd certainly like to be able to mark these functions CTFE to be sure no
runtime code will ever be generated for them, and also, what can I do about
CTFE imports? I don't want that import in my binary...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120128/98d5f470/attachment.html>


More information about the Digitalmars-d mailing list