On Wednesday, 17 July 2013 at 14:02:01 UTC, JS wrote:

foreach(n; std.string.split(s, ","))
{
    // n can't be read at compile time
}

using in a ctfe.

How to loop over a string array in a ctfe?


Strange...

The code actually works, but when I use my wrapper template it doesn't...

template splitstr(string n, string d = " ") { enum splitstr = std.string.split(n, d); }


I guess it has something to do with using an enum as the return type?

Reply via email to