⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boost_no_rtti.ipp

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 IPP
字号:
//  (C) Copyright John Maddock 2008.//  Use, modification and distribution are subject to the//  Boost Software License, Version 1.0. (See accompanying file//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)//  See http://www.boost.org/libs/config for most recent version.//  MACRO:         BOOST_NO_RTTI//  TITLE:         RTTI unavailable//  DESCRIPTION:   The compiler does not support RTTI in this mode#include <typeinfo>class A{public:   A(){}   virtual void t();};void A::t(){}class B : public A{public:   B(){}   virtual void t();};void B::t(){}namespace boost_no_rtti{int check(const A& a){   return typeid(a) == typeid(B) ? 0 : 1;}int test(){   try{      B b;      return check(b);   }   catch(...)   {      return 1;   }}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -