MSVC (and ICC as well) have an option /GR ------------- /GR (Enable Run-Time Type Information) This option (/GR) adds code to check object types at run time. When this option is specified, the compiler defines the _CPPRTTI preprocessor macro. The option is cleared (/GR-) by default. -------------
This option is turned off by default. But projects, which uses typeid or dynamic_cast operators must compiled with that option turned on. I found using of typeid and dynamic_cast in 18.exception.cpp test and also dynamic_cast in include/loc/_locale.h (function __rw_get_facet()) and in include/tr1/_smartptr.h (function dynamic_pointer_cast()). Using of the function dynamic_pointer_cast() is found commented out in 2.smartptr.shared.cpp test. Using of the function __rw_get_facet() is found in _locale.h (function has_facet()) but has_facet() used in many other places. Should we enable this option by default to all projects or for the 18.exception project only? Farid.
