Initializing "two-dimensional" compile-time enum

Philippe Sigaud philippe.sigaud at gmail.com
Sun Nov 24 12:42:06 PST 2013


> But I can't undersatnd how to make some kind of compile-time
> variable. If we have advanced metaprogramming features I think possibility
> of defining compile-time variables is needed. Am I right or not?

That's what we all want, but it's more or less impossible. If your
variable do not change type, then you can at least build an array and
store its successive values in the array. Then you use the last value
for the rest of your computation.

Or, as I said in another post, use Compile-Time Function Evaluation:
using standard functions, you can be as iterative/imperative as you
want.


More information about the Digitalmars-d mailing list