阅读背景:

C ++使用模板来避免编译器检查布尔值

来源:互联网 

Let's say I have a function:

假设我有一个功能:

template <bool stuff>
inline void doSomething() {
    if(stuff) {
        cout << "Hello" << endl;
    }
    else {
        cout << "Goodbye" << endl;
    }
}
temp



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

分享到: