Preliminary submission - std.rational and std.typelist

Philippe Sigaud philippe.sigaud at gmail.com
Sun Oct 7 00:23:33 PDT 2012


On Sat, Oct 6, 2012 at 8:01 PM, Arlen <arlen.ng at gmx.com> wrote:
> I'm not sure if TypeTuples work well when doing things like dimensional analysis.  For example, if you have two TypeTuples, A and B, what would the signature of the metafunction to merge the two look like?
>
> template Merge(A, B) { }
>
> won't work, and neither will
>
> template Merge(alias A, alias B) { }
>
> and you certainly can't do something like
>
> template Merge(AB...) { }

Double-stage templates (which reminds me of rocket science :)  )

template Merge(A...)
{
    template With(B...)
    { }
}


Usage:

Merge!(int,double,string).With!(double,byte)


More information about the Digitalmars-d mailing list