[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:
Neil Groves
2012-06-08 22:59:54 +00:00
parent 2f3d82be9f
commit dc46fc13ab
27 changed files with 155 additions and 147 deletions

20
include/boost/range/algorithm/equal.hpp Executable file → Normal file
View 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

View File

@ -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)