hasIndirections

Evaluates to true if a variable of any type in T is a reference type or has members or elements of reference types. References are - dynamic and associative arrays, - pointers (including function pointers) and delegates, - classes.

Types that are not suitable to declare a variable, i.e. `void` and function types (the base types of function pointers) are not references.

If T is empty then the result is false.

template hasIndirections (
T...
) {}

Members

Static variables

hasIndirections
auto hasIndirections;
Undocumented in source.

Parameters

T

types to check (with no type the result is false)

Examples

static assert (!hasIndirections!(int));
static assert ( hasIndirections!(int[int]));
static assert (!hasIndirections!(void));

static struct S
{
    union
    {
        int[] arr;
        double f;
    }
}

static assert ( hasIndirections!(S[5]));

Meta