All challenges
Multiple ChoiceHard 45s

Empty base optimization

What is the Empty Base Optimization (EBO)?
Options
  1. 1Empty classes always occupy 1 byte, and EBO cannot change that for bases or members.
  2. 2It removes every empty member and base from a class entirely, making its sizeof equal 0.
  3. 3An empty base class sub-object may occupy zero bytes (share the address of a member), saving size in templates like allocators.
  4. 4It merges two empty classes into a single shared instance so only one of them is stored.

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle