Replace volatile stopSignalCounter ++ operator#31
Conversation
|
Logger.h is not used in Railcontrol.h. |
When I edited That went away when I included |
|
The information of Logger.h or the content of class Logger is not need to compile. But to prevent a warning I expect that namespace will prevent the warning without including the complete header file. |
|
I can take the commit out of the PR since I think technically it isn't required to fix the issue I was after. I only included it because it's changing the same file and it would be a conflict later. |
|
Another word to volatile or atomic: What I really need in the code is: So if you want to change, then do not remove/replace the volatile but remove the ++ operator, please. |
And that's exactly what you did. Thanks! |
1b814c0 to
609c3d5
Compare
|
I pushed an update, but I don't have an env where I can reproduce the failure at hand now so keeping it as draft. |
|
It is in state Draft. Therefore I can't merge. Can you change it? |
C++20 has deprecated the ++ and -- operations on volatile and C++26 is looking at removing them. This replaces them with an explicit update.
609c3d5 to
1cceda5
Compare
|
I just tested this in my tentative Fedora packaging build where I noticed it for the first time and I can see it now compiles. |
C++20 has deprecated the
++and--operations onvolatileand C++26 is looking at removing them. This replaces them with an explicit update.Fixes #30