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