A little bug

Vladimir Panteleev vladimir at thecybershadow.net
Sun Dec 25 19:57:53 PST 2011


On Monday, 26 December 2011 at 02:06:18 UTC, Andrej Mitrovic 
wrote:
> This will print "false, false".

After reading the code, I thought the surprise was that it 
printed "true" :)

Perhaps making the default foreach behavior to make copies of 
structs wasn't the best idea, also due to performance reasons. 
One way it could have been designed was to force one of "auto", 
"const" or "ref" to indicate the "storage class".


More information about the Digitalmars-d mailing list