1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00

fix forward_clist iterator

This commit is contained in:
bolero-MURAKAMI 2013-12-03 01:07:56 +09:00
parent 18b388c89f
commit 81ded0b907

View file

@ -116,6 +116,9 @@ namespace sprout {
++*this;
return result;
}
SPROUT_CONSTEXPR bool is_initialized() const SPROUT_NOEXCEPT {
return item->is_initialized();
}
};
template<typename List1, typename List2>
@ -124,7 +127,7 @@ namespace sprout {
bool
>::type
operator==(sprout::detail::forward_item_iterator<List1> const& lhs, sprout::detail::forward_item_iterator<List2> const& rhs) {
return &*lhs == &*rhs;
return !(lhs.is_initialized() || rhs.is_initialized()) || &*lhs == &*rhs;
}
template<typename List1, typename List2>
inline SPROUT_CONSTEXPR typename std::enable_if<