update dir

This commit is contained in:
light-city
2019-07-24 22:13:01 +08:00
parent 96ea146c60
commit 16cade9752
14 changed files with 575 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
// 在使用时需要注意被转换对象obj的类型T1必须是多态类型即T1必须公有继承自其它类或者T1拥有虚函数继承或自定义。若T1为非多态类型使用dynamic_cast会报编译错误。
// A为非多态类型
class A{
};
//B为多态类型
class B{
public: virtual ~B(){}
};
//D为多态类型
class D: public A{
};
//E为非多态类型
class E : private A{
};
//F为多态类型
class F : private B{
}