Boost logo

Boost Users :

From: Yan Drugalya (ydrugalya_at_[hidden])
Date: 2007-12-25 10:30:18


Folks,

I have class some class Circle which is derived from Shape class. I want to
get rid from RTTI.

In order that I did following:

BOOST_CLASS_TYPE_INFO(

    Circle,

    extended_type_info_no_rtti<Circle>

)

BOOST_CLASS_EXPORT(Circle)

const char * Circle::get_key() const {

    const boost::serialization::extended_type_info *eti

        = boost::serialization::type_info_implementation<Circle>

            ::type::get_instance();

    return eti->get_key();

}

But even after that, if I try to compile project a lot of waring appear:

warning C4541: 'dynamic_cast' used on polymorphic type
'boost::archive::detail::basic_oarchive' with /GR-; unpredictable behavior
may result

it also fails with exception during runtime.

What also need to be done to completely get rid form RTTI



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