All challenges
Multiple ChoiceIntermediate 45s

void_t detection idiom

`std::void_t<Ts...>` is most commonly used to:
Options
  1. 1Cast any type to void for its side effects, discarding the expression's value in a template context.
  2. 2Remove cv-qualifiers (const and volatile) from a type, yielding the underlying unqualified type.
  3. 3Guard against redefinition of templates across translation units by giving each an internal linkage name.
  4. 4Detect validity of an expression (e.g. whether a member type or operation exists) via a SFINAE partial specialization.

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