Koroskin Denis schrieb:
> Or use
> 
> ....
> if ( elem.classinfo !is derivedA.classinfo ) {
>     // do stuff
> }
> ....
> 
> to skip derivedA instances only (and not derivatives).
you can reuse the casted ref in the same if:
if ( auto o = cast(derivedA)elem ) {
     /* do stuff, use o */
}