Templates and stringof...

David Nadlinger see at klickverbot.at
Sat Aug 4 01:25:26 PDT 2012


On Saturday, 4 August 2012 at 07:57:46 UTC, Philippe Sigaud wrote:
> It uses __traits(parent, ) and __traits(qualifier, ), which are 
> much more
> 'modern' and well-behaved.

An example of what I mean: Try this with your CurryTemplate from 
dranges:

---
import dranges.templates;

template Foo(A, B) {
     pragma(msg, A.stringof, " ", B.stringof);
}

alias CurryTemplate!Foo FooCurried;
alias FooCurried!int FooInt;
alias FooInt!string Test;
---

David


More information about the Digitalmars-d-learn mailing list