Denis Koroskin:
> void doSomething(T)(int i) {
> if (i == 0) {
> #if (is(T == A)) {
> A.SomeAlias x;
> #} else if (is(T == B)) {
> B.SubType x;
> #} else {
> T x;
> #}
>
> x = ... whatever
> }
> else
> int y = x;
> }
A different possibility is to use {# ... #}
static if (is(T == A)) {#
A.SomeAlias x;
#} else if (is(T == B)) {#
Bye,
bearophile
