On Friday, 1 July 2016 at 22:55:21 UTC, qznc wrote:
On Friday, 1 July 2016 at 22:23:23 UTC, Hiemlick Hiemlicker wrote:
It seems D won't replace

encrypt("This string will still end up in the binary");

with "skadf2903jskdlfaos;e;fo;aisjdfja;soejfjjfjfjfjfjfeij" or whatever the ctfe value of encrypt actually is.

This also seems like a bug in D because manifest constants used as sole arguments to ctfe'able functions should be replaced by the function result.


CTFE is explicit. You could make it `encrypt!"encrypted at compile-time"`. Then let encrypt return some struct, which decrypts at runtime.

? I thought CTFE was for normal functions?

I guess I was mistaken ;/


Reply via email to