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

Reply via email to