definition to expand macro then apply to pragma message

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了definition to expand macro then apply to pragma message相关的知识,希望对你有一定的参考价值。

/* Some test definition here */

#define DEFINED_BUT_NO_VALUE

#define DEFINED_INT 1

#define DEFINED_STR "ABC"


/* definition to expand macro then apply to pragma message */

#define VALUE_TO_STRING(x) #x

#define VALUE(x) VALUE_TO_STRING(x)

#define VAR_NAME_VALUE(var) #var "="  VALUE(var)


/* Some example here */

#pragma message(VAR_NAME_VALUE(NOT_DEFINED))

#pragma message(VAR_NAME_VALUE(DEFINED_BUT_NO_VALUE))

#pragma message(VAR_NAME_VALUE(DEFINED_INT))

#pragma message(VAR_NAME_VALUE(DEFINED_STR))


以上是关于definition to expand macro then apply to pragma message的主要内容,如果未能解决你的问题,请参考以下文章

springboot整合gson打开swagger报错:Unable to render this definition。The provided definition does not specif

THE DEFINITIVE GUIDE TO DEBUGGING JAVASCRIPT

expand linux partition to new size

swagger--Failed to load API definition.

.Net WabApi Swagger Failed to load API definition

RestTemplate的异常 Not enough variables available to expand