阅读背景:

使用模板参数添加/删除数据成员?

来源:互联网 

Consider the following code :

请考虑以下代码:

template<bool AddMembers> class MyClass
{
    public:
        void myFunction();
        template<class = typename std::enable_if<AddMembers>::type> void addedFunction();

    protected:
        double myVariable;
        /* SOMETHING */ addedVariable;
};
temp



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: