...
In the case of an old-style cast, the address adjustment will, however, take place if the cast is performed at a point where the structure of the class D
is known. This different, context-dependent behavior of the old-style cast can result in very challenging bugs.
Compliant Solution 3
Avoid casting to or from pointers to incomplete classes. If such a cast is, for some reason, absolutely necessary, prefer reinterpret_cast
to an old-style cast because it will exhibit the same behavior whether or not the class is incomplete.
Risk Assessment
XXX
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
ERR01-A | 1 (low) | 2 (probable) | 2 (high) | P4 | L3 |
...