mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
14 lines
250 B
C++
14 lines
250 B
C++
class Base {
|
|
virtual void f() { }
|
|
};
|
|
class Derived : public Base {
|
|
void f() { }
|
|
};
|
|
|
|
void DynamicCast(Base *bp, Derived *d) {
|
|
d = dynamic_cast<Derived *>(bp);
|
|
}
|
|
|
|
void DynamicCastRef(Base &bp, Derived &d) {
|
|
d = dynamic_cast<Derived &>(bp);
|
|
} |