pub fn getOrPutAssumeCapacity(self: *Self, key: K) GetOrPutResult self: *Selfkey: K339
340
341
342
343 pub fn getOrPutAssumeCapacity(self: *Self, key: K) GetOrPutResult {
if (@sizeOf(Context) != 0)
@compileError("Cannot infer context " ++ @typeName(Context) ++ ", call getOrPutAssumeCapacityContext instead.");
return self.getOrPutAssumeCapacityContext(key, undefined);
}
If there is an existing item with
key, then the resultEntrypointer points to it, and found_existing is true. Otherwise, puts a new item with undefined value, and theEntrypointer points to it. Caller should then initialize the value (but not the key). If a new entry needs to be stored, this function asserts there is enough capacity to store it.