forked from boostorg/range
[boost][range] - Merge trac resolutions from the trunk. The most notable change is the alteration of the size type to be unsigned. This is a potentially breaking change.
[SVN r78860]
This commit is contained in:
20
include/boost/range/algorithm/equal.hpp
Executable file → Normal file
20
include/boost/range/algorithm/equal.hpp
Executable file → Normal file
@ -31,7 +31,7 @@ namespace boost
|
||||
IteratorCategoryTag1,
|
||||
IteratorCategoryTag2 )
|
||||
{
|
||||
do
|
||||
while (true)
|
||||
{
|
||||
// If we have reached the end of the left range then this is
|
||||
// the end of the loop. They are equal if and only if we have
|
||||
@ -46,7 +46,12 @@ namespace boost
|
||||
return false;
|
||||
|
||||
// continue looping if and only if the values are equal
|
||||
} while(*first1++ == *first2++);
|
||||
if (*first1 != *first2)
|
||||
break;
|
||||
|
||||
++first1;
|
||||
++first2;
|
||||
}
|
||||
|
||||
// Reaching this line in the algorithm indicates that a value
|
||||
// inequality has been detected.
|
||||
@ -66,7 +71,7 @@ namespace boost
|
||||
IteratorCategoryTag1,
|
||||
IteratorCategoryTag2 )
|
||||
{
|
||||
do
|
||||
while (true)
|
||||
{
|
||||
// If we have reached the end of the left range then this is
|
||||
// the end of the loop. They are equal if and only if we have
|
||||
@ -81,7 +86,12 @@ namespace boost
|
||||
return false;
|
||||
|
||||
// continue looping if and only if the values are equal
|
||||
} while(pred(*first1++, *first2++));
|
||||
if (!pred(*first1, *first2))
|
||||
break;
|
||||
|
||||
++first1;
|
||||
++first2;
|
||||
}
|
||||
|
||||
// Reaching this line in the algorithm indicates that a value
|
||||
// inequality has been detected.
|
||||
@ -182,7 +192,7 @@ namespace boost
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::equal;
|
||||
using ::boost::range::equal;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
|
||||
|
Reference in New Issue
Block a user