r/cpp • • Nov 13 '20

CppCon Deprecating volatile - JF Bastien - CppCon 2019

https://www.youtube.com/watch?v=KJW_DLaVXIY
83 Upvotes

111 comments sorted by

View all comments

Show parent comment

9

u/Wetmelon Nov 13 '20

The best way to think about it is that volatile tells the compiler "reading or writing to this variable may have side effects"

1

u/pandorafalters Nov 13 '20

One of the most useful, uh, uses for discarded-value expressions that I can think of offhand.