Consider a class layout :
| A | B | ( class B is derived from A )
0x0 0x8
of course, there is nothing to adjust on downcasting or upcasting. but is behaviour of compiler defined for this case in Standard.?
if not, then, in general, is static_casting of nullptr safe when there is no multiple inheritance.?
A * volatile a_ptr = nullptr ; // or change with B * and cast to A *
assert( ! static_cast< B * >( a_ptr ) ) ; // is that guaranteed by Standard.?
Does compiler always ( in all implementations ) do not perform adjustment.?
and more generally (for case of multiple inheritance), can compiler adjust nullptr within static_cast.?
related question, also unanswered.