79780472

Date: 2025-10-01 21:05:49
Score: 1
Natty:
Report link
  1. Yes, b2->bar() is safe.

  2. The this pointer inside Derived::bar() points to the start of the Derived object, not just the Base2 subobject.

  3. This is called pointer adjustment in multiple inheritance, and every major C++ compiler (GCC, Clang, MSVC) handles it correctly.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Anita Zeng