Struct FlatMap

struct FlatMap(_Key, _Value, ulong N = 0, _Allocator, bool _supportGC = shouldAddGCRange!_Key || shouldAddGCRange!_Value) ;

Constructors

NameDescription
this (rhs) Constructs a FlatMap object from other flat map.
this (rhs, wf) Forward constructor.

Properties

NameTypeDescription
allocator[get] autoReturns copy of allocator.
capacity[get] size_tReturns the size of the storage space currently allocated for the container.
empty[get] boolReturns whether the falt map is empty (i.e. whether its length is 0).
length[get] size_tReturns the length of the flat map, in terms of number of elements.

Methods

NameDescription
at (key) Returns pointer elements value with specified key or null if container doesn't contains key.
atCopy (key) Returns copy of element value with specified key or ValueType.init if container doesn't contains key.
clear () Erases the contents of the container, which becomes an empty (with a length of 0 elements).
heapSwap (rhs) Swaps the contents of this and rhs only if both are heap allocated.
opAssign (rhs) Assigns a new value rhs to the flat map, replacing its current contents.
opBinaryRight (key) Operator in
opCmp (rhs) Compares the contents of a vector with another vector or range.
opDollar () Returns the length of the container, in terms of number of elements.
opEquals (rhs) Compares the contents of a container with another container, range or null.
opIndex (key) Returns reference of element value with specified key.
opIndex ()
opIndexAssign (value, key)
proxySwap (rhs) Swaps the contents of this and rhs.
release () Erases and deallocate the contents of the container, which becomes an empty (with a length of 0 elements).
remove (val)
remove (key)
remove (index)
reserve (n) Requests that the container capacity be adapted to a planned change in size to a length of up to n elements.
shrinkToFit (reallocate) Requests the Vector to reduce its capacity to fit its length.

Aliases

NameDescription
AllocatorType Type of the allocator object used to define the storage allocation model. By default DefaultAllocator is used.
allowHeap Allow heap (false only if Allcoator is void)
ElementReferenceType Type of reference to elements.
ElementType Type of elements (pair of key and value).
hasStatelessAllocator True if allocator doesn't have state.
KeyType Type of key.
maximalCapacity Maximal capacity of container, in terms of number of elements.
minimalCapacity Minimal capacity of container, in terms of number of elements.
supportGC
ValueType Type of value.
VectorType Type of internal vector.