1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

fix adaptors

This commit is contained in:
bolero-MURAKAMI 2012-12-01 14:34:54 +09:00
parent 86818d73cb
commit d57b6e2b18
20 changed files with 489 additions and 556 deletions

View file

@ -10,6 +10,7 @@
#include <sprout/iterator/distance.hpp>
#include <sprout/iterator/type_traits/common.hpp>
#include <sprout/utility/swap.hpp>
#include <sprout/utility/limited.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT
@ -266,8 +267,8 @@ namespace sprout {
{
return lhs.is_in_left() && rhs.is_in_left() ? rhs.base() - lhs.base()
: !lhs.is_in_left() && !rhs.is_in_left() ? rhs.base2() - lhs.base2()
: lhs.is_in_left() ? (lhs.left_end() - lhs.base()) + (rhs.base2() - rhs.right_begin())
: (lhs.base2() - lhs.right_begin()) + (rhs.left_end() - rhs.base())
: lhs.is_in_left() ? sprout::limited::plus(lhs.left_end() - lhs.base(), rhs.base2() - rhs.right_begin())
: sprout::limited::plus(lhs.base2() - lhs.right_begin(), rhs.left_end() - rhs.base())
;
}
template<typename LIterator, typename RIterator>