On Tuesday 12 July 2011 15:46:41 Daniel Murphy wrote: > "Jonathan M Davis" <jmdavisp...@gmx.com> wrote in message > news:mailman.1552.1310429761.14074.digitalmar...@puremagic.com... > > > This enhancement request would make the situation with immutable and > > const arrays so that they're much more in line with mutable container > > types and static arrays: > > > > http://d.puremagic.com/issues/show_bug.cgi?id=6289 > > > > - Jonathan M Davis > > WAIT WHAT? That doesn't work?!?
Nope. It works for static arrays but not for const or immutable arrays. Try it. It'll fail. I don't know _why_ it doesn't work, but it doesn't. If it did, this would be a much smaller issue. It would be nice if templates were improved such that they instantiated range-based functions in a manner which worked for static arrays and const or immutable arrays, but if you could solve the problem by slicing a const or immutable array, it would make the situation far less problematic. - Jonathan M Davis