| |
 | Posted by Prudence | Permalink Reply |
|
Prudence 
| Error: template std.algorithm.mutation.remove cannot deduce function from argument types !()(bool delegate(void*, uint, uint, int)[], void), candidates are:
std.algorithm.mutation.remove(SwapStrategy s = SwapStrategy.stable, Range, Offset...)(Range range, Offset offset) if (s != SwapStrategy.stable && isBidirectionalRange!Range && hasLvalueElements!Range && hasLength!Range && Offset.length >= 1)
std.algorithm.mutation.remove(SwapStrategy s = SwapStrategy.stable, Range, Offset...)(Range range, Offset offset) if (s == SwapStrategy.stable && isBidirectionalRange!Range && hasLvalueElements!Range && Offset.length >= 1)
std.algorithm.mutation.remove(alias pred, SwapStrategy s = SwapStrategy.stable, Range)(Range range) if (isBidirectionalRange!Range && hasLvalueElements!Range)
coming from
static TValue[][TKey] s;
(s[key]).remove(c => value == c);
How to disambiguate or do what I'm trying to do:
I'm trying to create an associative array with multiple values per key. Hence the AA with an extra dynamic array on it.
I've tried
TValue[TKey][] s;
and other stuff without success(essentially same error about not being able to deduce remove)
I would expect (s[key]) to return the normal array.
I've tried this too.
remove!(c => this.Value == c)(store[this.Key], SwapStrategy.unstable);
At the very least: Is T[][S] an associative array with keys of type S and values of an array of type T or is it backwards? Also, how to disabmiguate
Thanks.
|