On Thursday 31 October 2002 11:21 am, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | On Thursday 31 October 2002 10:57 am, Lars Gullik Bjønnes wrote: > >> Angus Leeming <[EMAIL PROTECTED]> writes: > >> | I read the recent thread about casting Insets up to > >> | their "real" type and thought I'd try and implement > >> | André's asAInset, asBInset, asCInset thing using > >> | templates. > >> | > >> | Unfortunately, it doesn't compile :-( > >> | > >> | Is their anyway to do this? > >> > >> Yes, by using my solution. > >> > >> I even posted it asked for testers... > | > | Which requires that dynamic_cast works. Here it does. > | I was trying instead to combine André's approach using > | virtual functions with your use of templates. Is that > | possible? > | > | Anyway, to answer your call for testers, this is what > | happens here: > > You left out the most interesting part: what compiler?
Both Compaq cxx 6.3 and g++ 2.95.4 work as expected. Angus