All challenges
Multiple ChoiceBeginner 45s

mutable lambda capture

What does adding `mutable` to a lambda do?
Options
  1. 1Makes the captured variables refer to the originals, turning by-value captures into references.
  2. 2Allows the lambda to be constexpr, so it can be evaluated at compile time when its captures permit it.
  3. 3Prevents the lambda from being copied, turning the closure type into a move-only type with a deleted copy.
  4. 4Allows the lambda's by-value captures to be modified inside the (non-const) operator().

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