mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
14 lines
231 B
C++
14 lines
231 B
C++
class Base {
|
|
virtual void f() { }
|
|
};
|
|
class Derived : public Base {
|
|
void f() { }
|
|
};
|
|
|
|
void v(Base *bp, Derived *d) {
|
|
d = dynamic_cast<Derived *>(bp);
|
|
}
|
|
|
|
void v_ref(Base &bp, Derived &d) {
|
|
d = dynamic_cast<Derived &>(bp);
|
|
} |