5 ms·
What's the "sequence point operator"?
by spacechild1 5mo ago
What's the "sequence point operator"?
- twoodfin 5mo ago,
- spacechild1 5mo agoThat's the comma operator. I didn't know you could overload it! That's pretty crazy. However, I have never seen anyone do that. Do you have any real world examples?
- addaon 5mo agoSee e.g. the very-popular Eigen library, in which the type CommaInitializer basically exists for the sole purpose of overloading `operator,`, allowing a cleaner matrix initialization syntax. https://gitlab.com/libeigen/eigen/blob/master/Eigen/src/Core/CommaInitializer.h https://gitlab.com/libeigen/eigen/blob/master/Eigen/src/Core...
- spacechild1 5mo agoThanks!