diff --git a/doc/GNUmakefile b/doc/GNUmakefile index a162267..ef326cc 100755 --- a/doc/GNUmakefile +++ b/doc/GNUmakefile @@ -1,11 +1,233 @@ +# GNUmakefile for postprocessing PDF files +# +# © 2000 IBM Corporation. +# Licensed under the GNU GPL. + +######################################################################## +# Make sure that the following macros are correct for your setup +######################################################################## +# ... System utilities +RMRF = /bin/rm -rf +MV = /bin/mv +EGREP = /bin/egrep ECHO = /bin/echo +PERL = /usr/bin/perl +PYTHON = python +CAT = /bin/cat +TOUCH = /bin/touch +ZIP = /usr/bin/zip -all: - @${ECHO} "/libs/iterator/doc/GNUmakefile should be replaced by" - @${ECHO} - @${ECHO} " http://www.boost-consulting.com/writing/GNUmakefile," - @${ECHO} - @${ECHO} "before proceeding. That file is not included in the Boost" - @${ECHO} "distribution because it is licensed under the GPL, which violates" - @${ECHO} "Boost license requirements." +# ... TeX & postprocessors +PPOWER4 = ppower4 +PDFLATEX = pdflatex +METAPOST = mpost +FIG2DEV = fig2dev +BIBTEX = bibtex +FOLIAGECUTTER = foliageCutter --verbose +RST2LATEX = rst2latex +RST2HTML = rst2html + +TEX = latex +export TEX +######################################################################## +# End of user servicable parts; don't fiddle with the remainder of this +# makefile unless you know what you do. +# +# You have been warned ;=) +######################################################################## + +# ... Variables +TEXFILES = $(strip $(wildcard *.tex)) +RSTFILES = $(strip $(wildcard *.rst)) +-include GNUmakefile.local +TEXSTEMS = $(strip $(patsubst %.tex,%,${TEXFILES})) +RSTSTEMS = $(strip $(patsubst %.rst,%,${RSTFILES})) +CUTFOILS = $(strip $(patsubst %,%---toc.tex,${TEXSTEMS})) +PDFFILES = $(strip $(patsubst %.tex,%.pdf,${TEXFILES})) +PRINTS = $(patsubst %.pdf,%-print.pdf,${PDFFILES}) +PRINTZIP = prints.zip +SLIDEZIP = slides.zip + +# ... Depend +DEPENDFILES = .depend +GENFILE = .generated + +# ... List of extensions and files generated +texcrap = *.mpx *.log *.aux *.blg *-print.brf *-print.tex *.out + +mpxcrap = mpxerr.tex mpxerr.pdf + +generated = *.out *.[0-9] *.[0-9][0-9] *.bbl *.brf \ + *.mp *.mmp *.pdf *.ps TMP-*.pdf *.ftoc\ + ${PRINTZIP} ${SLIDEZIP} ${GENFILE} ${DEPENDFILES} \ + ${texcrap} ${mpxcrap} ${CUTFOILS} $(strip $(wildcard *---*.tex)) + + +# ... canned command to run PDFLaTeX +define run-pdflatex +@${ECHO} "" +@${ECHO} "---- Running PDFLaTeX on $<" && ${PDFLATEX} $< +@${ECHO} "---- Running PDFLaTeX on $< again" && ${PDFLATEX} $< +-@(${EGREP} -qi 'Rerun to get' $*.log && \ + ${ECHO} "---- Rerunning PDFLaTeX on $* to get cross-refs right" && \ + ${PDFLATEX} $<) || \ + ${ECHO} "---- No cross-refs correcting PDFLaTeX rerun required for $*" +-@(${EGREP} -qi $*.ftoc $*.log && \ + ${ECHO} "---- Rerunning PDFLaTeX on $* for FTOC" && \ + ${PDFLATEX} $<) || \ + ${ECHO} "---- No FTOC PDFLaTeX run required for $*" +-@(${EGREP} -qi 'Warning: Citation' $*.log && \ + ${ECHO} "---- Running BIBTeX on $*" && \ + ${BIBTEX} $* && \ + ${ECHO} "---- Running PDFLaTeX on $<" && \ + ${PDFLATEX} $<) || \ + ${ECHO} "---- No BIBTeX run required for $*" +-@(${EGREP} -qi 'Warning: .+undefined references' $*.log && \ + ${ECHO} "---- Running PDFLaTeX on $<" && \ + ${PDFLATEX} $<) || \ + ${ECHO} "---- No further PDFLaTex run required for $<" +@${ECHO} "Generated: $@ {$<}" >> ${GENFILE} +@${RMRF} ${texcrap} +endef + +# ... canned command to run PDFLaTeX for printable versions +define run-pdflatex-for-print +@${ECHO} "" +@${ECHO} "---- Running PDFLaTeX on $*-print.tex" && ${PDFLATEX} $*-print.tex +@${ECHO} "---- Running PDFLaTeX on $< again" && ${PDFLATEX} $< +-@(${EGREP} -qi 'Warning: Citation' $*-print.log && \ + ${ECHO} "---- Running BIBTeX on $*-print" && \ + ${BIBTEX} $*-print && \ + ${ECHO} "---- Running PDFLaTeX on $*-print.tex" && \ + ${PDFLATEX} $*-print.tex) || \ + ${ECHO} "---- No BIBTeX run required for $*" +-@(${EGREP} -qi 'Warning: .+undefined references' $*-print.log && \ + ${ECHO} "---- Running PDFLaTeX on $*-print" && \ + ${PDFLATEX} $*-print.tex) || \ + ${ECHO} "---- No further PDFLaTex run required for $*-print" +@${ECHO} "Generated: $@ {$<}" >> ${GENFILE} +@${RMRF} ${texcrap} +endef + +# DWA begin modifications +# ... Rule: How to generate TeX from ReST +%.tex: %.txt + @${ECHO} "---- Running rst2latex on $<" + ${RST2LATEX} $< $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} + +# ... Rule: How to generate TeX from ReST +%.tex: %.rst + @${ECHO} "---- Running rst2latex on $<" + ${RST2LATEX} $< $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} + +# ... Rule: How to generate HTML from ReST +%.html: %.txt + @${ECHO} "---- Running rst2html on $<" + ${RST2HTML} $< $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} + +# ... Rule: How to generate HTML from ReST +%.html: %.rst + @${ECHO} "---- Running rst2html on $<" + ${RST2HTML} $< $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} +# DWA end modifications + +# ... Rule: How to generate PDF from TeX +%.pdf: %.tex + $(run-pdflatex) + @${MV} $@ TMP-$@ + @${ECHO} "---- Running PPower4 on $*" + ${PPOWER4} -v TMP-$@ $@ + @${RMRF} TMP-$@ + @${ECHO} "Postprocessed: $*.pdf {$*.pdf}" >> ${GENFILE} + +# ... Rule: How to generate printable PDF from TeX +%-print.pdf: %.tex + ${PERL} -pe 's/^\\documentclass\[(.*?)\]/\\documentclass\[$$1,prints\]/;' < $< > $*-print.tex + $(run-pdflatex-for-print) + @${ECHO} "Generated: $*-print.pdf {$*.pdf}" >> ${GENFILE} + +# ... Rule: How to generate cut foils from TeX master +%---toc.tex: %.tex + ${FOLIAGECUTTER} --prefix=$* $< + +# ... Rule: How to generate MetaPost from FIG +%.mp: %.fig + @${ECHO} "---- Running Fig2Dev (mp) on $<" + ${FIG2DEV} -L mp $< $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} + +# ... Rule: How to generate MultiMetaPost from FIG +%.mmp: %.fig + @${ECHO} "---- Running Fig2Dev (mmp) on $<" + ${FIG2DEV} -L mmp $< $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} + +# ... Rule: How to generate includable PS from FIG via MetaPost +%.mps: %.fig + @${ECHO} "---- Running Fig2Dev (mps) on $<" + ${FIG2DEV} -L mp $< $*.mps.mp + @${RMRF} $*.mps.[0-9] + ${METAPOST} $*.mps.mp + @${MV} $*.mps.0 $@ + @${ECHO} "Generated: $@ {$<}" >> ${GENFILE} + +# ... Rule: How to generate includable PS files from MultiMetaPost +%.0: %.mmp + @${ECHO} "---- Running MetaPost on $<" + @${RMRF} $*.[0-9] $*.[0-9][0-9] + ${METAPOST} $< + @${ECHO} "Generated: $*.0{...} {$<}" >> ${GENFILE} + +cleanup-crap: + @${RMRF} ${mpxcrap} + +# ... Target: all +all: cleanup-crap ${DEPENDFILES} ${PDFFILES} ${PRINTS} ${PRINTZIP} ${SLIDEZIP} + @${ECHO} "" + @${TOUCH} ${GENFILE} + @${CAT} ${GENFILE} + @${RMRF} ${GENFILE} + +# ... Target: ZIP files +zip zips: ${PRINTZIP} ${SLIDEZIP} + +# ... Target: ZIP file containing printable versions of slides +${PRINTZIP}: .depend ${PDFFILES} + @${RMRF} ${PRINTZIP} + ${ZIP} -r ${PRINTZIP} ${PRINTS} + @${ECHO} "Generated: ${PRINTZIP}" >> ${GENFILE} + +# ... Target: ZIP file containing screen versions of slides + ${SLIDEZIP}: .depend ${PDFFILES} + @${RMRF} ${SLIDEZIP} + ${ZIP} -r ${SLIDEZIP} ${PDFFILES} + @${ECHO} "Generated: ${SLIDEZIP}" >> ${GENFILE} + +# ... Target: clean up +clean: + ${RMRF} ${generated} + +# ... Target: create dependencies +depend: .depend + +# ... Target: dependency file (parse TEXFILES for multiinclude and includegraphics) +# .depend: GNUmakefile ${TEXFILES} +# ${RMRF} $@ +# @for t in ${TEXSTEMS} ; do \ +# ${ECHO} "Scanning $$t.tex"; \ +# ${PERL} -e 'my $$target = shift @ARGV;' -e 'while (<>) { /\\multiinclude(\[.*?\])?{(.*?)}/ && print "$$target: $$2.0\n";}' $$t.pdf < $$t.tex >> $@; \ +# ${PERL} -e 'my $$target = shift @ARGV;' -e 'while (<>) { /\\includegraphics(\[.*?\])?{(.*?)\.(.*?)}/ && print "$$target: $$2.$$3\n";}' $$t.pdf < $$t.tex >> $@; \ +# done + +.depend: GNUmakefile ${RSTFILES} + ${RMRF} $@ + ${PYTHON} scanrst.py ${RSTFILES} > $@ + +# ... include dependency files +# -include .depend +-include .depend diff --git a/doc/counting_iterator.pdf b/doc/counting_iterator.pdf index cf6087d..cce54f8 100755 Binary files a/doc/counting_iterator.pdf and b/doc/counting_iterator.pdf differ diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html index 9074856..49961bd 100755 --- a/doc/facade-and-adaptor.html +++ b/doc/facade-and-adaptor.html @@ -3,7 +3,7 @@ - + Iterator Facade and Adaptor @@ -11,7 +11,6 @@ -

