struct S {} class C {} interface I {} union U {} static assert( isAggregateType!S); static assert( isAggregateType!C); static assert( isAggregateType!I); static assert( isAggregateType!U); static assert( isAggregateType!(const S)); static assert( isAggregateType!(shared C)); static assert(!isAggregateType!int); static assert(!isAggregateType!string); static assert(!isAggregateType!(S*)); static assert(!isAggregateType!(C[])); static assert(!isAggregateType!(I[string])); enum ES : S { a = S.init } enum EC : C { a = C.init } enum EI : I { a = I.init } enum EU : U { a = U.init } static assert( isAggregateType!ES); static assert( isAggregateType!EC); static assert( isAggregateType!EI); static assert( isAggregateType!EU); static assert( isAggregateType!(const ES)); static assert( isAggregateType!(const EC));
Whether the given type is an "aggregate type" - i.e. a struct, class, interface, or union. Enum types whose base type is an aggregate type are also considered aggregate types.