RehashingAA.opIndexOpAssign

Performs an assingment operation on a value in the internal associative array.

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

Parameters

op

Assignment operation as a string.

value U

Value to assign.

key K

Key.

Examples

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

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

Meta