Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-08-16 05:47:53

Samuel wrote:
> [The message I am replying to was sent from a newsgroup and I am
> sending my reply (this) as a message to the list.]
> "Edward Diener" <eddielee_at_[hidden]> wrote in message
> news:cfmhi0$4fd$
>> What Mr. Dimov is saying is that it is impossible to place the code
>> you would like to use above in Boost because it would affect other
>> Boost libraries which do not need RTTI to work.
> That's no problem. The Boost headers already have more than 400
> (including comment) lines that test for the "BOOST_MSVC" preprocessor
> symbol. In other words, there is already an abundance of code that is
> relevant only to MS VC.

This is irrelevant. Many Boost libraries work fine under MSVC with RTTI
"disabled". Note that under MSVC /GR- does not disable RTTI altogether; only
polymorphic types are affected. For example, typeid(T) still works.

>> Furthermore if it were placed in
>> the header file of a library which did need RTTI to work, just
>> including that header file, without actually using code in it that
>> needed RTTI such as dynamic_cast, would cause an immediate compile
>> time error.
> Perhaps. I hope, though, that the possibility that it might not be
> useful won't prevent someone from communicating the idea to someone
> familiar with the relevant headers, since there is a possibility that
> it might be useful. I have more confidence in the developers that a
> solution is possible.
> I might have missed something, but I don't understand why it is
> relevant to say that it won't work. It might not work, but it might
> work. Yet you are saying it definitely won't work. That seems
> innapropriate to me.

The "easy" solution you proposed doesn't work because it's too

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at