Inserting to associative array do not return a lvalue.

BCS ao at pathlink.com
Tue Oct 16 07:59:31 PDT 2007


Reply to Yang,

> Sorry. I thought I have a mistake. Holding a pointer to the value of
> an associative array is very dangerious.Yang Bo ??:
> 


this works

int[int] a;
a[1] = 2;
int* r = 1 in a;
(*r)++;

assert(2 == a[1]);





More information about the Digitalmars-d mailing list