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 open_hashmap and open_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

needsMove
enum bool needsMove(T);

True if a T needs to be passed by move instead of value either because it cannot be copied or because it has an elaborate destructor.

Meta