"in" operator & const

funog funog at ifrance.com
Fri Feb 15 08:13:15 PST 2008


Janice Caron Wrote:

> On 15/02/2008, funog <funog at ifrance.com> wrote:
> >  const(int[Food]) caa;
> 
> Why would you want an associative array that you can't modify?

If it is passed to a function as read-only

void foo(const(int[Food]) readOnlyAArray) { ... }





More information about the Digitalmars-d mailing list