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
  • 26,736
  • 18
  • 85
  • 135
zmb
  • 7,125
  • 4
  • 37
  • 53

0 Answers0