Why is volatile deprecated in C++20?

倾然丶 夕夏残阳落幕 提交于 2020-07-28 14:18:23

问题


According to cppreference, most uses of the volatile keyword are to be deprecated in C++20. What is the disadvantage of volatile? And what is the alternative solution when not using volatile?


回答1:


There's a good talk by the c++ committee language evolution chair on why.

Brief summary, many of the places that volatile is being removed from didn't have any understandable meaning and just caused confusion.



来源:https://stackoverflow.com/questions/59223814/why-is-volatile-deprecated-in-c20

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!