For the new std.variant
Steve Teale
steve.teale at britseyeview.com
Mon Oct 31 10:59:05 PDT 2011
On Mon, 31 Oct 2011 11:50:42 -0400, Jesse Phillips wrote:
> typedef shouldn't exist anymore, use alias.
>
Jesse,
Maybe you want to do something like:
struct X
{
int a;
double b;
}
typedef X Y;
alias X Z;
void discriminate(T)(T t)
{
if (is(T == X))
writeln("It's an X");
else
writeln("No it's not");
}
void main()
{
Y y;
Z z;
discriminate(y);
discriminate(z);
}
Steve
More information about the Digitalmars-d
mailing list