How to alias for identity
Martin Nowak
dawg at dawgfoto.de
Wed Oct 26 12:41:29 PDT 2011
I was using some templates to declare different parameters sets.
template unitA() {...}
template unitB() {...}
template unitC() {...}
I have a generic function that is parameterized by these units.
void foo(alias unit) {...}
Now unitA gets a specialization.
void foo(alias unit:unitA!()) {}
But here I'm a little stuck because this won't work in my case due to a
bug (there are more parameters).
http://d.puremagic.com/issues/show_bug.cgi?id=6701
Does anybody know of a way to test an alias for identity.
void foo(alias unit) if(unit == unitA!()) {} // won't work of course
martin
More information about the Digitalmars-d
mailing list