From c9463e941f055cedc2a6f3a7fbe5e83bd61fbb04 Mon Sep 17 00:00:00 2001 From: "Jeffrey Lee Hellrung, Jr." Date: Tue, 2 Oct 2012 01:14:36 +0000 Subject: [PATCH] Merging boost/iterator from trunk to release (usability improvement after latest fix to function_input_iterator). [SVN r80813] --- 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; }