Do non-static member variables in a C++ struct/class need to be marked as volatile to be treated as volatile in a member function?
Marking a member function volatile is like marking it const; it means that the receiver object is treated as though it were declared as a volatile T*. Consequentially, any reference to x or y will be treated as a volatile read in the member function. Moreover, a volatile object can only call volatile member functions. … Read more