Macro Operator List

99封情书 提交于 2021-01-27 11:28:10

问题


I know about Macro's Stringizing operator (#) and I recently learned about the (##) Concatenation operator: Preprocessor Stringizing Operator with String Literal Prefixes

Are there any other macro operators that are available to me?

I know that Boost has a pretty extensive suite that they've put together, however for the purposes of this question I'm just asking about Macro operator support defined by the standard.


回答1:


As is mentioned by Cyber's comment the Sringizing ( # ) and Concatenation Operators ( ## ) are the only macro operators defined in C++: Macro Operator List

This link also illiterates the list of predefined macros that the standard defines. Which are also available for use in macros, though they're not actually operators.

If you're not into cross platform compatibility it may also be worth noting that Visual C++ provides one non-standard operator, the Charizing Operator ( #@ ): https://msdn.microsoft.com/en-us/library/91tt6dfs.aspx



来源:https://stackoverflow.com/questions/30031175/macro-operator-list

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