RE: [boost] Checking if RTTI is available.

In-Reply-To: <20DCDD8F0FCED411AC4D001083CF504501AA9741@MTL-EXCHANGE> sseefeld@art.ca (Stefan Seefeld) wrote (abridged):
Out of curiosity: why would anybody not use RTTI ? Why shouldn't compilers without RTTI just considered broken ?
It's generally more expensive than hand-rolled solutions, at least ones that don't have to cope with multiple virtual inheritance. (And I've yet to find a problem for which multiple virtual inheritance seemed like the best solution in C++.) In particular, VC++ ships with MFC, which has its own hand-rolled solution. If you use that, you may not want the overhead of RTTI. -- Dave Harris, Nottingham, UK

Dave Harris wrote:
In-Reply-To: <20DCDD8F0FCED411AC4D001083CF504501AA9741@MTL-EXCHANGE> sseefeld@art.ca (Stefan Seefeld) wrote (abridged):
Out of curiosity: why would anybody not use RTTI ? Why shouldn't compilers without RTTI just considered broken ?
In particular, VC++ ships with MFC, which has its own hand-rolled solution. If you use that, you may not want the overhead of RTTI.
And speaking of VC, another reason, which is the one I turn it off for, is that RTTI is implemented differently by each compiler/runtime (VC vs. CW for me). So if you are trying to write compiler interoperable code turning it off lets you ensure that you don't use that incompatible feature. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
participants (2)
-
brangdon@cix.compulink.co.uk
-
Rene Rivera