宏运算符列表 [英] Macro Operator List

查看:87
本文介绍了宏运算符列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解Macro的Stringizing运算符(#),最近了解了( ## )串联运算符:解决方案

正如 Cyber​​的评论精简(#)和串联运算符( ## )是C ++中定义的唯一宏运算符: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.

解决方案

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

这篇关于宏运算符列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