关于预处理"##"
#define GET_ACCESSOR( x, y ) inline x Get##y() { return m_##y; }
怎么理解?
[解决办法]
$16.3.3/3
For both object-like and function-like macro invocations, before the replacement list is reexamined for more macro names to replace, each instance of a ## preprocessing token in the replacement list (not from an argument) is deleted and the preceding preprocessing token is concatenated with the following preprocessing token. If the result is not a valid preprocessing token, the behavior is undefined. The resulting token is available for further macro replacement. The order of evaluation of ## operators is unspecified.
GET_ACCESSOR(int, Status ) 相当于
先替换为
inline int Get##Status() { return m_##Status; }
然后删去##,前后相连
inline int GetStatus() { return m_Status; }