简体   繁体   English

如何创建具有可变数量参数的宏包装器?

[英]How can I create a Wrapper to a a Macro with variable number of arguments?

I have a macro like 我有一个像

LOG_I(_module, _message, ...)

I need to create a wrapper to this macro 我需要为此宏创建一个包装器

#define WRAPPER_LOG(_module, _message, ...) LOG_I(_module, _message, ...)

How can I achieve this ? 我该如何实现?

It would work if you did 如果你这样做,那会工作

#define WRAPPER_LOG(_module, _message, ...) LOG_I(_module, _message, __VA_ARGS__)

but whether it is what you really need, is another matter. 但是这是否是您真正需要的是另一回事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM