All challenges
Multiple ChoiceIntermediate 45s

extern template purpose

What does `extern template class Foo<int>;` do?
Options
  1. 1It declares that Foo<int> is abstract, so it can only be used as a base for derived types.
  2. 2It forbids the use of Foo<int> anywhere in the program, causing an error at every mention.
  3. 3It exports the template so it can be shared across DLL boundaries using the platform ABI.
  4. 4Suppresses implicit instantiation in that TU, expecting another TU to instantiate it — reduces compile/link time.

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