CTFE attribute

Manu turkeyman at gmail.com
Sat Jan 28 11:02:48 PST 2012


On 28 January 2012 20:39, Walter Bright <newshound2 at digitalmars.com> wrote:

> On 1/28/2012 6:50 AM, Manu wrote:
>
>> 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...
>>
>
> Being in your object file doesn't mean they make it into the binary.
> Optlink, for example, will remove unreferenced COMDATs.
>

I still don't want it polluting my lib, and I also don't want the
possibility that someone COULD link to it. It's simply not runtime code.
Additionally, while the code is still present in my lib, so must be the
import that it makes use of...

I'd also like an error if the function were called outside of CTFE... so
the CTFE attribute others have discussed seems like a good idea to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120128/a26e00ce/attachment.html>


More information about the Digitalmars-d mailing list