The OpenD Programming Language

isErr

Checks if T is a instance of Err or if it is annotated with reflectErr.

template isErr (
T
) {
static if(is(T == enum) || isAggregateType!T)
static if(is(immutable T == immutable Err!V, V))
enum isErr;
static if(is(T == enum) || isAggregateType!T)
static if(!(is(immutable T == immutable Err!V, V)))
static if(hasUDA!(T, reflectErr))
enum isErr;
version(D_Exceptions)
static if(is(T == enum) || isAggregateType!T)
static if(!(is(immutable T == immutable Err!V, V)))
static if(!(hasUDA!(T, reflectErr)))
enum isErr;
version(!D_Exceptions)
static if(is(T == enum) || isAggregateType!T)
static if(!(is(immutable T == immutable Err!V, V)))
static if(!(hasUDA!(T, reflectErr)))
enum isErr;
static if(!(is(T == enum) || isAggregateType!T))
enum isErr;
}

Meta