Struct Flattening

Jarrett Billingsley jarrett.billingsley at gmail.com
Tue Apr 21 22:42:34 PDT 2009


On Wed, Apr 22, 2009 at 1:36 AM, Jarrett Billingsley
<jarrett.billingsley at gmail.com> wrote:
>
> template FlattenJoint(T : Joint!(U), U...)
> {
>        alias FlatJoint!(U) FlattenJoint;
> }

Ah, I just thought of this!

template FlattenJoint(T : Joint!(U), U...)
{
	alias FlatJoint!(typeof(T.ranges)) FlattenJoint;
}

A bit less elegant, but it actually works.



More information about the Digitalmars-d mailing list