The links seem to reference pointers. Your expression is essentially
Bar & r = reinterpret_cast<Bar&>(b);
But in this explicit form, I get two warnings:
warning: casting 'Bar*' to 'Bar&' does not dereference pointer [enabled by default] warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
But this is not a mistake, it would seem.
source share