[boost][range] - Trac 5971 - size() should return an unsigned type.

[SVN r77990]
This commit is contained in:
Neil Groves
2012-04-15 11:52:01 +00:00
parent 1cb6a99c80
commit 11238e4c19
14 changed files with 136 additions and 125 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