Aggregates

Returns a tuple of each aggregate in the form of the Quirks template

@safe
template Aggregates (
alias aggregate
) if (
isAggregate!aggregate ||
isModule!aggregate
) {}

Members

Aliases

Aggregates
alias Aggregates = Members!aggregate.filter!(member => member.isAggregate)
Undocumented in source.

Examples

struct S {
    long id;
    int age;
    string name() {
        return "name";
    }

    struct Nested {
   
    }
}

alias aggregates = Aggregate!S;

static foreach (aggregate; aggregates) {
    pragma(msg, aggregate.type);
    pragma(msg, aggregate.name);
}

Meta