Attempting to use `std.range.only` with enum members throws a compile error.
Example Program:
import std.stdio;
import std.range;
enum TestEnum {
A = 501,
B = 502
}
void main() {
auto f = only(TestEnum.A, TestEnum.B);
}
Output:
$ rdmd ~/test.d
/usr/include/dmd/phobos/std/range/package.d(6058): Error: cannot implicitly convert expression (0) of type int to TestEnum[2]
/home/col/test.d(11): Error: template instance std.range.only!(TestEnum, TestEnum) error instantiating
Failed: ["dmd", "-v", "-o-", "/home/col/test.d", "-I/home/col"]
Comment #1 by dsp — 2015-07-07T04:45:56Z
I can't reproduce this with dmd/druntime/phobos v2.068-devel