Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80790 - trunk/boost/iterator
From: jeffrey.hellrung_at_[hidden]
Date: 2012-09-30 14:58:58


Author: jeffrey.hellrung
Date: 2012-09-30 14:58:56 EDT (Sun, 30 Sep 2012)
New Revision: 80790
URL: http://svn.boost.org/trac/boost/changeset/80790

Log:
Extending the usability of function_input_iterator after the changes addressing #5825: a dereference before each increment is no longer required.
Text files modified:
   trunk/boost/iterator/function_input_iterator.hpp | 12 ++++++++----
   1 files changed, 8 insertions(+), 4 deletions(-)

Modified: trunk/boost/iterator/function_input_iterator.hpp
==============================================================================
--- trunk/boost/iterator/function_input_iterator.hpp (original)
+++ trunk/boost/iterator/function_input_iterator.hpp 2012-09-30 14:58:56 EDT (Sun, 30 Sep 2012)
@@ -37,8 +37,10 @@
                 : f(&f_), state(state_) {}
 
             void increment() {
- BOOST_ASSERT(value);
- value = none;
+ if(value)
+ value = none;
+ else
+ (*f)();
                 ++state;
             }
 
@@ -72,8 +74,10 @@
                 : f(f_), state(state_) {}
 
             void increment() {
- BOOST_ASSERT(value);
- value = none;
+ if(value)
+ value = none;
+ else
+ (*f)();
                 ++state;
             }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk