Hacker News new | ask | show | jobs
by spacechild1 24 days ago
What's the "sequence point operator"?
1 comments

,
That'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?
See 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...

Thanks!