typedef std::map<string, Js::JType*> ElemMap;
ElemMap list;
vector<Js::JType*> clones;
.....
ElemMap::iterator appendClone(const string& key, Js::JType* heapObj){
return list.insert(make_pair(key, &(*clones.insert(clones.end(), heapObj)) )).first;//Error here in this line
}
The above mentioned line is firing the following error
jobject.h:89: instantiated from here
/usr/include/c++/4.3/bits/stl_pair.h:106: error: cannot convert 'Js::JType** const' to 'Js::JType*' in initialization
I am also including that line of stl_pair.h which means
&(*clones.insert(clones.end(), heapObj))
is returning Js::JType** const Instead of Js::JType*
template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p)
: first(__p.first),
second(__p.second) { }//106
Here is the code for Js::JType::clone()
virtual Js::JType* clone() const {return new Js::JType(*this);}