Yes, I can use std::initializer_list. Yes, even easier, I can do aggregate initialization. But how does this work? I can\'t seem to fold my head around C++17\'s fol
std::initializer_list
Since the comma operator is left-associative, you would ideally use a left unary fold:
(...,void(arr[i++] = pack))
The cast to void is to make sure that the built-in comma operator is used. In this case, the handedness doesn't actually matter.
void