Boost logo

Boost Users :

From: Samuel (samuel_at_[hidden])
Date: 2004-08-14 20:15:06


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Wednesday, August 11, 2004 3:40 AM
Subject: Re: [Boost-users] RTTI for VC 6

> Samuel wrote:
> > VC 6 has an option for Run-Time Type Information (RTTI) that is
> > normally off. I was able to compile and execute a sample program that
> > had a problem. I noticed that Boost uses RTTI (such as the
> > dynamic_cast operator), so I checked to see if the option was on; it
> > was not. I turned the option on and the program worked.
> >
> > That problem is probably a known problem, but something such as the
> > following can be added somewhere to not allow a VC 6 program to even
> > compile if the RTTI option is off. I think it could make things a
> > little easier for some beginners.
> >
> > # if !defined(_CPPRTTI)
> > # error "Boost requires use of RTTI"
> > # endif
>
> Some parts of Boost need RTTI, some do not. It is not reasonable to reject
a
> program that doesn't ever invoke a dynamic_cast on a polymorphic type
(which
> is a level 1 warning IIRC) just because it happens to include a boost
> header.

I don't understand this. I did not reply earlier since I assumed it does not
matter, and I still assume that whoever might be concerned about this can be
the one to decide the relevance. However if you are saying that a warning
will result from not using dynamic_cast then you did not read my message.
The problem is that the compiled program did not work; it produced
unexpected results (I forget the details). The unexpected results could
easily cause someone else more work to solve.

There might have been a warning, but Boost produces so many other warnings
that I missed the warning if there was one. I don't like ignoring warnings
and I usually use the (VC) option that causes all warnings to be errors, but
I can't do that when I use Boost. I should try to eliminate the warnings and
I will make more attempts to do that soon.


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