extractParameterStorageClassFlags

template extractParameterStorageClassFlags (
Attribs...
) {
enum ParameterStorageClass extractParameterStorageClassFlags;
}

Parameters

Attribs

The return value of __traits(getParameterStorageClasses)

Return Value

The bitwise OR of the equivalent ParameterStorageClass enums.

Examples

static void func(ref int ctx, out real result);

enum param1 = extractParameterStorageClassFlags!(
    __traits(getParameterStorageClasses, func, 0)
);
static assert(param1 == ParameterStorageClass.ref_);

enum param2 = extractParameterStorageClassFlags!(
    __traits(getParameterStorageClasses, func, 1)
);
static assert(param2 == ParameterStorageClass.out_);

enum param3 = extractParameterStorageClassFlags!(
    __traits(getParameterStorageClasses, func, 0),
    __traits(getParameterStorageClasses, func, 1)
);
static assert(param3 == (ParameterStorageClass.ref_ | ParameterStorageClass.out_));

Meta