From 1ce129632068bb009f78a0633c2dfb1e18eeda07 Mon Sep 17 00:00:00 2001 From: "Jeffrey Lee Hellrung, Jr." Date: Sun, 30 Sep 2012 18:58:56 +0000 Subject: [PATCH] Extending the usability of function_input_iterator after the changes addressing #5825: a dereference before each increment is no longer required. [SVN r80790] --- include/boost/iterator/function_input_iterator.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/boost/iterator/function_input_iterator.hpp b/include/boost/iterator/function_input_iterator.hpp index 82feffb..c4b5cb3 100644 --- a/include/boost/iterator/function_input_iterator.hpp +++ b/include/boost/iterator/function_input_iterator.hpp @@ -37,8 +37,10 @@ namespace boost { : f(&f_), state(state_) {} void increment() { - BOOST_ASSERT(value); - value = none; + if(value) + value = none; + else + (*f)(); ++state; } @@ -72,8 +74,10 @@ namespace boost { : f(f_), state(state_) {} void increment() { - BOOST_ASSERT(value); - value = none; + if(value) + value = none; + else + (*f)(); ++state; }