All challenges
Multiple ChoiceBeginner 45s

std::generator Suspension Semantics

What does std::generator (C++23) primarily model as a range whose iterators drive a coroutine?
Options
  1. 1An eager, fully materialized container of all values produced by the coroutine body
  2. 2An asynchronous stream of values that requires a scheduler and executor to resume it
  3. 3A lazy synchronously-produced sequence whose resumption is driven by iterator ++/deref
  4. 4A compile-time-only constexpr range whose values are known entirely during translation

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