Enum template with mixin, need 'this'

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 24 12:00:56 PST 2014


On Wed, 24 Dec 2014 19:52:31 +0000
Meta via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:

> Hmm, I confused myself over when the expression is interpreted. I 
> got it into my head that the template expansion would somehow 
> delay interpretation of the expression so it could be picked up 
> at runtime, but of course `enum` forces it to be CTFE'd.

sometimes i want to have some kind of C-like macros in D too, which
just inserts the generated string in the place of instantiation with
implicit `mixin`. maybe someone will write a DIP/ER for this...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141224/4c612d37/attachment.sig>


More information about the Digitalmars-d-learn mailing list