用宏定义成员函数,VC6的类视图显示错误,实际函数可以使用。

VC7没此问题。


#define ConstGetMemFunMac2(varName,funName,retType)\
 retType funName()const{return varName;};

class A
{
public:
    ConstGetMemFunMac2(m_x,GetX,int);
    int m_x;
};


posted on 2016-06-04 15:06  闻缺陷则喜何志丹  阅读(1)  评论(0编辑  收藏  举报  来源