Iterator Facade and Adaptor

@@ -32,6 +31,7 @@ committee's library working group.
+
@@ -53,7 +53,7 @@ by adapting other iterators.
-

Table of Contents

+

Table of Contents

  • Motivation
  • Impact on the Standard
  • @@ -325,7 +325,7 @@ of the derived iterator type. These member functions are described briefly below and in more detail in the iterator facade requirements.

    - +
    @@ -443,7 +443,6 @@ are described in terms of a set of requirements, which must be satisfied by the iterator_facade implementation.

    - @@ -776,8 +775,8 @@ object of a single pass iterator type interoperable with X.

    -

    iterator_facade Core Operations

    -
    [Cop95][Coplien, 1995] Coplien, J., Curiously Recurring Template Patterns, C++ Report, February 1995, pp. 24-27.
    +

    iterator_facade Core Operations

    +
    @@ -1774,7 +1773,7 @@ type iterator_traits<Iterator>::refe traversal and iterator access concepts modeled by its Iterator argument. In addition, it may model old iterator concepts specified in the following table:

    -
    +
    @@ -1981,7 +1980,7 @@ concept that is modeled by the IteratorIf transform_iterator is a model of Readable Lvalue Iterator then it models the following original iterator concepts depending on what the Iterator argument models.

    -
    +
    @@ -2038,17 +2037,20 @@ initialized to f and
    -template<class OtherIterator, class R2, class V2>
    +template<class F2, class I2, class R2, class V2>
     transform_iterator(
    -      transform_iterator<UnaryFunction, OtherIterator, R2, V2> const& t
    -    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
    +      transform_iterator<F2, I2, R2, V2> const& t
    +    , typename enable_if_convertible<I2, Iterator>::type* = 0      // exposition only
    +    , typename enable_if_convertible<F2, UnaryFunction>::type* = 0 // exposition only
     );
     
    - + @@ -2174,7 +2176,7 @@ the expression p(x) must be va

    The concepts that filter_iterator models are dependent on which concepts the Iterator argument models, as specified in the following tables.

    -
    Returns:An instance of transform_iterator that is a copy of t.
    Returns:An instance of transform_iterator with m_f +initialized to t.functor() and m_iterator initialized to +t.base().
    Requires:OtherIterator is implicitly convertible to Iterator.
    +
    @@ -2193,7 +2195,7 @@ following tables.

    - +
    @@ -2215,7 +2217,7 @@ following tables.

    - +
    diff --git a/doc/facade-and-adaptor.pdf b/doc/facade-and-adaptor.pdf index 6b91852..65ecde4 100755 Binary files a/doc/facade-and-adaptor.pdf and b/doc/facade-and-adaptor.pdf differ diff --git a/doc/filter_iterator.pdf b/doc/filter_iterator.pdf index 9ae74d7..6796256 100755 Binary files a/doc/filter_iterator.pdf and b/doc/filter_iterator.pdf differ diff --git a/doc/function_output_iterator.pdf b/doc/function_output_iterator.pdf index 367874d..9e3910d 100755 Binary files a/doc/function_output_iterator.pdf and b/doc/function_output_iterator.pdf differ diff --git a/doc/index.html b/doc/index.html index 8467345..9297690 100755 --- a/doc/index.html +++ b/doc/index.html @@ -3,13 +3,13 @@ - +The Boost.Iterator Library Boost -
    @@ -51,7 +51,7 @@ older Boost Iterator Adaptor Library.
    -

    Table of Contents

    +

    Table of Contents

    • New-Style Iterators
    • Iterator Facade and Adaptor
    • @@ -218,7 +218,6 @@ near-complete rewrite of the prototype, they came up with the library you see today.

      - diff --git a/doc/indirect_iterator.pdf b/doc/indirect_iterator.pdf index 61fccba..357d91f 100755 Binary files a/doc/indirect_iterator.pdf and b/doc/indirect_iterator.pdf differ diff --git a/doc/iterator_adaptor.pdf b/doc/iterator_adaptor.pdf index b0748bc..4854b0a 100755 Binary files a/doc/iterator_adaptor.pdf and b/doc/iterator_adaptor.pdf differ diff --git a/doc/iterator_archetypes.pdf b/doc/iterator_archetypes.pdf index c1087d0..c00fda4 100755 Binary files a/doc/iterator_archetypes.pdf and b/doc/iterator_archetypes.pdf differ diff --git a/doc/iterator_concepts.pdf b/doc/iterator_concepts.pdf index 192a846..ba9b983 100755 Binary files a/doc/iterator_concepts.pdf and b/doc/iterator_concepts.pdf differ diff --git a/doc/iterator_facade.pdf b/doc/iterator_facade.pdf index 0f8a639..04492d4 100755 Binary files a/doc/iterator_facade.pdf and b/doc/iterator_facade.pdf differ diff --git a/doc/iterator_traits.pdf b/doc/iterator_traits.pdf index dd21246..796fff6 100755 Binary files a/doc/iterator_traits.pdf and b/doc/iterator_traits.pdf differ diff --git a/doc/new-iter-concepts.html b/doc/new-iter-concepts.html index 6789757..b78dc6e 100755 --- a/doc/new-iter-concepts.html +++ b/doc/new-iter-concepts.html @@ -3,16 +3,15 @@ - +New Iterator Concepts - + -

      New Iterator Concepts

      [Cop95][Coplien, 1995] Coplien, J., Curiously Recurring Template Patterns, C++ Report, February 1995, pp. 24-27.
      @@ -26,7 +25,7 @@ - +
      Boost Consulting, Indiana University Open Systems Lab, Zephyr Associates, Inc.
      Date:2004-04-06
      2004-07-14
      Number:This is a revised version of n1550=03-0133, which was accepted for Technical Report 1 by the C++ standard committee's library working group. This proposal is a @@ -37,6 +36,7 @@ revision of paper @@ -52,7 +52,7 @@ of iterators that are used in practice.
      -

      Table of Contents

      +

      Table of Contents

      • Motivation
      • Impact on the Standard
          @@ -107,7 +107,7 @@ geared towards iterator traversal (hence the category names), while requirements that address value access sneak in at various places. The following table gives a summary of the current value access requirements in the iterator categories.

          - +
          @@ -364,7 +364,7 @@ for value type T if, in additi Copy Constructible, the following expressions are valid and respect the stated semantics. U is the type of any specified member of type T.

          -
          +
          @@ -406,7 +406,7 @@ non-cv-qualified type if, in addition to X being Copy Constructible, the following expressions are valid and respect the stated semantics. Writable Iterators have an associated set of value types.

          -
          +
          @@ -435,7 +435,7 @@ value types of X

          A class or built-in type X models the Swappable Iterator concept if, in addition to X being Copy Constructible, the following expressions are valid and respect the stated semantics.

          -
          +
          @@ -457,17 +457,16 @@ exchanged
          -
          -
          [Note: An iterator that is a model of the Readable and Writable Iterator concepts
          -
          is also a model of Swappable Iterator. --end note]
          -
          +

          [Note: An iterator that is a model of the Readable Iterator and +Writable Iterator concepts is also a model of Swappable +Iterator. --end note]

      Lvalue Iterators [lib.lvalue.iterators]

      The Lvalue Iterator concept adds the requirement that the return type of operator* type be a reference to the value type of the iterator.

      - +
      @@ -487,14 +486,15 @@ iterator.

      +cv-qualification. pre: a is +dereferenceable.
      T is cv iterator_traits<X>::value_type where cv is an optional -cv-qualification. -pre: a is -dereferenceable. If a -== b then *a is -equivalent to *b.
      +

      If X is a Writable Iterator then a == b if and only if +*a is the same object as *b. If X is a Readable +Iterator then a == b implies *a is the same object as +*b.

      @@ -509,18 +509,18 @@ type X, X being Assignable and Copy Constructible, the following expressions are valid and respect the stated semantics.

      - +
      --++ - + @@ -529,15 +529,12 @@ stated semantics.

      - - + + + + + +
      Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible)
      Expression Return TypeAssertion/SemanticsAssertion
      &r == &++r
      r++X
      -{
      -   X tmp = r;
      -   ++r;
      -   return tmp;
      -}
      -
      -
        
      *r++  
      iterator_traversal<X>::type Convertible to @@ -546,6 +543,11 @@ stated semantics.

      +

      If X is a Writable Iterator then X a(r++); is equivalent +to X a(r); ++r; and *r++ = o is equivalent +to *r = o; ++r. +If X is a Readable Iterator then T z(*r++); is equivalent +to T z(*r); ++r;.

      @@ -554,25 +556,29 @@ incrementable_traversal_tag for consistency. -->

      A class or built-in type X models the Single Pass Iterator concept if the following expressions are valid and respect the stated semantics.

      - +
      ---++++ - - + + + + +
      Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality +
      Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality Comparable)
      Expression Return TypeAssertion/Semantics / +Operational +SemanticsAssertion/ Pre-/Post-condition
      ++r X&  pre: r is dereferenceable; post: r is dereferenceable or @@ -580,17 +586,20 @@ dereferenceable; post:
      a == b convertible to bool  == is an equivalence relation over its domain
      a != b convertible to bool !(a == b) 
      iterator_traversal<X>::type Convertible to single_pass_traversal_tag   
      @@ -603,7 +612,7 @@ single_pass_traversal_tag for consistency --> concept if, in addition to X meeting the requirements of Default Constructible and Single Pass Iterator, the following expressions are valid and respect the stated semantics.

      - +
      @@ -650,34 +659,39 @@ forward_traversal_tag for consistency --> Iterator concept if, in addition to X meeting the requirements of Forward Traversal Iterator, the following expressions are valid and respect the stated semantics.

      -
      +
      ---++++ - - + - + +s. &r == &--r.

      + @@ -689,11 +703,13 @@ implies r == + +
      Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal +
      Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal Iterator)
      Expression Return TypeAssertion/Semantics / +Operational +SemanticsAssertion/ Pre-/Post-condition
      --r X&pre: there exists + 

      pre: there exists s such that r == ++s. post: s is -dereferenceable. ---(++r) == r. +dereferenceable.

      +

      ++(--r) == r. --r == --s implies r == -s. &r == &--r.

      r-- convertible to const X& 
      iterator_traversal<X>::type Convertible to bidirectional_traversal_tag   
      @@ -707,7 +723,7 @@ Iterator concept if the following expressions are valid and respect the stated semantics. In the table below, Distance is iterator_traits<X>::difference_type and n represents a constant object of type Distance.

      - +
      @@ -772,14 +788,14 @@ value n of - + - + @@ -823,7 +839,7 @@ respect the stated semantics. In the tables below, X, y is an object of type Y, Distance is iterator_traits<Y>::difference_type, and n represents a constant object of type Distance.

      -
      a[n] convertible to T *(a + n)pre: a is a readable -iteratorpre: a is a Readable +Iterator
      a[n] = v convertible to T *(a + n) = vpre: a is a writable -iteratorpre: a is a Writable +Iterator
      a < b convertible to bool
      +
      @@ -864,7 +880,7 @@ constant object of type Distance

      If X and Y both model Random Access Traversal Iterator then the following additional requirements must be met.

      -
      +
      @@ -998,5 +1014,10 @@ LocalWords: incrementable xxx min prev inplace png oldeqnew AccessTag struct LocalWords: TraversalTag typename lvalues DWA Hmm JGS mis enum --> + + diff --git a/doc/new-iter-concepts.pdf b/doc/new-iter-concepts.pdf index 0cf07de..5b88cf6 100755 Binary files a/doc/new-iter-concepts.pdf and b/doc/new-iter-concepts.pdf differ diff --git a/doc/new-iter-concepts.rst b/doc/new-iter-concepts.rst index b96967d..8853e3e 100644 --- a/doc/new-iter-concepts.rst +++ b/doc/new-iter-concepts.rst @@ -412,8 +412,9 @@ expressions are valid and respect the stated semantics. | | |exchanged | +-------------------------+-------------+-----------------------------+ -[*Note:* An iterator that is a model of the *Readable* and *Writable Iterator* concepts - is also a model of *Swappable Iterator*. *--end note*] +[*Note:* An iterator that is a model of the `Readable Iterator`_ and +`Writable Iterator`_ concepts is also a model of *Swappable +Iterator*. *--end note*] Lvalue Iterators [lib.lvalue.iterators] @@ -432,15 +433,13 @@ iterator. | | |``iterator_traits::value_type`` | | | |where *cv* is an optional | | | |cv-qualification. pre: ``a`` is | -| | |dereferenceable. If ``X`` is a | -| | |*Writable Iterator* then ``a == b``| -| | |if and only if ``*a`` is the same | -| | |object as ``*b``. If ``X`` is a | -| | |*Readable Iterator* then ``a == b``| -| | |implies ``*a`` is the same object | -| | |as ``*b``. | +| | |dereferenceable. | +-------------+-----------+-----------------------------------+ +If ``X`` is a `Writable Iterator`_ then ``a == b`` if and only if +``*a`` is the same object as ``*b``. If ``X`` is a `Readable +Iterator`_ then ``a == b`` implies ``*a`` is the same object as +``*b``. Iterator Traversal Concepts [lib.iterator.traversal] @@ -451,7 +450,6 @@ constant objects of type ``X``, ``r`` and ``s`` are mutable objects of type ``X``, ``T`` is ``std::iterator_traits::value_type``, and ``v`` is a constant object of type ``T``. - Incrementable Iterators [lib.incrementable.iterators] ----------------------------------------------------- @@ -460,32 +458,28 @@ concept if, in addition to ``X`` being Assignable and Copy Constructible, the following expressions are valid and respect the stated semantics. ++------------------------------------------------------------------------------------+ +|Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible) | +| | ++--------------------------------+-------------------------------+-------------------+ +|Expression |Return Type |Assertion | ++================================+===============================+===================+ +|``++r`` |``X&`` |``&r == &++r`` | ++--------------------------------+-------------------------------+-------------------+ +|``r++`` | | | ++--------------------------------+-------------------------------+-------------------+ +|``*r++`` | | | ++--------------------------------+-------------------------------+-------------------+ +|``iterator_traversal::type`` |Convertible to | | +| |``incrementable_traversal_tag``| | ++--------------------------------+-------------------------------+-------------------+ -+----------------------------------------------------------------------------------------+ -|Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible) | -| | -+--------------------------------+-------------------------------+-----------------------+ -|Expression |Return Type |Assertion/Semantics | -+================================+===============================+=======================+ -|``++r`` |``X&`` |``&r == &++r`` | -+--------------------------------+-------------------------------+-----------------------+ -|``r++`` |convertible to ``const X&`` |``X a(r++);`` is | -| | |equivalent to ``X a(r);| -| | |++r;`` | -+--------------------------------+-------------------------------+-----------------------+ -|``*r++`` |if ``X`` is a *Readable |If ``X`` is a *Readable| -| |Iterator* then ``T`` |Iterator* then ``T | -| | |z(*r++);`` is | -| | |equivalent to ``T | -| | |z(*r); ++r;``. If ``X``| -| | |is a *Writable | -| | |Iterator* then ``*r++ =| -| | |o`` is equivalent to | -| | |``*r = o; ++r``. | -+--------------------------------+-------------------------------+-----------------------+ -|``iterator_traversal::type`` |Convertible to | | -| |``incrementable_traversal_tag``| | -+--------------------------------+-------------------------------+-----------------------+ + +If ``X`` is a `Writable Iterator`_ then ``X a(r++);`` is equivalent +to ``X a(r); ++r;`` and ``*r++ = o`` is equivalent +to ``*r = o; ++r``. +If ``X`` is a `Readable Iterator`_ then ``T z(*r++);`` is equivalent +to ``T z(*r); ++r;``. .. TR1: incrementable_iterator_tag changed to incrementable_traversal_tag for consistency. @@ -498,26 +492,26 @@ concept if the following expressions are valid and respect the stated semantics. -+------------------------------------------------------------------------------------------+ -|Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality | -|Comparable) | -+--------------------------------+-----------------------------+---------------------------+ -|Expression |Return Type |Assertion/Semantics / | -| | |Pre-/Post-condition | -+================================+=============================+===========================+ -|``++r`` |``X&`` |pre: ``r`` is | -| | |dereferenceable; post: | -| | |``r`` is dereferenceable or| -| | |``r`` is past-the-end | -+--------------------------------+-----------------------------+---------------------------+ -|``a == b`` |convertible to ``bool`` |``==`` is an equivalence | -| | |relation over its domain | -+--------------------------------+-----------------------------+---------------------------+ -|``a != b`` |convertible to ``bool`` |``!(a == b)`` | -+--------------------------------+-----------------------------+---------------------------+ -|``iterator_traversal::type`` |Convertible to | | -| |``single_pass_traversal_tag``| | -+--------------------------------+-----------------------------+---------------------------+ ++--------------------------------------------------------------------------------------------------------+ +|Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality | +|Comparable) | ++--------------------------------+-----------------------------+-------------+---------------------------+ +|Expression |Return Type | Operational |Assertion/ | +| | | Semantics |Pre-/Post-condition | ++================================+=============================+=============+===========================+ +|``++r`` |``X&`` | |pre: ``r`` is | +| | | |dereferenceable; post: | +| | | |``r`` is dereferenceable or| +| | | |``r`` is past-the-end | ++--------------------------------+-----------------------------+-------------+---------------------------+ +|``a == b`` |convertible to ``bool`` | |``==`` is an equivalence | +| | | |relation over its domain | ++--------------------------------+-----------------------------+-------------+---------------------------+ +|``a != b`` |convertible to ``bool`` |``!(a == b)``| | ++--------------------------------+-----------------------------+-------------+---------------------------+ +|``iterator_traversal::type`` |Convertible to | | | +| |``single_pass_traversal_tag``| | | ++--------------------------------+-----------------------------+-------------+---------------------------+ .. TR1: single_pass_iterator_tag changed to single_pass_traversal_tag for consistency @@ -565,35 +559,36 @@ Iterator* concept if, in addition to ``X`` meeting the requirements of Forward Traversal Iterator, the following expressions are valid and respect the stated semantics. -+--------------------------------------------------------------------------------------+ -|Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal | -|Iterator) | -+--------------------------------+-------------------------------+---------------------+ -|Expression |Return Type |Assertion/Semantics /| -| | |Pre-/Post-condition | -+================================+===============================+=====================+ -|``--r`` |``X&`` |pre: there exists | -| | |``s`` such that ``r | -| | |== ++s``. post: | -| | |``s`` is | -| | |dereferenceable. | -| | |``--(++r) == r``. | -| | |``--r == --s`` | -| | |implies ``r == | -| | |s``. ``&r == &--r``. | -+--------------------------------+-------------------------------+---------------------+ -|``r--`` |convertible to ``const X&`` |:: | -| | | | -| | | { | -| | | X tmp = r; | -| | | --r; | -| | | return tmp; | -| | | } | -+--------------------------------+-------------------------------+---------------------+ -|``iterator_traversal::type`` |Convertible to | | -| |``bidirectional_traversal_tag``| | -| | | | -+--------------------------------+-------------------------------+---------------------+ ++-----------------------------------------------------------------------------------------------------+ +|Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal | +|Iterator) | ++--------------------------------+-------------------------------+--------------+---------------------+ +|Expression |Return Type | Operational |Assertion/ | +| | | Semantics |Pre-/Post-condition | ++================================+===============================+==============+=====================+ +|``--r`` |``X&`` | |pre: there exists | +| | | |``s`` such that ``r | +| | | |== ++s``. post: | +| | | |``s`` is | +| | | |dereferenceable. | +| | | | | +| | | |``++(--r) == r``. | +| | | |``--r == --s`` | +| | | |implies ``r == | +| | | |s``. ``&r == &--r``. | ++--------------------------------+-------------------------------+--------------+---------------------+ +|``r--`` |convertible to ``const X&`` |:: | | +| | | | | +| | | { | | +| | | X tmp = r; | | +| | | --r; | | +| | | return tmp;| | +| | | } | | ++--------------------------------+-------------------------------+--------------+---------------------+ +|``iterator_traversal::type`` |Convertible to | | | +| |``bidirectional_traversal_tag``| | | +| | | | | ++--------------------------------+-------------------------------+--------------+---------------------+ .. TR1: bidirectional_traversal_iterator_tag changed to bidirectional_traversal_tag for consistency @@ -642,11 +637,11 @@ constant object of type ``Distance``. | | | |``a + n == b``. ``b | | | | |== a + (b - a)``. | +-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a[n]`` |convertible to T |``*(a + n)`` |pre: a is a `readable | -| | | |iterator`_ | +|``a[n]`` |convertible to T |``*(a + n)`` |pre: a is a `Readable | +| | | |Iterator`_ | +-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a[n] = v`` |convertible to T |``*(a + n) = v`` |pre: a is a `writable | -| | | |iterator`_ | +|``a[n] = v`` |convertible to T |``*(a + n) = v`` |pre: a is a `Writable | +| | | |Iterator`_ | +-------------------------------+---------------------------------+-------------------------+----------------------+ |``a < b`` |convertible to ``bool`` |``b - a > 0`` |``<`` is a total | | | | |ordering relation | diff --git a/doc/permutation_iterator.pdf b/doc/permutation_iterator.pdf index 37d35ff..509e8b4 100755 Binary files a/doc/permutation_iterator.pdf and b/doc/permutation_iterator.pdf differ diff --git a/doc/pointee.pdf b/doc/pointee.pdf index ad59911..dcf28b9 100755 Binary files a/doc/pointee.pdf and b/doc/pointee.pdf differ diff --git a/doc/reverse_iterator.pdf b/doc/reverse_iterator.pdf index 34092cb..041a4b2 100755 Binary files a/doc/reverse_iterator.pdf and b/doc/reverse_iterator.pdf differ diff --git a/doc/transform_iterator.html b/doc/transform_iterator.html index 183ddf2..5200a7d 100644 --- a/doc/transform_iterator.html +++ b/doc/transform_iterator.html @@ -3,7 +3,7 @@ - + Transform Iterator @@ -12,7 +12,6 @@ -

      Transform Iterator

      @@ -32,6 +31,7 @@ Railway Operation and Construction
      Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
      +
      @@ -43,7 +43,7 @@ dereferencing the iterator and returning the result.
      -

      Table of Contents

      +

      Table of Contents

      • transform_iterator synopsis
      • transform_iterator requirements
      • @@ -130,7 +130,7 @@ concept that is modeled by the Iterator
        If transform_iterator is a model of Readable Lvalue Iterator then it models the following original iterator concepts depending on what the Iterator argument models.

        - +
        @@ -187,17 +187,20 @@ initialized to f and
        -template<class OtherIterator, class R2, class V2>
        +template<class F2, class I2, class R2, class V2>
         transform_iterator(
        -      transform_iterator<UnaryFunction, OtherIterator, R2, V2> const& t
        -    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
        +      transform_iterator<F2, I2, R2, V2> const& t
        +    , typename enable_if_convertible<I2, Iterator>::type* = 0      // exposition only
        +    , typename enable_if_convertible<F2, UnaryFunction>::type* = 0 // exposition only
         );
         
        - + diff --git a/doc/transform_iterator.pdf b/doc/transform_iterator.pdf index 2de6d65..b178155 100755 Binary files a/doc/transform_iterator.pdf and b/doc/transform_iterator.pdf differ diff --git a/doc/transform_iterator_ref.rst b/doc/transform_iterator_ref.rst index 7ed7073..58f6f26 100644 --- a/doc/transform_iterator_ref.rst +++ b/doc/transform_iterator_ref.rst @@ -138,8 +138,8 @@ operations. ); :Returns: An instance of ``transform_iterator`` with ``m_f`` -initialized to ``t.functor()`` and ``m_iterator`` initialized to -``t.base()``. + initialized to ``t.functor()`` and ``m_iterator`` initialized to + ``t.base()``. :Requires: ``OtherIterator`` is implicitly convertible to ``Iterator``. diff --git a/doc/zip_iterator.pdf b/doc/zip_iterator.pdf index 6b4c0f1..424815d 100755 Binary files a/doc/zip_iterator.pdf and b/doc/zip_iterator.pdf differ
        Returns:An instance of transform_iterator that is a copy of t.
        Returns:An instance of transform_iterator with m_f +initialized to t.functor() and m_iterator initialized to +t.base().
        Requires:OtherIterator is implicitly convertible to Iterator.