From 4b5dd8ccc5ac02b3a1cc5e6df751b718ffcc3a07 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 3 Dec 2013 01:15:28 +0900 Subject: [PATCH] fix iterator compare --- sprout/forward_clist.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sprout/forward_clist.hpp b/sprout/forward_clist.hpp index 4cbbf250..bfaa720a 100644 --- a/sprout/forward_clist.hpp +++ b/sprout/forward_clist.hpp @@ -127,7 +127,9 @@ namespace sprout { bool >::type operator==(sprout::detail::forward_item_iterator const& lhs, sprout::detail::forward_item_iterator const& rhs) { - return !(lhs.is_initialized() || rhs.is_initialized()) || &*lhs == &*rhs; + return !lhs.is_initialized() ? !rhs.is_initialized() + : rhs.is_initialized() && &*lhs == &*rhs + ; } template inline SPROUT_CONSTEXPR typename std::enable_if<