>d:\program files (x86)\microsoft visual studio 11.0\vc\include\xrefwrap(431): error C2440: “return”: 无法从“void”转换为“bool” (..\Classes\HelloWorldScene.cpp) 1> void 类型的表达式不能转换为其他类型 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(239): 参见对正在编译的函数 模板 实例化“_Ret std::_Callable_obj<_Ty>::_ApplyX<_Rx,cocos2d::Touch,cocos2d::Event>(_V0_t &&,_V1_t &&)”的引用 1> with 1> [ 1> _Ret=bool, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Rx=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event * 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(239): 参见对正在编译的函数 模板 实例化“_Ret std::_Callable_obj<_Ty>::_ApplyX<_Rx,cocos2d::Touch,cocos2d::Event>(_V0_t &&,_V1_t &&)”的引用 1> with 1> [ 1> _Ret=bool, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Rx=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event * 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(239): 编译类 模板 成员函数“bool std::_Func_impl<_Callable,_Alloc,_Rx,_V0_t,_V1_t>::_Do_call(_V0_t &&,_V1_t &&)”时 1> with 1> [ 1> _Callable=_MyWrapper, 1> _Alloc=std::allocator<std::_Func_class<bool,cocos2d::Touch *,cocos2d::Event *>>, 1> _Rx=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event * 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(516): 参见对正在编译的类 模板 实例化“std::_Func_impl<_Callable,_Alloc,_Rx,_V0_t,_V1_t>”的引用 1> with 1> [ 1> _Callable=_MyWrapper, 1> _Alloc=std::allocator<std::_Func_class<bool,cocos2d::Touch *,cocos2d::Event *>>, 1> _Rx=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event * 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(516): 参见对正在编译的函数 模板 实例化“void std::_Func_class<_Ret,_V0_t,_V1_t>::_Do_alloc<_Myimpl,_Ty,_Alloc>(_Fty &&,_Alloc)”的引用 1> with 1> [ 1> _Ret=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event *, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Alloc=std::allocator<std::_Func_class<bool,cocos2d::Touch *,cocos2d::Event *>>, 1> _Fty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8> 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(516): 参见对正在编译的函数 模板 实例化“void std::_Func_class<_Ret,_V0_t,_V1_t>::_Do_alloc<_Myimpl,_Ty,_Alloc>(_Fty &&,_Alloc)”的引用 1> with 1> [ 1> _Ret=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event *, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Alloc=std::allocator<std::_Func_class<bool,cocos2d::Touch *,cocos2d::Event *>>, 1> _Fty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8> 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(516): 参见对正在编译的函数 模板 实例化“void std::_Func_class<_Ret,_V0_t,_V1_t>::_Reset_alloc<_Ty,std::allocator<std::_Func_class<_Ret,_V0_t,_V1_t>>>(_Fty &&,_Alloc)”的引用 1> with 1> [ 1> _Ret=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event *, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Fty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Alloc=std::allocator<std::_Func_class<bool,cocos2d::Touch *,cocos2d::Event *>> 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(516): 参见对正在编译的函数 模板 实例化“void std::_Func_class<_Ret,_V0_t,_V1_t>::_Reset_alloc<_Ty,std::allocator<std::_Func_class<_Ret,_V0_t,_V1_t>>>(_Fty &&,_Alloc)”的引用 1> with 1> [ 1> _Ret=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event *, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Fty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Alloc=std::allocator<std::_Func_class<bool,cocos2d::Touch *,cocos2d::Event *>> 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(692): 参见对正在编译的函数 模板 实例化“void std::_Func_class<_Ret,_V0_t,_V1_t>::_Reset<_Ty>(_Fty &&)”的引用 1> with 1> [ 1> _Ret=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event *, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Fty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8> 1> ] 1> d:\program files (x86)\microsoft visual studio 11.0\vc\include\functional(692): 参见对正在编译的函数 模板 实例化“void std::_Func_class<_Ret,_V0_t,_V1_t>::_Reset<_Ty>(_Fty &&)”的引用 1> with 1> [ 1> _Ret=bool, 1> _V0_t=cocos2d::Touch *, 1> _V1_t=cocos2d::Event *, 1> _Ty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>, 1> _Fty=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8> 1> ] 1> d:\test\classes\helloworldscene.cpp(44): 参见对正在编译的函数 模板 实例化“std::function<_Fty> &std::function<_Fty>::operator =<HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>>(_Fx &&)”的引用 1> with 1> [ 1> _Fty=bool (cocos2d::Touch *,cocos2d::Event *), 1> _Fx=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8> 1> ] 1> d:\test\classes\helloworldscene.cpp(44): 参见对正在编译的函数 模板 实例化“std::function<_Fty> &std::function<_Fty>::operator =<HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8>>(_Fx &&)”的引用 1> with 1> [ 1> _Fty=bool (cocos2d::Touch *,cocos2d::Event *), 1> _Fx=HelloWorld::init::<lambda_47d8d039f668b53728fe566a69062bc8> 1> ]
匿名函数没有写返回值。
时间: 2024-10-08 13:59:11