
Hi all, I have this request from a colleague. Can anyone help me shed some light on his issue?:
I did not use the boost::shared_ptr in quite some time and I was surprised to find out that, more recently, the shared_ptr _requires_ RTTI to be enabled. I did some reading on the websites and groups and while I admit that the new version is more flexible, powerful, etc, I would have thought that they also left a switch in for the old behavior which did not require RTTI. In some projects, RTTI does not add any benefits and people obviously turn it off.
Is anybody aware of such a "switch" that will allow somebody to use boost::shared_ptr without RTTI?
Blessings, Foster -- Foster T. Brereton - Computer Scientist Software Technology Lab, Adobe Systems Incorporated fbrereto@adobe.com -- http://opensource.adobe.com

Foster Brereton wrote:
Hi all,
I have this request from a colleague. Can anyone help me shed some light on his issue?:
I did not use the boost::shared_ptr in quite some time and I was surprised to find out that, more recently, the shared_ptr _requires_ RTTI to be enabled. I did some reading on the websites and groups and while I admit that the new version is more flexible, powerful, etc, I would have thought that they also left a switch in for the old behavior which did not require RTTI. In some projects, RTTI does not add any benefits and people obviously turn it off.
Is anybody aware of such a "switch" that will allow somebody to use boost::shared_ptr without RTTI?
shared_ptr uses typeid(Type) in get_deleter. This functionality is available in most compilers even when RTTI is off, with g++ being the notable exception. In the spirit of being a notable exception, g++ also doesn't provide a predefined macro when -fno-rtti is used (or not used.) I can add BOOST_SP_DISABLE_GET_DELETER if this would help. If the review manager agrees that not having this macro is a bug in 1.33, it can even go into 1.34.
participants (2)
-
Foster Brereton
-
Peter Dimov