Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/iterator/doc/facade-and-adaptor.diff @ 28

Last change on this file since 28 was 12, checked in by landauf, 17 years ago

added boost

  • Property svn:executable set to *
File size: 8.3 KB
  • facade-and-adaptor.rst

    RCS file: /cvsroot/boost/boost/libs/iterator/doc/facade-and-adaptor.rst,v
    retrieving revision 1.9
    retrieving revision 1.14
    diff -b -d -u -r1.9 -r1.14
    None 
    33+++++++++++++++++++++++++++++
    44
    55:Author: David Abrahams, Jeremy Siek, Thomas Witt
    6 :Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@acm.org
     6:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com
    77:organization: `Boost Consulting`_, Indiana University `Open Systems
    8                Lab`_, University of Hanover `Institute for Transport
    9                Railway Operation and Construction`_
    10 :date: $Date: 2004/01/18 19:56:39 $
    11 :Number: N1530=03-0113
     8               Lab`_, `Zephyr Associates, Inc.`_
     9:date: $Date: 2004/01/18 19:56:39 $
     10
     11:Number: This is a revised version of N1530_\ =03-0113, which was
     12         accepted for Technical Report 1 by the C++ standard
     13         committee's library working group. 
     14
     15.. Version 1.9 of this ReStructuredText document corresponds to
     16   n1530_, the paper accepted by the LWG.
     17
     18.. _n1530: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1530.html
     19
    1220:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
    1321
    1422.. _`Boost Consulting`: http://www.boost-consulting.com
    1523.. _`Open Systems Lab`: http://www.osl.iu.edu
    16 .. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de
     24.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com
    1725
    1826:abstract: We propose a set of class templates that help programmers
    1927           build standard-conforming iterators, both from scratch and
    None 
    124132=================
    125133
    126134This proposal is formulated in terms of the new ``iterator concepts``
    127 as proposed in `n1477`_, since user-defined and especially adapted
     135as proposed in n1550_, since user-defined and especially adapted
    128136iterators suffer from the well known categorization problems that are
    129137inherent to the current iterator categories.
    130138
    131 .. _`n1477`: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1477.html
     139.. _n1550: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1550.html
    132140
    133 This proposal does not strictly depend on proposal `n1477`_, as there
     141This proposal does not strictly depend on proposal n1550_, as there
    134142is a direct mapping between new and old categories. This proposal
    135 could be reformulated using this mapping if `n1477`_ was not accepted.
     143could be reformulated using this mapping if n1550_ was not accepted.
    136144
    137145Interoperability
    138146================
    None 
    141149current standard.  There are currently two defect reports that are
    142150concerned with interoperability issues.
    143151
    144 Issue `179`_ concerns the fact that mutable container iterator types
     152Issue 179_ concerns the fact that mutable container iterator types
    145153are only required to be convertible to the corresponding constant
    146154iterator types, but objects of these types are not required to
    147155interoperate in comparison or subtraction expressions.  This situation
    148156is tedious in practice and out of line with the way built in types
    149157work.  This proposal implements the proposed resolution to issue
    150 `179`_, as most standard library implementations do nowadays. In other
     158179_, as most standard library implementations do nowadays. In other
    151159words, if an iterator type A has an implicit or user defined
    152160conversion to an iterator type B, the iterator types are interoperable
    153161and the usual set of operators are available.
    154162
    155 Issue `280`_ concerns the current lack of interoperability between
     163Issue 280_ concerns the current lack of interoperability between
    156164reverse iterator types. The proposed new reverse_iterator template
    157165fixes the issues raised in 280. It provides the desired
    158166interoperability without introducing unwanted overloads.
    159167
    160 .. _`179`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#179
    161 .. _`280`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280
     168.. _179: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#179
     169.. _280: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280
    162170
    163171
    164172Iterator Facade
    None 
    195203* ``filter_iterator``, which provides a view of an iterator range in
    196204  which some elements of the underlying range are skipped.
    197205
    198 .. _counting_iterator:
     206.. _counting:
    199207
    200208* ``counting_iterator``, which adapts any incrementable type
    201209  (e.g. integers, iterators) so that incrementing/decrementing the
    Issue 9.1 et al 
    226234::
    227235
    228236  struct use_default;
    229   const unsigned use_default_access = -1;
    230237       
    231238  struct iterator_core_access { /* implementation detail */ };
    232239 
    233240  template <
    234241      class Derived
    235242    , class Value
    236     , unsigned AccessCategory
    237     , class TraversalCategory
     243    , class CategoryOrTraversal
    238244    , class Reference  = Value&
    239245    , class Difference = ptrdiff_t
    240246  >
    Issue 9.1 et al. 
    244250      class Derived
    245251    , class Base
    246252    , class Value      = use_default
    247     , unsigned Access  = use_default_access
    248     , class Traversal  = use_default
     253    , class CategoryOrTraversal  = use_default
    249254    , class Reference  = use_default
    250255    , class Difference = use_default
    251256  >
    Issue 9.1 et al. 
    254259  template <
    255260      class Iterator
    256261    , class Value = use_default
    257     , unsigned Access  = use_default_access
    258     , class Traversal  = use_default
     262    , class CategoryOrTraversal = use_default
    259263    , class Reference = use_default
    260264    , class Difference = use_default
    261265  >
    262266  class indirect_iterator;
    263267 
Note: See TracBrowser for help on using the repository browser.