All challenges
Multiple ChoiceIntermediate 45s

Requires-clause vs requires-expression with concepts

In C++20, what does a requires-expression such as 'requires (T a) { a.foo(); }' evaluate to?
Options
  1. 1A runtime assertion checked at the call site
  2. 2A bool constant expression that is true if the requirements are well-formed
  3. 3A type that can be used as a template parameter
  4. 4A keyword that disables the function during overload resolution

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