compile-time variables?

Fraser Fraser
Tue May 22 12:19:09 PDT 2007


Hi,

D has some pretty impressive metaprogramming features, but I was wondering if there was any way to do compile-time variables, or fake it with recursive templates or something. In particular, I want a mixin template that mixes in a  unique numeric ID as part of a function every time it's used in a mixin. Thouands of these functions will be used in the program, and each must have a unique ID in an associative array (after they're called for the first time, lazy eval is being done at runtime).

If I can avoid code bloat, all the Better!

Thanks,
Fraser



More information about the Digitalmars-d mailing list