B2007中 codeguard 仿函的支持可能有
std::vector<MyClass> V ;
int a ;
class FunctionalOP
{bool operator() (MyClass const &A , int a) {return A.ID < a; }};
一般我用仿函,以得到比普通函更快的果:
std::lower_bound(V.begin(),V.end(),a,FunctionalOP());
可是在一目中(多BPL共用),打codeguard,致程序退出生常,法正常。
出在行句上:std::lower_bound(V.begin(),V.end(),a,FunctionalOP());
想不通在哪,改成:
FunctionalOP F ;
std::lower_bound(V.begin(),V.end(),a,F);
模居然常了,於是目中所有用到仿函的地方都改成似模式,重新行,果然,BUG了。
注:不打 codeguard 常,只是 codeguard 可以我找到很多 BUG .
我在一 exe 中,在的exe 中居然出BUG,好好的。只好情下,供考。
哪清楚 codeguard 定的,告我,codeguard有的定付仿函的。
[解决办法]
学习来了。
[解决办法]
帮顶,我也有codeguard方面的问题,期待大牛!