News for hackers. Stuff that matters.
Re:C constructs that still don't work in C++ by spacechild1 on Monday May 25, 2026 @11:32AM (#48268047)
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?
Re:C constructs that still don't work in C++ by addaon on Monday May 25, 2026 @06:38PM (#48272719)
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...

Re:C constructs that still don't work in C++ by spacechild1 on Monday May 25, 2026 @10:33PM (#48274321)
Thanks!