std::type_info
| Defined in header <typeinfo> |  |  | 
|---|---|---|
| class type_info; |  |  | 
全班type_info保存有关类型的实现特定信息,包括类型的名称和比较两种类型的方法,以求相等或排序顺序。这是由typeid接线员。
大type_info类都不是CopyConstructible也不CopyAssignable...
成员函数
| (constructor) deleted | has neither default nor copy constructors (public member function) | 
|---|---|
| (destructor) virtual | derived objects are safe to delete through pointer-to-base (virtual public member function) | 
| operator= deleted | can not be copy-assigned (public member function) | 
| operator==operator!= | checks whether the objects refer to the same type (public member function) | 
| before | checks whether the referred type precedes referred type of another type_index object in the implementation defined order, i.e. orders the referred types (public member function) | 
| hash_code (C++11) | returns a value which is identical for the same types (public member function) | 
| name | implementation defined name of the type (public member function) | 
另见
| type_index (C++11) | wrapper around a type_info object, that can be used as index in associative and unordered associative containers (class) | 
|---|
 © cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

