Boost logo

Boost Users :

From: peter_foelsche_at_[hidden]
Date: 2008-08-13 12:25:58


I don't see any possible reason to disable RTTI

-----Original Message-----
From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Anteru
Sent: Wednesday, August 13, 2008 08:22
To: boost-users_at_[hidden]
Subject: [Boost-users] [exception] RTTI

Hi,

I just upgrade to Boost 1.36, and while I'm not using Boost::exception,
it gets included somewhere (gotta investigate that). That's no problem,
but as my project does not use RTTI, but Boost::exception does, I'm
getting warnings that the typeid() operator is used.

Happens at two lines,

Q:\Boost\include\boost/exception/exception.hpp(74) : warning C4541:
'typeid' used on polymorphic type 'boost::exception' with /GR-;
unpredictable behavior may result

Q:\Boost\include\boost/exception/exception.hpp(81) : warning C4541:
'typeid' used on polymorphic type 'boost::exception' with /GR-;
unpredictable behavior may result

Is there any way to disable this? After all, I'm not using
boost::exception specifically, and I don't want to enable RTTI just to
get rid of the warning. I'm fine if the diagnostic message becomes
garbage then, after all, one usage is just to get the name of the class
(typeid(*this).name), which may even return bogus results as typeid is
not required to return some meaningful name.

Cheers,
   Anteru

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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