Boost logo

Boost Users :

From: Olaf Petzold (yg-boost-users_at_[hidden])
Date: 2002-08-27 09:52:07


Peter Dimov wrote:

> From: "Olaf Petzold" <yg-boost-users_at_[hidden]>
>> Thanks for answers,
>>
>> the const ptr was a fault.
>>
>> Well, the following example shows the problem in detail:
>
> Two errors. First, Spec is not a polymorphic type - add a virtual function
> (destructor, for instance) to enable dynamic_cast / polymorphic_cast.
> Second, the exception thrown is std::bad_cast, not std::bad_alloc.

Oh dear, it's too hot here ...
It's working now - thanks a lot.

Olaf


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net