All challenges
Multiple ChoiceIntermediate 45s

std::function SBO Behavior

What is a correct statement about std::function small-buffer optimization (SBO)?
Options
  1. 1It is mandated by the standard for every callable whose size is up to 16 bytes or less
  2. 2It never allocates, so std::function is always a zero-allocation value wrapper
  3. 3It is a permitted (unspecified) optimization; large callables typically heap-allocate
  4. 4It only applies to plain function pointers, never to lambdas or functor objects

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