All challenges
Multiple ChoiceHard 45s

variant visit return type & exhaustive

`std::visit` requires that the visitor be callable for:
Options
  1. 1Only the currently-active alternative at runtime, checked with a hidden switch before dispatch.
  2. 2The common base type shared by all alternatives in the variant, to allow uniform handling.
  3. 3Only the first alternative of the variant by default, with the rest reachable via overloads.
  4. 4Every alternative in the variant (exhaustively), otherwise it is a compile error.

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