eris.core

Core type definitions, templates and helper procedures for D as betterC.

Members

Aliases

Unit
alias Unit = void[0]

Zero-sized type carrying no information at all.

err_t
alias err_t = int

Error code signaling; zero is success.

hash_t
alias hash_t = size_t

D uses size_t for hash values.

Functions

allocate
T[] allocate(size_t n)
T* allocate()

Allocates enough memory for a given number of elements of a certain type.

deallocate
void deallocate(T[] memory)
void deallocate(T* memory)

Frees previously allocated memory block.

opCmp
int opCmp(T lhs, T rhs)

Free-function version of opCmp, useful to compare primitive scalar types in generic code.