Steven Schveighoffer:
> void main()
> {
> auto a = new ubyte[256];
> foreach(ubyte i, ref e; a) e = i;
> }
http://d.puremagic.com/issues/show_bug.cgi?id=5725
Bye,
bearophile
On Thu, 10 Mar 2011 07:50:21 -0500, bearophile
wrote:
Magnus Lie Hetland:
Derp. I didn't mean bool -- I was talking about byte. (Which should
make quite a bit more sense, given that I'm talking about a limit of
256... :D)
Please show a complete minimal program that gives you problem. (I h
Magnus Lie Hetland:
> Derp. I didn't mean bool -- I was talking about byte. (Which should
> make quite a bit more sense, given that I'm talking about a limit of
> 256... :D)
Please show a complete minimal program that gives you problem. (I have failed
to reproduce your problem on Windows).
By
On 2011-03-09 21:24:57 +0100, Kai Meyer said:
I don't see how that works in dmd2, and I don't have much experience
with dmd1, so I'll admit that this may be different on dmd1.
Derp. I didn't mean bool -- I was talking about byte. (Which should
make quite a bit more sense, given that I'm talki
On 03/09/2011 09:09 AM, Magnus Lie Hetland wrote:
In a (template) data structure I'm working on, I had the following thinko:
auto a = new T[n];
foreach (T i, ref e; a) {
e = i;
}
Then I instantiated it with T=bool, and n=256. Infinite loop, of course
-- the problem being that i wraps around to
In a (template) data structure I'm working on, I had the following thinko:
auto a = new T[n];
foreach (T i, ref e; a) {
e = i;
}
Then I instantiated it with T=bool, and n=256. Infinite loop, of course
-- the problem being that i wraps around to 0 after the last iteration.
Easil