id summary reporter owner description type status milestone component version severity resolution keywords cc 2768 [any] Unique type_info nowake@… nasonov "Because typeid() does not return unique instance, we cannot use type_info instance pointer to compare types. And we cannot use type_info pointer with unorderd_*. # unorderd_map is useful to implement boost::any's multi method (visitor) to dispatch in constant-time. So I use static local variable in a function (like Singleton technique) to access type's type_info like this. ____________________________________________________________ {{{ namespace boost { class any { (snip) template static const std::type_info& any::typeinfo() { static const std::type_info& r(typeid(ValueType)); return r; } const std::type_info & type() const { //return content ? content->type() : typeid(void); return content ? content->type() : typeinfo(); } (snip) template class holder : public placeholder { (snip) virtual const std::type_info & type() const { //return typeid(ValueType); return typeinfo(); } (snip) }}}" Patches closed Boost 1.39.0 any Boost 1.38.0 Optimization wontfix any type_info typeid unique