
27 Aug
2002
27 Aug
'02
8:26 a.m.
From: "Olaf Petzold" <yg-boost-users@gmane.org>
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.