Hi all,

I can't compile program in which I want to sort std::list:

Code:
void CGeomUtils::sortByRelativePolarAngle(const myPoint & relativeTo, std::list<myPoint> & aList)
{
	CGeomUtils::relativePoint = relativeTo;

	std::sort(aList.begin(), aList.end(), CGeomUtils::sortByRelativePolarAngle_callback);
}
Code:
bool CGeomUtils::sortByRelativePolarAngle_callback(myPoint a, myPoint b)
{
	double pa1 = getRelativePolarAngle(a, CGeomUtils::relativePoint);
	double pa2 = getRelativePolarAngle(b, CGeomUtils::relativePoint);

	if (IS_EQUIV(pa1, pa2))
		return true;

	if (pa1 < pa2)
		return true;

	return false;
}
It won't compile and I'm getting errors like this:

e:\program files\microsoft visual studio\vc98\include\algorithm(592) : error C2784: '_D __cdecl std:perator -(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce temp
late argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'class std::list<struct _myPoint,class std::allocator<struct _myPoint> >::iterator'


Can someone see where is error?

Thank you.