菜鸟看一个宏引发的问题

# ifndef ACE_VERSIONED_NAMESPACE_NAME //条件
//#  include "ace/Version.h"

// Preprocessor symbols will not be expanded if they are
// concatenated.  Force the preprocessor to expand them during the
// argument prescan by calling a macro that itself calls another that
// performs the actual concatenation.
#  define ACE_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA) ACE_ ## MAJOR ## _ ## MINOR ## _ ## BETA
#  define ACE_MAKE_VERSIONED_NAMESPACE_NAME(MAJOR,MINOR,BETA) ACE_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA)
#  define ACE_VERSIONED_NAMESPACE_NAME ACE_MAKE_VERSIONED_NAMESPACE_NAME(ACE_MAJOR_VERSION,ACE_MINOR_VERSION,ACE_BETA_VERSION)
# endif  /* !ACE_VERSIONED_NAMESPACE_NAME */

‘/’符表示忽略换行

# 表示把改变量字符串化
a##b 表示把a\b串连接。有没有空格不影响结果

猜你喜欢

转载自raojl.iteye.com/blog/281453
今日推荐