https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113683
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- MSVC rejects this also for the same reason: <source>(10): error C2243: 'static_cast': conversion from 'const B *' to 'const A *' exists, but is inaccessible clang accepts it though ...