http://d.puremagic.com/issues/show_bug.cgi?id=8920
Summary: iota(byte), iota(ushort) Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-10-31 04:00:50 PDT --- import std.range: iota; void main() { foreach (i; iota(cast(byte)0, cast(byte)10)) {} foreach (i; iota(cast(ubyte)0, cast(ubyte)10)) {} foreach (i; iota(cast(short)0, cast(short)10)) {} foreach (i; iota(cast(ushort)0, cast(ushort)10)) {} foreach (i; iota('a', 'f')) {} } DMD 2.061alpha shows some iota() problems with arguments of other types: ...\dmd2\src\phobos\std\range.d(4834): Error: cannot implicitly convert expression (cast(int)this.pastLast - 1) of type int to inout(byte) test.d(3): Error: template instance std.range.iota!(byte,byte) error instantiating ...\dmd2\src\phobos\std\range.d(4834): Error: cannot implicitly convert expression (cast(int)this.pastLast - 1) of type int to inout(ubyte) test.d(4): Error: template instance std.range.iota!(ubyte,ubyte) error instantiating ...\dmd2\src\phobos\std\range.d(4834): Error: cannot implicitly convert expression (cast(int)this.pastLast - 1) of type int to inout(short) test.d(5): Error: template instance std.range.iota!(short,short) error instantiating ...\dmd2\src\phobos\std\range.d(4834): Error: cannot implicitly convert expression (cast(int)this.pastLast - 1) of type int to inout(ushort) test.d(6): Error: template instance std.range.iota!(ushort,ushort) error instantiating test.d(7): Error: template std.range.iota does not match any function template declaration ...\dmd2\src\phobos\std\range.d(4717): Error: template std.range.iota cannot deduce template function from argument types !()(char,char) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------