Namespace Subspace :: sus :: boxed

The Box<T> type for heap allocation and other tools for type-erasure of concepts.

Classes

  • A heap allocated object.

  • A type erasure of a type satisfying a concept, which can be used as a reference without heap allocation or templates. Returned from dyn.

Functions

  • Type erases a reference to a type T& which satisfies a concept C, into a reference DynC& that also satisfies C but without templates.

Operators

  • Compares the inner value of two Box objects for ordering. This compares the values pointed to from the Box, not the pointers themselves.

  • Compares the inner value of two Box objects for equality. This does not perform pointer equality on the boxes themselves.

Concepts

  • A concept for generalized type erasure of concepts, allowing use of a concept-satisfying type T without knowing the concrete type T.