I noticed that in c ++ 17 binary_function was deleted. And I have no idea how to solve it instead. Could somebody help me what to change the structure? Thank you
I tried searching through google but couldn't find a solution. Visual studio 2019, c++17
struct FGuildCompare : public std::binary_function<CGuild*, CGuild*, bool>
{
bool operator () (CGuild* g1, CGuild* g2) const
{
if (g1->GetLadderPoint() < g2->GetLadderPoint())
return true;
if (g1->GetLadderPoint() > g2->GetLadderPoint())
return false;
if (g1->GetGuildWarWinCount() < g2->GetGuildWarWinCount())
return true;
if (g1->GetGuildWarWinCount() > g2->GetGuildWarWinCount())
return false;
if (g1->GetGuildWarLossCount() < g2->GetGuildWarLossCount())
return true;
if (g1->GetGuildWarLossCount() > g2->GetGuildWarLossCount())
return false;
int c = strcmp(g1->GetName(), g2->GetName());
if (c>0)
return true;
return false;
}
};
std::binary_function removed