.enumerate does not work for compile-time sequences. Consider for the sake of discussion the following nonsense (I know it cannot be done without enumerate) code:

import std.meta;
import std.range;

string join(Fields...)() {
  enum f(size_t i) = __traits(identifier, Fields[i]);
return staticMap!f(Fields.enumerate).join('\n'); // does not compile because of .enumerate
}

void main(string[] args)
{
    string r = join!(int, float)();
}

How to make it compile?

Reply via email to