64,654
社区成员
发帖
与我相关
我的任务
分享
2>d:\microsoft visual studio 11.0\vc\include\utility(114): error C2166: 左值指定 const 对象
2> d:\microsoft visual studio 11.0\vc\include\utility(113): 编译类 模板 成员函数“std::pair<_Ty1,_Ty2> &std::pair<_Ty1,_Ty2>::operator =(const std::pair<_Ty1,_Ty2> &)”时
2> with
2> [
2> _Ty1=const int,
2> _Ty2=cocos2d::Node *
2> ]
2> d:\microsoft visual studio 11.0\vc\include\xutility(2089): 参见对正在编译的函数 模板 实例化“std::pair<_Ty1,_Ty2> &std::pair<_Ty1,_Ty2>::operator =(const std::pair<_Ty1,_Ty2> &)”的引用
2> with
2> [
2> _Ty1=const int,
2> _Ty2=cocos2d::Node *
2> ]
2> d:\microsoft visual studio 11.0\vc\include\type_traits(599): 参见对正在编译的类 模板 实例化“std::pair<_Ty1,_Ty2>”的引用
2> with
2> [
2> _Ty1=const int,
2> _Ty2=cocos2d::Node *
2> ]
2> d:\cocos2d-x-3.0\projects\bubble\classes\gamemanager.cpp(306): 参见对正在编译的类 模板 实例化“std::is_convertible<_From,_To>”的引用
2> with
2> [
2> _From=std::pair<int,cocos2d::Node *>,
2> _To=std::pair<const int,cocos2d::Node *>
2> ]
int Index = -1;
auto Bubbles = m_pRoot->getChildren();
Node* pTmpNode = nullptr;
for (auto Iter = Bubbles.begin(); Iter != Bubbles.end(); ++Iter)
{
if (!Point2Index(Index, (*Iter)->getPosition()))
{
continue;
}
BubbleMap.insert(std::make_pair(Index, *Iter));
}