reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
struct A {
  virtual ~A() {}
};
struct B : public A {};

void f() {
  const A *b = new B();
  const B *c1 = dynamic_cast<const B *>(b);
  const B *c2 = static_cast<const B *>(b);
  const B *c3 = reinterpret_cast<const B *>(b);
  A *c4 = const_cast<A *>(b);
}