Multiple ChoiceHard 45s
Devirtualization opportunities
Under which condition can a compiler most reliably devirtualize a call through Base* to a virtual method?
Options
- 1Whenever the object is heap-allocated, so the type is known
- 2When the dynamic type is provably final or a known concrete type
- 3Only when LTO is disabled, or the types would be merged
- 4Only for inline virtual functions defined in a header body
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.