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

typeinfo

此标头是类型支撑图书馆。

type_info

contains some type's information, generated by the implementation. This is the class returned by the typeid operator. (class)

bad_typeid

exception that is thrown if an argument in a typeid expression is null (class)

bad_cast

exception that is thrown by an invalid dynamic_cast expression, i.e. a cast of reference type fails (class)

简介

二次

代码语言:javascript
复制
namespace std {
  class type_info;
  class bad_cast;
  class bad_typeid;
}

二次

std::type_info

二次

代码语言:javascript
复制
class type_info {
public:
  virtual ~type_info();
  bool operator==(const type_info& rhs) const noexcept;
  bool operator!=(const type_info& rhs) const noexcept;
  bool before(const type_info& rhs) const noexcept;
  size_t hash_code() const noexcept;
  const char* name() const noexcept;
  type_info(const type_info& rhs) = delete; // cannot be copied
  type_info& operator=(const type_info& rhs) = delete; // cannot be copied
};

二次

std::bad_cast

二次

代码语言:javascript
复制
class bad_cast : public exception {
public:
  bad_cast() noexcept;
  bad_cast(const bad_cast&) noexcept;
  bad_cast& operator=(const bad_cast&) noexcept;
  const char* what() const noexcept override;
};

二次

std::bad_typeid

二次

代码语言:javascript
复制
class bad_typeid : public exception {
public:
  bad_typeid() noexcept;
  bad_typeid(const bad_typeid&) noexcept;
  bad_typeid& operator=(const bad_typeid&) noexcept;
  const char* what() const noexcept override;
};

二次

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com