title: Is the Empty Base Class Optimization now a mandatory optimization (at least for standard-layout classes)?
body: <p>According to <strong>C++11</strong> <em>9.1/7 (draft n3376)</em>, a <em>standard-layout</em> class is a class that:</p>
  <blockquote>
  <ul>
  <li><p>has no non-static data members of type non-standard-layout class (or array of such types) or reference,</p>
  </li>
  <li><p>has no virtual functions (10.3) and no virtual base classes (10.1),</p>
  </li>
  <li><p>has the same access control (Clause11) for all non-static data members,</p>
  </li>
  <li><p>has no non-standard-layout base classes,</p>
  </li>
  <li><p>either has no non-static data members in the most derived class and at most one base class with non-static data members, or has no base classes with non-static data members, and</p>
  </li>
  <li><p>has no base classes of the same type as the first non-static data member.</p>
  </li>
  </ul>
  </blockquote>
  <p>it follows that an empty class is a <em>standard-layout</em> class; and that another class with an empty class as a base is also a <em>standard-layout</em> class provided the first non-static data member of such class is not of the same type as the base.</p>
  <p>Furthermore, <em>9.2/19</em> states that:</p>
  <blockquote>
  <p>A pointer to a standard-layout struct object, suitably converted using a <code>reinterpret_cast</code>, points to its initial member (or if that member is a bit-field, then to the unit in which it resides) and vice versa. [ Note: There might therefore be unnamed padding within a standard-layout struct object, but not at its beginning, as necessary to achieve appropriate alignment. —end note]</p>
  </blockquote>
  <p>This seems to imply that the <em>Empty Base Class Optimization</em> is now a mandatory optimization, at least for <em>standard-layout</em> classes. My point is that if the empty base optimization isn't mandated, then the layout of a <em>standard-layout</em> class would not be standard but rather depend on whether the implementation implements or not said optimization. Is my reasoning correct, or am I missing something?</p>