FlatHashMap.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 FlatHashMap(K, V = void, alias hasher = hashOf, string keyEqualPred = defaultKeyEqualPredOf!(K), Allocator = Mallocator, bool borrowChecked = false, bool useSmallLinearSearch = true, bool usePrimeCapacity = false)
const scope @trusted
bool
containsUsingLinearSearch
(
SomeKey
)
(
const scope SomeKey key
)
if (
isAllocator!Allocator
)

Return Value

Type: bool

true if element is present, false otherwise.

Meta