Struct Flattening

tama repeatedly at gmail.com
Tue Apr 21 23:25:43 PDT 2009


On Wed, 22 Apr 2009 14:42:34 +0900, Jarrett Billingsley  
<jarrett.billingsley at gmail.com> wrote:

> 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;
> }

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

How about this?

-- 
tama <repeatedly at gmail.com>
http://profile.livedoor.com/repeatedly/
メンバー募集中
http://tpf.techtalk.jp/



More information about the Digitalmars-d mailing list