All challenges
Multiple ChoiceBeginner 45s

Most vexing parse resolution

T t(U()); is parsed as what, and how do you fix it to declare a variable initialized by a U constructor?
Options
  1. 1A variable; no fix needed, since the form declares t
  2. 2A function declaration; use braces T t{U{}} or extra parens
  3. 3A macro call; rename U to avoid function-style expansion
  4. 4A template instantiation; add typename for the dependent type

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