BTree.insert

Insert item in tree.

struct BTree(K, V, alias less = "a < b", bool allowDuplicates = false, bool duplicateKeyIsUB = false)
nothrow @nogc
bool
insert
(
K key
,)

Parameters

key K

Key to insert.

value V

Value to insert associated with key.

Return Value

Type: bool

true if the insertion took place.

Warning: Inserting duplicate keys when duplicates are not supported is Undefined Behaviour. Use contains() to avoid that case.

Meta