I'm glad my second effort was nearer the target
Since 'next' does not currently compile with gcc , maybe someone familiar with the code can look at this and integrate the fix or come up with a better one. I certainly would not want to get into deeper changes without a much better knowledge of the code base. Do you have folks doing that or it is this all code that was inherited from openPilot?
On an only mildly related note: The more syntactical candy they add to CPP, the more special cases they create that you need to know and the harder CPP is to use safely.
I don't think this is 'candy'. C was designed to be highly efficient and thus assumes a high degree of competence in the programmer in omitting a lot of safety checks. This was done intentionally because it was designed for writing operating systems, computer language compilers and such performance critical tasks. Since C became the defacto standard for a lot of userland GUI stuff a lot of far less able folks were using it to knock up human interface software where code speed was really no important. This lead to all the bugs crashes and security issues we are now plagued with. Mostly it was an inappropriate language choice for many of these tasks.
Object oriented languages are not designed to be ultra efficient: just consider all the object code which gets created to write a value to a simple integer 'property'. You call a setter method , which typically calls the getter method, compares the new value to the existing value and if it changes then conditionally actually makes the assignment to the protected integer variable, and then calls the 'changed' method.
ie a whole page of assembly language instructions instead of two or three.
Stricter syntax rules, eliminating things like the improper use of the rvalue seen here, are designed to remove some of the common sources of bugs and exploits which have become a major problem. I think there is a good reason for this kind of change and while it may be a pain removing the occasional line of dubious code, I think it is a move in the right direction, not "candy".