import optional: Optional; class C {} struct S {} import std.meta: AliasSeq; foreach (T; AliasSeq!(int, int*, S, C, int[], S[], C[])) { alias CT = const T; alias IT = immutable T; alias ST = shared T; static assert(is(OptionalTarget!(Optional!T) == T)); static assert(is(OptionalTarget!(Optional!CT) == CT)); static assert(is(OptionalTarget!(Optional!IT) == IT)); static assert(is(OptionalTarget!(Optional!ST) == ST)); }
Returns the target type of a optional.