Any chance to call Tango as Extended Standard Library

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jan 18 13:51:41 PST 2009


BLS wrote:
> Look like this works... However it would be nice if we could place the 
> alias Tuple Pair stuff outside of foo()

I'm glad I waited a bit on that one :o). Nice work.

> module tt;
> import std.stdio;
> import std.typecons;
> 
> //alias Tuple!(K, "key", V, "value") Pair; This don't work

It doesn't work because at that time the symbols K and V are not 
visible. But this little simplification should work:

template Pair(K, V) {
     alias Tuple!(K, "key", V, "value") Pair;
}


Andrei



More information about the Digitalmars-d mailing list