On Tue, Mar 06, 2012 at 03:00:16PM -0800, H. S. Teoh wrote: [...] > But why can't 'this' be const? For example, why does the compiler > reject this: > > class A { > int[] data; > pure const int sum() { > return reduce!"a*b"(data); > } > } > > I'm not modifying data at at all, so why should it be an error? [...]
Actually, nevermind that. Looks like a compiler bug that got fixed in dmd, but hasn't been pulled into gdc yet. I'll just have to be patient. :-) T -- A mathematician is a device for turning coffee into theorems. -- P. Erdos