Type deduction using switch case

David d at dav1d.de
Sun Feb 19 05:49:26 PST 2012


Am 19.02.2012 02:47, schrieb Nick Sabalausky:
> With exceptions in particular, I've often felt that we need some sort of
> templated catch:
>
> try {...}
> catch(TypeTuple!(ExceptionA, ExceptionB) e)
> {
>      // Common implementation, but NO need
>      // for that re-throwing abomination you'd
>      // inevitably need if you just caught
>      // a common base type.
> }
>

+1 best would be with built-in Tuples, but I guess built-in tuples are 
just a dream …




More information about the Digitalmars-d mailing list