nxt.container.traits

Traits used by containers.

TODO: add isUnorderedContainer and isUnorderedRange traits and used to forbid hash algorithms to operate on unordered containers (such as flat_hashmap and flat_hashmap) and their ranges.

Public Imports

nxt.gc_traits
public import nxt.gc_traits;
Undocumented in source.

Members

Functions

makeInitZeroArray
T[] makeInitZeroArray(size_t length)

Allocate an array of T-elements of length length using allocator.

Templates

ContainerElementType
template ContainerElementType(ContainerType, ElementType)
Undocumented in source.
hasElaborateDestructorNew
template hasElaborateDestructorNew(S)

Variant of hasElaborateDestructor that also checks for destructor when S is a class.

isAddress
template isAddress(T)

Is true iff T is repesented as a memory address.

isSet
template isSet(T)

Is true iff T is a set like container.

isSetOf
template isSetOf(T, E)

Is true iff T is a set like container with elements of type E.

Variables

shouldMove
enum bool shouldMove(T);

True if the last reference of a T in the scope of its lifetime should be passed by move instead of by copy either because

Meta