KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Given the following class: class MyClass { public: int value() const { return value_; } private: volatile int value_; }; Does the value() member function also have to be marked as volatile to avoid getting optimized away or is it okay as written? Thanks.
Tags (comma-separated)
Save Edits
Cancel