以下
std::tr1::bind(&GameLevel::health,
currLevel,
_1)
报错
error C2065: '_1' : undeclared identifier
原因
见MSDN\Standard C++ Library TR1 Extensions Reference\<functional> (TR1) Object _1 Object Description Placeholders for replaceable arguments. namespace placeholders { extern unspecified _1, _2, ... _M } // namespace placeholders (within std::tr1)
结论
std::tr1::bind(&GameLevel::health,
currLevel,
std::tr1::placeholders::_1) ---effiective c++ ver.3---