ocean.meta.traits.Basic

Basic traits allowing to distinguish various types between each other. Any more convoluted traits dedicated to specific type kinds should go in dedicated modules.

NB: because this module is often used as purely compile-time dependency it used built-in asserts instead of ocean.core.Test to reduce amount of cyclic imports. ocean.meta modules in general are not supposed to import anything outside of ocean.meta.

Members

Enums

ArrayKind
enum ArrayKind

Used by other traits to distinguish between dynamic and static arrays instead of plain bool values.

TypedefKind
enum TypedefKind

Used as result type for isTypedef trait.

Functions

isManifestConstant
bool isManifestConstant()

Check if a constant is manifest constant

isManifestConstant
bool isManifestConstant()

Check if the type of a member inside a struct or class is a D manifest constant

Templates

isAggregateType
template isAggregateType(T)
isArrayType
template isArrayType(T)

Check if type is an array type and which kind of array it is

isBasicArrayType
template isBasicArrayType(T)
isCallableType
template isCallableType(T)
isCharType
template isCharType(T)
isComplexType
template isComplexType(T)
isFloatingPointType
template isFloatingPointType(T)
isFunctionType
template isFunctionType(T)
isImaginaryType
template isImaginaryType(T)
isIntegerType
template isIntegerType(T)
isPointerType
template isPointerType(T)
isPrimitiveType
template isPrimitiveType(T)

Primitive types are the types from which one or multiple other types cannot be derived from using the `is()` expression or corresponding template type parameter specialisation. The following types are not primitive: - arrays (static, dynamic and associative) and pointers, - classes structs and unions, - delegates, function pointers and functions (function pointer base types), - enums and typedefs.

isRealType
template isRealType(T)
isReferenceType
template isReferenceType(T)
isSignedIntegerType
template isSignedIntegerType(T)
isTypedef
template isTypedef(T)

Determines if T is a typedef of some kind

isUnsignedIntegerType
template isUnsignedIntegerType(T)
staticArrayLength
template staticArrayLength(T : U[Dim], U, size_t Dim)

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).