P
Pavel
Let us assume that A and B are classes, the variable aPtr has type A*,
and the code containing the following assert statement compiles without
error:
assert(!dynamic_cast<B*>(aPtr)
|| (dynamic_cast<B*>(aPtr) == static_cast<B*>(aPtr)));
Can A and B be defined in a way that the assertion would fail?
TIA,
-Pavel
and the code containing the following assert statement compiles without
error:
assert(!dynamic_cast<B*>(aPtr)
|| (dynamic_cast<B*>(aPtr) == static_cast<B*>(aPtr)));
Can A and B be defined in a way that the assertion would fail?
TIA,
-Pavel