Re:Modern C++ gamedev: thoughts and misconceptions
by klibertp on Saturday May 16, 2020 @01:27PM
(#23205376)
Yeah, I figured it might not be currently possible. I was thinking about something like Scala HList[1], which provides a map/flatMap (which enables for-loop) method for tuples (among other functionality).
[1] https://github.com/milessabin/shapeless/wiki/Feature-overvie...
Re:Modern C++ gamedev: thoughts and misconceptions
by gpderetta on Monday May 18, 2020 @05:51AM
(#23220374)
boost.fusion, boost.hana provide similar functionality (i.e. arbitrary runtime or compile time transformations over tuple-like objects) but they are relatively large dependencies and it is not worth it just for a tuple for-each.
Edit: also the default comma operator discards its lhs, it is pretty much always used for its side effects.