diff --git a/BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html b/BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html new file mode 100644 index 0000000..ab364c6 --- /dev/null +++ b/BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html @@ -0,0 +1,53 @@ + +
+ +![]() |
+Home | +Libraries | +People | +FAQ | +More | +
BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
+// In header: <boost/type_index.hpp>
+
+BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
+ | + |
// In header: <boost/type_index.hpp>
BOOST_TYPE_INDEX_REGISTER_CLASS
BOOST_TYPE_INDEX_REGISTER_CLASS is a helper macro that is used to help to emulate RTTI. Put this macro into the public section of polymorphic class to allow runtime type detection.
-Depending on the typeid() availability this macro will expand to nothing or to virtual helper function virtual const type_info& type_id_runtime() const
.
Example:
-class A { -public: - BOOST_TYPE_INDEX_REGISTER_CLASS - virtual ~A(){} -}; - -struct B: public A { - BOOST_TYPE_INDEX_REGISTER_CLASS -}; - -struct C: public B { - BOOST_TYPE_INDEX_REGISTER_CLASS -}; - -... - -C c1; -A* pc1 = &c1; -assert(boost::typeind::type_id<C>() == boost::typeind::type_id_runtime(*pc1)); --
-
@@ -70,7 +43,7 @@ |