SetImpl.insert

Insert an element in the container. If allowDuplicates is false, this can fail and return false if the already contains an element with equivalent key.

struct SetImpl(K, alias less = (a, b) => a < b, bool allowDuplicates = false, bool ownsMemory = false)
@nogc @trusted
bool
insert
(
K key
)

Return Value

Type: bool

true if the insertion took place.

Meta