MutexedAA.opIndexOpAssign

Implements index assign operations by mixin strings.

struct MutexedAA(AA : V[K], V, K)
void
opIndexOpAssign
(
string op
U
)
(,
K key
)
if (
is(U == V) ||
is(U == ElementEncodingType!V)
)

Parameters

op

Operation, here an index assign operator.

value U

Value.

key K

Key.

Examples

MutexedAA!(int[int]) aa;
aa.setup();  // important!

aa[1] = 42;
aa[1] += 1;
assert(aa[1] == 43);

aa[1] *= 2;
assert(aa[1] == 86);