[Issue 5109] some advise

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 9 03:32:03 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=5109


christoph at nerdtools.de <christoph at nerdtools.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christoph at nerdtools.de


--- Comment #3 from christoph at nerdtools.de <christoph at nerdtools.de> 2014-01-09 03:31:58 PST ---
D is actually able to do something like partial templates.
Here is an example that works:

struct P(A...)
{
    alias Args = A; 
}

alias  P!int P1;
P1 p1; // P!int

alias P!(P1.Args,long) P2;
P2 p2; // P!(int, long)


void main() {
    writeln(typeid(P2));  // Output: main.P!(int, long).P
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list