2013/11/15 pfultz2
Unfortunately, boost::type_info must derive from std::type_info for compatibility reasons.
It sounds like you just want to extend the functionality of `std::type_info`. Why not make `pretty_name()` a free function that accepts `std::type_info`? Also, an additional `compare_type_info()` function could be added as well to compare types portably. Plus, it would avoid the issues with using strange hacks that border on undefined behavior.
This may be useful, thou it can be achieved in other way: boost::type_index(var.get_type_info()).pretty_name(); boost::type_index(var1.get_type_info()) == var2.get_type_info();
* users want to use Boost without RTTI and fail
Additionally, `boost::type_info` could be a typedef to `std::type_info` when rtti is enabled and then to some internal type to manage type info when rtti is disabled.
Andrey Semashev already suggested something like this: #if HAS_RTTI typedef std::type_info type_info; #else typedef boost::template_info type_info; #endif This is possibly what must be done, thanks for pointing that out once more. -- Best regards, Antony Polukhin