rtti cast

Simon Buerger krox at gmx.net
Thu May 1 15:31:17 PDT 2008


BCS wrote:
> this work?
> 
> if (auto y = cast(A)x)
>     y.function_A();
> else if(auto y = cast(B)x)
>     y.function_B();
> 

Well, honestly I'm really impressed. Thats perfectly what I wanted. 
Seems to be standard, but I didn't knew about it *lolz*. Okay, seems 
to be solved then. Thanks.



More information about the Digitalmars-d mailing list