template<typename TUpdate> void Tick(const TUpdate& update) { .. update();.. } m_timer.Tick([&]() { .user code. }); in DX12 sample Good ?
-
-
It's sane if the lambda is allocated once per object lifetime, and insane if once per frame.
-
In this example the lambda will be entirely inlined. If [&] references any free variables, those will will sit in a stack allocated object.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.