Fix -analyse errors from VC8.

Merge a couple of changes from the release branch.


[SVN r31987]
This commit is contained in:
John Maddock
2005-12-11 17:33:38 +00:00
parent 2635121cc8
commit d4b4f359e5
4 changed files with 25 additions and 7 deletions

View File

@ -142,7 +142,11 @@ struct character_pointer_range
}
bool operator == (const character_pointer_range& r)const
{
return ((p2 - p1) == (r.p2 - r.p1)) && std::equal(p1, p2, r.p1);
// Not only do we check that the ranges are of equal size before
// calling std::equal, but there is no other algorithm available:
// not even a non-standard MS one. So forward to unchecked_equal
// in the MS case.
return ((p2 - p1) == (r.p2 - r.p1)) && re_detail::equal(p1, p2, r.p1);
}
};
template <class charT>