Boost logo

Boost Users :

From: Jonathan Lennox (lennox_at_[hidden])
Date: 2004-01-27 11:40:09


Is it possible to use boost::shared_ptr<> without RTTI being enabled? I'm
trying to port some code to the Sharp Zaurus, and its GUI libraries are all
compiled with the G++ flags -fno-exceptions -fno-rtti. Boost seems to
support the former flag just fine, but has problems with the latter:

g++ -g -O2 -Wall -fno-rtti -fno-exceptions -o sipua/main.o -c ../sipua/main.cpp
In file included from ../libcine/boost/shared_ptr.hpp:27,
                 from ../rtplib++/rtptypes.h:8,
                 from ../rtplib++/rtpsession.h:14,
                 from ../sipua/radio.h:11,
                 from ../sipua/main.cpp:18:
../libcine/boost/detail/shared_count.hpp: In member function `virtual void*
   boost::detail::sp_counted_base_impl<P, D>::get_deleter(const
   std::type_info&)':
../libcine/boost/detail/shared_count.hpp:267: error: cannot use typeid with
   -fno-rtti
In file included from ../rtplib++/rtptypes.h:8,
                 from ../rtplib++/rtpsession.h:14,
                 from ../sipua/radio.h:11,
                 from ../sipua/main.cpp:18:
../libcine/boost/shared_ptr.hpp: In function `D* boost::get_deleter(const
   boost::shared_ptr<U>&)':
../libcine/boost/shared_ptr.hpp:431: error: cannot use typeid with -fno-rtti

What is the typeid call in the get_deleter functions doing? Is there any
way to work around or disable this?

Thanks.

-- 
Jonathan Lennox
lennox at cs dot columbia.edu

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