rtti cast

terranium spam at here.lot
Fri May 2 06:47:32 PDT 2008


Simon Buerger Wrote:

> 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.

OMG invalid cast doesn't throw exception????



More information about the Digitalmars-d mailing list