HybridHashMap.containsUsingLinearSearch

Check if element is stored.

Uses linear search instead of hashing plus probing and may be faster for for small tables with complicated hash functions.

Parameter key may be non-immutable, for instance const(char)[] eventhough key type K is string.

struct HybridHashMap(K, V = void, alias hasher = hashOf, string keyEqualPred = defaultKeyEqualPredOf!(K), Allocator = Mallocator, Options options = Options.init)
const scope @trusted
bool
containsUsingLinearSearch
(
SomeKey
)
(
in SomeKey key
)
if (
isAllocator!Allocator
)

Return Value

Type: bool

true if element is present, false otherwise.

Meta