阅读背景:

如何防止编译出“未使用的”全局变量?

来源:互联网 

I'm using static initialisation to ease the process of registering some classes with a factory in C++. Unfortunately, I think the compiler is optimising out the 'unused' objects which are meant to do the useful work in their constructors. Is there any way to tell the compiler not to optimise out a global variable?I'm using static initialisation to ease the pro




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

分享到: