Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-04-27 14:35:47


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk