Write your question here.
i'm compiling sipxces code in fedora 23 and getting a compilation error:
/home/rmishra/sipxecs/sipXresiprocate/resip/stack/MessageWaitingContents.cxx:600:83: error: no matching function for call to ‘make_pair(const resip::Data&, const resip::Data&)’
h=ncthis->mExtensions.insert(std::make_pair<const Data, Data>(hn,Data::Empty)).first;
i think there is some issue in variable 'Empty' is being passed because it has been declared with different types at different places.
Please help me in finding the sollution.
PutData&
MessageWaitingContents::header(const Data& hn)
{
checkParsed();
return mExtensions[hn];
}
const Data&
MessageWaitingContents::header(const Data& hn) const
{
checkParsed();
std::map<Data, Data>::const_iterator h=mExtensions.find(hn);
if(h==mExtensions.end())
{
ErrLog(<< "You called ""MessageWaitingContents::header(const Data& hn) _const_ ""without first calling exists(), and the header does not exist. Our"" behavior in this scenario is to implicitly create the header(using const_cast!); ""this is probably not what you want, but it is either this or ""assert/throw an exception. Since this has been the behavior for ""so long, we are not throwing here, _yet_. You need to fix your ""code, before we _do_ start throwing. This is why const-correctness"" should never be made a TODO item </rant>");
MessageWaitingContents* ncthis = const_cast<MessageWaitingContents*>(this);
//getting error in this line
h=ncthis->mExtensions.insert(std::make_pair<const Data, Data>(hn,Data::Empty)).first;
}
the code you need help with here.