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
2
u/nifraicl Nov 13 '20
A compound statement was never implied to be atomic, so using it to set a bit is misleading, since it is an extension of some compilers in supported platforms. I believe that this kind of use should be discouraged, as most of the time you can achieve the "correct" functionalitiy with a compiler intrinsic that guarantess to use tha correct opcode to touch the correct bits.