All challenges
Multiple ChoiceHard 45s

CRTP Mixin Purpose

The Curiously Recurring Template Pattern (CRTP) `struct D : Base<D>` is mainly used to:
Options
  1. 1Reduce the number of template instantiations the compiler has to generate overall
  2. 2Enable virtual inheritance between the base and the derived class without duplication
  3. 3Provide dynamic_cast support so the base can recover the most-derived object type
  4. 4Achieve runtime polymorphism without vtable indirection by static dispatch

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