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 | |
---|---|
|
|
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 3 3 +++++++++++++++++++++++++++++ 4 4 5 5 :Author: David Abrahams, Jeremy Siek, Thomas Witt 6 :Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ acm.org6 :Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com 7 7 :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 12 20 :copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved 13 21 14 22 .. _`Boost Consulting`: http://www.boost-consulting.com 15 23 .. _`Open Systems Lab`: http://www.osl.iu.edu 16 .. _` Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de24 .. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com 17 25 18 26 :abstract: We propose a set of class templates that help programmers 19 27 build standard-conforming iterators, both from scratch and … … None 124 132 ================= 125 133 126 134 This proposal is formulated in terms of the new ``iterator concepts`` 127 as proposed in `n1477`_, since user-defined and especially adapted135 as proposed in n1550_, since user-defined and especially adapted 128 136 iterators suffer from the well known categorization problems that are 129 137 inherent to the current iterator categories. 130 138 131 .. _ `n1477`: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1477.html139 .. _n1550: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1550.html 132 140 133 This proposal does not strictly depend on proposal `n1477`_, as there141 This proposal does not strictly depend on proposal n1550_, as there 134 142 is a direct mapping between new and old categories. This proposal 135 could be reformulated using this mapping if `n1477`_ was not accepted.143 could be reformulated using this mapping if n1550_ was not accepted. 136 144 137 145 Interoperability 138 146 ================ … … None 141 149 current standard. There are currently two defect reports that are 142 150 concerned with interoperability issues. 143 151 144 Issue `179`_ concerns the fact that mutable container iterator types152 Issue 179_ concerns the fact that mutable container iterator types 145 153 are only required to be convertible to the corresponding constant 146 154 iterator types, but objects of these types are not required to 147 155 interoperate in comparison or subtraction expressions. This situation 148 156 is tedious in practice and out of line with the way built in types 149 157 work. This proposal implements the proposed resolution to issue 150 `179`_, as most standard library implementations do nowadays. In other158 179_, as most standard library implementations do nowadays. In other 151 159 words, if an iterator type A has an implicit or user defined 152 160 conversion to an iterator type B, the iterator types are interoperable 153 161 and the usual set of operators are available. 154 162 155 Issue `280`_ concerns the current lack of interoperability between163 Issue 280_ concerns the current lack of interoperability between 156 164 reverse iterator types. The proposed new reverse_iterator template 157 165 fixes the issues raised in 280. It provides the desired 158 166 interoperability without introducing unwanted overloads. 159 167 160 .. _ `179`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#179161 .. _ `280`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280168 .. _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 162 170 163 171 164 172 Iterator Facade … … None 195 203 * ``filter_iterator``, which provides a view of an iterator range in 196 204 which some elements of the underlying range are skipped. 197 205 198 .. _counting _iterator:206 .. _counting: 199 207 200 208 * ``counting_iterator``, which adapts any incrementable type 201 209 (e.g. integers, iterators) so that incrementing/decrementing the … … Issue 9.1 et al 226 234 :: 227 235 228 236 struct use_default; 229 const unsigned use_default_access = -1;230 237 231 238 struct iterator_core_access { /* implementation detail */ }; 232 239 233 240 template < 234 241 class Derived 235 242 , class Value 236 , unsigned AccessCategory 237 , class TraversalCategory 243 , class CategoryOrTraversal 238 244 , class Reference = Value& 239 245 , class Difference = ptrdiff_t 240 246 > … … Issue 9.1 et al. 244 250 class Derived 245 251 , class Base 246 252 , class Value = use_default 247 , unsigned Access = use_default_access 248 , class Traversal = use_default 253 , class CategoryOrTraversal = use_default 249 254 , class Reference = use_default 250 255 , class Difference = use_default 251 256 > … … Issue 9.1 et al. 254 259 template < 255 260 class Iterator 256 261 , class Value = use_default 257 , unsigned Access = use_default_access 258 , class Traversal = use_default 262 , class CategoryOrTraversal = use_default 259 263 , class Reference = use_default 260 264 , class Difference = use_default 261 265 > 262 266 class indirect_iterator; 263 267
Note: See TracBrowser
for help on using the repository browser.