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_or_hashset and open_hashmap_or_hashset) 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.

isHashable
template isHashable(T)

Is true iff T can be put in a hashset or hashmap.

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.

needsMove
template needsMove(T)

True if a T needs to be passed by move instead of value.

Meta