From 5b52e3d418818105a9874b03ba6ed6da43ea6302 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 25 Jul 2002 13:52:48 +0000 Subject: [PATCH] Fix doc based on Beman's feedback [SVN r14596] --- iterator_adaptors.htm | 57 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/iterator_adaptors.htm b/iterator_adaptors.htm index 7912cbd..b73037f 100644 --- a/iterator_adaptors.htm +++ b/iterator_adaptors.htm @@ -193,17 +193,26 @@ struct iterator_adaptor; Description - - BaseType + Requirements - The type being wrapped. + + Base + + The data type on which the resulting iterator is based. Do + not be misled by the name "Base": this is not a base + class. + + + Assignable, + Default Constructible Policies A policy - class that supplies core functionality to the resulting iterator. A - detailed description can be found below. + class that supplies core functionality to the resulting iterator. + + See table below. Value @@ -214,7 +223,7 @@ struct iterator_adaptor; "#1">[1]. If the value_type you wish to use is an abstract base class see note [5].
Default: - std::iterator_traits<BaseType>::value_type std::iterator_traits<Base>::value_type [2] @@ -224,29 +233,55 @@ struct iterator_adaptor; particular, the result type of operator*().
Default: If Value is supplied, Value& is used. Otherwise - std::iterator_traits<BaseType>::reference is used. [7] + std::iterator_traits<Base>::reference is used. [7] + + ForwardIterators, + BidirectionalIterators, + and RandomAccessIterators + require that Reference is a true reference type (e.g. not a proxy). Pointer The pointer type of the resulting iterator, and in particular, the result type of operator->().
- Default: If Value was supplied, then Value*, - otherwise std::iterator_traits<BaseType>::pointer. [7] + Default: If Value was supplied and + iterator_category is not + input_iterator then a class yielding + Value* when operator->() is applied, + otherwise if Value was supplied then + Value*, otherwise + std::iterator_traits<Base>::pointer. [7] + + value_type* or a + class which yields value_type* when + operator->() is applied. Category The iterator_category type for the resulting iterator.
Default: - std::iterator_traits<BaseType>::iterator_category + std::iterator_traits<Base>::iterator_category + + One of + std::input_iterator_tag, + std::output_iterator_tag, + std::forward_iterator_tag, + std::bidirectional_iterator_tag, or + std::random_access_iterator_tag. Distance The difference_type for the resulting iterator.
Default: - std::iterator_traits<BaseType>::difference_type + std::iterator_traits<Base>::difference_type + A signed integral type NamedParam