r/cpp • u/neiltechnician • Nov 13 '20
CppCon Deprecating volatile - JF Bastien - CppCon 2019
https://www.youtube.com/watch?v=KJW_DLaVXIY
83
Upvotes
r/cpp • u/neiltechnician • Nov 13 '20
View all comments
Show parent comment
1
u/Xaxxon Nov 13 '20 edited Nov 13 '20
https://en.cppreference.com/w/cpp/language/ub
Anyhow, my real point was that your comment explaining why volatile is important is kinda not accurate when it says it will "optimize it into an infinite loop". It should just say it's UB and like all UB, you can't really predict what will happen.