首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

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)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com