You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't use an `Event` with `Callback` - it's non-trivial, so needs the
"full" form of `Callback`. `Callback` is being switched to not support
non-trivial functors by default to save ROM.
Use a `reference_wrapper` to a `UserAllocatedEvent` instead, which works
fine with the trivial-only `Callback`.
A `reference_wrapper` is small enough to fit in a `Callback`, and is
trivially-copyable, so works to decouple the event lifetime from the
callback. Having decoupled it, the event has program lifetime, so may as
well be `UserAllocatedEvent` for simplicity.
(`UserAllocatedEvent` could be trivial, but is too big to be placed in a
`Callback` directly in any case).
0 commit comments