BTree.insert

Insert an element in the container.

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

Return Value

Type: bool

true if the insertion took place. If duplicates are supported, return true.

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

Meta