Original Post
I want to merge to vectors of Points. in some function: Point defines the < and == operator. I get: Microsoft Visual Studio C Runtime Library has detected a fatal error in FigureFight.exe Break | Continue And it takes me to that STL code (which I can't figure btw): spr1Points and spr2Points contain a lot of objects btw. spr1Points's size is 14647 spr2Points's size is 7686
// storage for the points
//PointStorage is a typedef for std::vector<Point>
PointStorage spr1Points, spr2Points;
// add points
AddPixelPoints(spr1, spr1Points);
AddPixelPoints(spr2, spr2Points);
PointStorage points;
std::merge( spr1Points.begin(), spr1Points.end(), spr2Points.begin(), spr2Points.end(), points.begin() );
/*<-.....code */
#if _SECURE_SCL
template<class _InIt1, class _InIt2, class _OutIt>
inline
_OutIt _Merge(_InIt1 _First1, _InIt1 _Last1,
_InIt2 _First2, _InIt2 _Last2, _OutIt _Dest,
random_access_iterator_tag, _Range_checked_iterator_tag)
{ // copy merging ranges, both using operator<
// for range checked iterators, this will make sure there is enough space
->HERE: _OutIt _Result = _Dest + (_Last1 - _First1) + (_Last2 - _First2);
_Merge(_First1, _Last1, _First2, _Last2, _CHECKED_BASE(_Dest),
forward_iterator_tag(), _Range_checked_iterator_tag());
return _Result;
}
/* code.....-> */
#endif