Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80468 - trunk/libs/iterator/doc
From: jeffrey.hellrung_at_[hidden]
Date: 2012-09-09 11:51:22


Author: jeffrey.hellrung
Date: 2012-09-09 11:51:22 EDT (Sun, 09 Sep 2012)
New Revision: 80468
URL: http://svn.boost.org/trac/boost/changeset/80468

Log:
updating documentation to reflect new and more sensible behavior
Text files modified:
   trunk/libs/iterator/doc/function_input_iterator.rst | 13 ++++++++-----
   1 files changed, 8 insertions(+), 5 deletions(-)

Modified: trunk/libs/iterator/doc/function_input_iterator.rst
==============================================================================
--- trunk/libs/iterator/doc/function_input_iterator.rst (original)
+++ trunk/libs/iterator/doc/function_input_iterator.rst 2012-09-09 11:51:22 EDT (Sun, 09 Sep 2012)
@@ -18,11 +18,14 @@
 
 .. _InputIterator: http://www.sgi.com/tech/stl/InputIterator.html
 
-Like the Generator Iterator, the Function Input Iterator takes a function
-that models the Generator_ concept (which is basically a nullary or 0-arity
-function object). Each increment of the function Function Input Iterator
-invokes the generator function and stores the value in the iterator. When
-the iterator is dereferenced the stored value is returned.
+The Function Input Iterator takes a function that models the Generator_ concept
+(which is basically a nullary or 0-arity function object). The first dereference
+of the iterator at a given position invokes the generator function and stores
+and returns the result; subsequent dereferences at the same position simply
+return the same stored result. Incrementing the iterator places it at a new
+position, hence a subsequent dereference will generate a new value via another
+invokation of the generator function. This ensures the generator function is
+invoked precisely when the iterator is requested to return a (new) value.
 
 .. _Generator: http://www.sgi.com/tech/stl/Generator.html
 


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