MutexedAA.opIndexUnary

Implements unary operations by mixin strings.

struct MutexedAA(AA : V[K], V, K)
opIndexUnary
(
string op
)
(
K key
)

Parameters

op

Operation, here a unary operator.

key K

Key.

Return Value

Type: auto

The result of the operation.

Examples

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

aa[1] = 42;
assert(-aa[1] == -42);

Meta