diff --git a/sprout/forward_clist.hpp b/sprout/forward_clist.hpp index 4722fa48..edf79f43 100644 --- a/sprout/forward_clist.hpp +++ b/sprout/forward_clist.hpp @@ -116,6 +116,9 @@ namespace sprout { ++*this; return result; } + SPROUT_CONSTEXPR bool is_initialized() const SPROUT_NOEXCEPT { + return item->is_initialized(); + } }; template @@ -124,7 +127,7 @@ namespace sprout { bool >::type operator==(sprout::detail::forward_item_iterator const& lhs, sprout::detail::forward_item_iterator const& rhs) { - return &*lhs == &*rhs; + return !(lhs.is_initialized() || rhs.is_initialized()) || &*lhs == &*rhs; } template inline SPROUT_CONSTEXPR typename std::enable_if<