safer casts - take II

terranium spam at here.lot
Tue May 13 13:27:25 PDT 2008


terranium Wrote:

> BCS Wrote:
> 
> > I'm not seeing it, example please?
> 
> void foo(T arg)
> {
>   auto handle=myhashtable[arg.classinfo];
>   //handle can be data or delegate for increased functionality
> }

I thought it's a known use case (in C# it's used widely and handles value types too).



More information about the Digitalmars-d mailing list