Re: std.algorithm and templates

2014-12-10 Thread bearophile via Digitalmars-d-learn
meat: class Woah(){} class Bro: Woah{} DList!Woah woahs; and I'm having trouble with.. foreach( bro; woahs.filter!( a => cast(Bro)a !is null)) import std.algorithm, std.container; class Woah {} class Bro : Woah {} void main() { DList!Woah woahs; foreach (bro; woahs[].filter!(a =>

std.algorithm and templates

2014-12-10 Thread meat via Digitalmars-d-learn
Hello! Thanks for the notice. I've been enjoying delving into D recently, and have made quite some progress, but I've become stumped on this one problem! I consider myself decent at natural debugging, but this problem has eluded me. I don't believe any of this problem is implementation specifi