3

I saw Sean Parent's recent tweet showing the following function:

template <class F, class... Args>
void for_each_argument(F f, Args&&... args) {
    [](...){}((f(std::forward<Args>(args)), 0)...);
}

I can run it and it behaves as I would expect, but I can't understand how it works. Is that an empty lambda?

David
  • 27,652
  • 18
  • 89
  • 138
zmb
  • 7,605
  • 4
  • 40
  • 55

0 Answers0