I get an assertion failure about my Vec2's Operator <, I have no idea what is wrong though.
bool Vec2::operator<( const Vec2& v ) const
{
if(x < v.x)
return true;
else
return y < v.y;
}
Invalid Operator < for std set insert
template<class _Pr, class _Ty1, class _Ty2> inline
bool __CLRCALL_OR_CDECL _Debug_lt_pred(_Pr _Pred, const _Ty1& _Left, const _Ty2& _Right,
const wchar_t *_Where, unsigned int _Line)
{ // test if _Pred(_Left, _Right) and _Pred is strict weak ordering
if (!_Pred(_Left, _Right))
return (false);
else if (_Pred(_Right, _Left))
_DEBUG_ERROR2("invalid operator<", _Where, _Line);
return (true);
}
Thanks