[Issue 15064] [CTFE] std.range.enumerate is not CTFE-able
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 15 17:33:41 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15064
--- Comment #2 from Jack Stouffer <jack at jackstouffer.com> ---
Sorry
int test()
{
import std.range : enumerate;
int[] a = [1];
foreach (i, e; a.enumerate) {}
return 0;
}
void main()
{
enum res = test(); // fails
int res = test(); // works fine
}
--
More information about the Digitalmars-d-bugs
mailing list