diff --git a/development/boost/iterator_categories.hpp b/development/boost/iterator_categories.hpp deleted file mode 100644 index 138a5be..0000000 --- a/development/boost/iterator_categories.hpp +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef BOOST_ITERATOR_CATEGORIES_HPP -#define BOOST_ITERATOR_CATEGORIES_HPP - -#include -#include -#include -#include -#include - -namespace boost { - - // Return Type Categories - struct readable_iterator_tag { }; - struct writable_iterator_tag { }; - struct swappable_iterator_tag { }; - struct mutable_lvalue_iterator_tag : - virtual public writable_iterator_tag, - virtual public readable_iterator_tag { }; - struct constant_lvalue_iterator_tag : - virtual public readable_iterator_tag { }; - - // Traversal Categories - struct forward_traversal_tag { }; - struct bidirectional_traversal_tag : public forward_traversal_tag { }; - struct random_access_traversal_tag : public bidirectional_traversal_tag { }; - - struct error_iterator_tag { }; - - // Inherit from iterator_base if your iterator defines its own - // return_category and traversal_category. Otherwise, the "old style" - // iterator category will be mapped to the return_category and - // traversal_category. - struct new_iterator_base { }; - - namespace detail { - - struct return_category_from_nested_type { - template struct bind { - typedef typename Iterator::return_category type; - }; - }; - - struct traversal_category_from_nested_type { - template struct bind { - typedef typename Iterator::traversal_category type; - }; - }; - - template - struct choose_lvalue_return { - typedef typename ct_if::value, - boost::constant_lvalue_iterator_tag, - boost::mutable_lvalue_iterator_tag>::type type; - }; - - - template - struct iter_category_to_return { - typedef typename ct_if< - is_convertible::value, - typename choose_lvalue_return::type, - typename ct_if< - is_convertible::value, - boost::readable_iterator_tag, - typename ct_if< - is_convertible::value, - boost::writable_iterator_tag, - boost::error_iterator_tag - >::type - >::type - >::type type; - }; - - template - struct iter_category_to_traversal { - typedef typename ct_if< - is_convertible::value, - random_access_traversal_tag, - typename ct_if< - is_convertible::value, - bidirectional_traversal_tag, - forward_traversal_tag - >::type - >::type type; - }; - - struct return_category_from_old_traits { - template class bind { - typedef boost::detail::iterator_traits OldTraits; - typedef typename OldTraits::iterator_category Cat; - typedef typename OldTraits::value_type value_type; - public: - typedef iter_category_to_return::type type; - }; - }; - - struct traversal_category_from_old_traits { - template class bind { - typedef boost::detail::iterator_traits OldTraits; - typedef typename OldTraits::iterator_category Cat; - public: - typedef iter_category_to_traversal::type type; - }; - }; - - template - class choose_return_category { - typedef typename ct_if::value, - return_category_from_nested_type, - return_category_from_old_traits>::type Choice; - public: - typedef typename Choice:: template bind::type type; - }; - - template - class choose_traversal_category { - typedef typename ct_if::value, - traversal_category_from_nested_type, - traversal_category_from_old_traits>::type Choice; - public: - typedef typename Choice:: template bind::type type; - }; - - } // namespace detail - - template - struct return_category { - typedef typename detail::choose_return_category::type type; - }; - - - template - struct traversal_category { - typedef typename detail::choose_traversal_category::type type; - }; - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - - template - struct return_category - { - typedef typename ct_if::value, - constant_lvalue_iterator_tag, - mutable_lvalue_iterator_tag>::type type; - }; - - template - struct traversal_category - { - typedef random_access_traversal_tag type; - }; - -#endif - -} // namespace boost - -#endif // BOOST_ITERATOR_CATEGORIES_HPP diff --git a/development/boost/iterator_concepts.hpp b/development/boost/iterator_concepts.hpp deleted file mode 100644 index a30ff17..0000000 --- a/development/boost/iterator_concepts.hpp +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef BOOST_ITERATOR_CONCEPTS_HPP -#define BOOST_ITERATOR_CONCEPTS_HPP - -#include -#include -#include -#include - -namespace boost_concepts { - // Used a different namespace here (instead of "boost") so that the - // concept descriptions do not take for granted the names in - // namespace boost. - - - //=========================================================================== - // Iterator Access Concepts - - template - class ReadableIteratorConcept { - public: - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; - typedef typename boost::return_category::type return_category; - - void constraints() { - boost::function_requires< boost::SGIAssignableConcept >(); - boost::function_requires< boost::EqualityComparableConcept >(); - boost::function_requires< - boost::DefaultConstructibleConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - - reference r = *i; // or perhaps read(x) - value_type v(r); - boost::ignore_unused_variable_warning(v); - } - Iterator i; - }; - - template - class WritableIteratorConcept { - public: - typedef typename boost::return_category::type return_category; - - void constraints() { - boost::function_requires< boost::SGIAssignableConcept >(); - boost::function_requires< boost::EqualityComparableConcept >(); - boost::function_requires< - boost::DefaultConstructibleConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - - *i = v; // a good alternative could be something like write(x, v) - } - ValueType v; - Iterator i; - }; - - template - class ConstantLvalueIteratorConcept { - public: - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; - typedef typename boost::return_category::type return_category; - - void constraints() { - boost::function_requires< ReadableIteratorConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - - BOOST_STATIC_ASSERT((boost::is_same::value)); - - reference v = *i; - boost::ignore_unused_variable_warning(v); - } - Iterator i; - }; - - template - class MutableLvalueIteratorConcept { - public: - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::reference reference; - typedef typename boost::return_category::type return_category; - - void constraints() { - boost::function_requires< ReadableIteratorConcept >(); - boost::function_requires< - WritableIteratorConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - - BOOST_STATIC_ASSERT((boost::is_same::value)); - - reference v = *i; - boost::ignore_unused_variable_warning(v); - } - Iterator i; - }; - - //=========================================================================== - // Iterator Traversal Concepts - - template - class ForwardIteratorConcept { - public: - typedef typename boost::traversal_category::type traversal_category; - - void constraints() { - boost::function_requires< boost::SGIAssignableConcept >(); - boost::function_requires< boost::EqualityComparableConcept >(); - boost::function_requires< - boost::DefaultConstructibleConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - ++i; - (void)i++; - } - Iterator i; - }; - - template - class BidirectionalIteratorConcept { - public: - typedef typename boost::traversal_category::type traversal_category; - - void constraints() { - boost::function_requires< ForwardIteratorConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - - --i; - (void)i--; - } - Iterator i; - }; - - template - class RandomAccessIteratorConcept { - public: - typedef typename boost::traversal_category::type traversal_category; - typedef typename std::iterator_traits::difference_type - difference_type; - - void constraints() { - boost::function_requires< BidirectionalIteratorConcept >(); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - - i += n; - i = i + n; - i = n + i; - i -= n; - i = i - n; - n = i - j; - } - difference_type n; - Iterator i, j; - }; - -} // namespace boost_concepts - - -#endif // BOOST_ITERATOR_CONCEPTS_HPP diff --git a/development/libs/iterator/concept_tests.cpp b/development/libs/iterator/concept_tests.cpp deleted file mode 100644 index f75f311..0000000 --- a/development/libs/iterator/concept_tests.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include - -struct new_iterator - : public boost::iterator, - public boost::new_iterator_base -{ - typedef boost::random_access_traversal_tag traversal_category; - typedef boost::mutable_lvalue_iterator_tag return_category; - - int& operator*() const { return *m_x; } - new_iterator& operator++() { return *this; } - new_iterator operator++(int) { return *this; } - new_iterator& operator--() { return *this; } - new_iterator operator--(int) { return *this; } - new_iterator& operator+=(std::ptrdiff_t) { return *this; } - new_iterator operator+(std::ptrdiff_t) { return *this; } - new_iterator& operator-=(std::ptrdiff_t) { return *this; } - std::ptrdiff_t operator-(const new_iterator&) const { return 0; } - new_iterator operator-(std::ptrdiff_t) const { return *this; } - bool operator==(const new_iterator&) const { return false; } - bool operator!=(const new_iterator&) const { return false; } - bool operator<(const new_iterator&) const { return false; } - int* m_x; -}; -new_iterator operator+(std::ptrdiff_t, new_iterator x) { return x; } - -struct old_iterator - : public boost::iterator -{ - int& operator*() const { return *m_x; } - old_iterator& operator++() { return *this; } - old_iterator operator++(int) { return *this; } - old_iterator& operator--() { return *this; } - old_iterator operator--(int) { return *this; } - old_iterator& operator+=(std::ptrdiff_t) { return *this; } - old_iterator operator+(std::ptrdiff_t) { return *this; } - old_iterator& operator-=(std::ptrdiff_t) { return *this; } - old_iterator operator-(std::ptrdiff_t) const { return *this; } - std::ptrdiff_t operator-(const old_iterator&) const { return 0; } - bool operator==(const old_iterator&) const { return false; } - bool operator!=(const old_iterator&) const { return false; } - bool operator<(const old_iterator&) const { return false; } - int* m_x; -}; -old_iterator operator+(std::ptrdiff_t, old_iterator x) { return x; } - -int -main() -{ -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - boost::function_requires< - boost_concepts::MutableLvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessIteratorConcept >(); - - boost::function_requires< - boost_concepts::ConstantLvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessIteratorConcept >(); -#endif - - boost::function_requires< - boost_concepts::MutableLvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessIteratorConcept >(); - - boost::function_requires< - boost_concepts::MutableLvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessIteratorConcept >(); - return 0; -} diff --git a/development/libs/iterator/iterator_categories.htm b/development/libs/iterator/iterator_categories.htm deleted file mode 100644 index 83c29e5..0000000 --- a/development/libs/iterator/iterator_categories.htm +++ /dev/null @@ -1,160 +0,0 @@ - - - - Boost Iterator Traits - - - -C++ Boost -
- -

Boost Iterator Category Traits

-Header boost/iterator_categories.hpp - -

-The boost::traversal_category and -boost::return_category traits classes provides access to the -category tags for iterators that model the Boost Iterator Concepts, which are a -replacement for the iterator requirements in the C++ standard. The -other associated types of the Boost iterator concepts are accessed -through the std::iterator_traits class. - -

    -
  • traversal_category<Iter>::type   Can the iterator go forward, backward, etc.? -
  • return_category<Iter>::type   Is the iterator read or write only? - Is the dereferenced type an lvalue? -
- -

-An important feature of the boost::traversal_category and -boost::return_category classes is that they are backwards -compatible, i.e., they automatically work for iterators for which -there are valid definitions of std::iterator_traits. The old -iterator_category is mapped to the appropriate traversal and -return categories. - -

-When creating a new iterator type that is meant to work with -boost::traversal_category and -boost::return_category, you can either create a -specialization of these classes for your iterator type, or you can -provide all the necessary associated types as nested typedefs. In -this case, your iterator class will need to inherit from -new_iterator_base to let the category traits know -that it will be able to find typedefs for traversal_category -and return_category in you iterator class. - - -Each of the new iterator requirements will need a category tag. - -

-namespace boost {
-
-  // Return Type Categories
-  struct readable_iterator_tag { };
-  struct writable_iterator_tag { };
-  struct swappable_iterator_tag { };
-  struct mutable_lvalue_iterator_tag : virtual public writable_iterator_tag,
-    virtual public readable_iterator_tag { };
-  struct constant_lvalue_iterator_tag : public readable_iterator_tag { };
-
-  // Traversal Categories
-  struct forward_traversal_tag { };
-  struct bidirectional_traversal_tag : public forward_traversal_tag { };
-  struct random_access_traversal_tag : public bidirectional_traversal_tag { };
-
-}
-
- -

-The following is pseudo-code for the iterator category traits classes. - -

-namespace boost {
-
-  // Inherit from iterator_base if your iterator defines its own
-  // return_category and traversal_category. Otherwise, the "old style"
-  // iterator category will be mapped to the return_category and
-  // traversal_category.
-  struct new_iterator_base { };
-
-  template <typename Iterator>
-  struct return_category
-  {
-    // Pseudo-code
-    if (Iterator inherits from new_iterator_base) {
-      typedef typename Iterator::return_category type;
-    } else {
-      typedef std::iterator_traits<Iterator> OldTraits;
-      typedef typename OldTraits::iterator_category Cat;
-      if (Cat inherits from std::forward_iterator_tag)
-	if (is-const(T))
-	  typedef boost::constant_lvalue_iterator_tag type;
-	else
-	  typedef boost::mutable_lvalue_iterator_tag type;
-      else if (Cat inherits from std::input_iterator_tag)
-	typedef boost::readable_iterator_tag type;
-      else if (Cat inherits from std::output_iterator_tag)
-	typedef boost::writable_iterator_tag type;
-    }
-  };
-
-  template <typename T>
-  struct return_category<T*>
-  {
-    // Pseudo-code
-    if (is-const(T))
-      typedef boost::constant_lvalue_iterator_tag type;
-    else
-      typedef boost::mutable_lvalue_iterator_tag type;
-  };
-
-  template <typename Iterator>
-  struct traversal_category
-  {
-    // Pseudo-code
-    if (Iterator inherits from new_iterator_base) {
-      typedef typename Iterator::traversal_category type;
-    } else {
-      typedef std::iterator_traits<Iterator> OldTraits;
-      typedef typename OldTraits::iterator_category Cat;
-
-      if (Cat inherits from std::random_access_iterator_tag)
-	typedef boost::random_access_traversal_tag type;
-      else if (Cat inherits from std::bidirectional_iterator_tag)
-	typedef boost::bidirectional_traversal_tag type;
-      else if (Cat inherits from std::forward_iterator_tag)
-	typedef boost::forward_traversal_tag type;
-    }
-  };
-
-  template <typename T>
-  struct traversal_category<T*>
-  {
-    typedef boost::random_access_traversal_tag type;
-  };
-
-}
-
- -
-
jeremy siek
- - -Last modified: Mon Mar 19 12:59:30 EST 2001 - - - diff --git a/development/libs/iterator/iterator_concepts.fig b/development/libs/iterator/iterator_concepts.fig deleted file mode 100644 index 198205e..0000000 --- a/development/libs/iterator/iterator_concepts.fig +++ /dev/null @@ -1,37 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -6 150 2325 4275 4350 -2 1 0 1 0 7 100 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 1725 4050 1725 3450 -2 1 0 1 0 7 100 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 1725 3150 1725 2550 -4 0 0 100 0 19 18 0.0000 4 210 3180 375 2550 ForwardTraversalIterator\001 -4 0 0 100 0 19 18 0.0000 4 210 3765 225 3450 BidirectionalTraversalIterator\001 -4 0 0 100 0 19 18 0.0000 4 210 4125 150 4350 RandomAccessTraversalIterator\001 --6 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 4800 3600 4800 2400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6900 3000 5400 2400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6900 3000 7500 2400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6900 3000 9075 2475 -4 0 0 100 0 19 18 0.0000 4 210 2040 6600 2400 WritableIterator\001 -4 0 0 100 0 19 18 0.0000 4 210 2145 3900 2400 ReadableIterator\001 -4 0 0 50 0 19 18 0.0000 4 210 2835 5700 3300 MutableLvalueIterator\001 -4 0 0 50 0 19 18 0.0000 4 270 2355 9075 2400 SwappableIterator\001 -4 0 0 50 0 19 18 0.0000 4 210 2970 3825 3900 ConstantLvalueIterator\001 diff --git a/development/libs/iterator/iterator_concepts.gif b/development/libs/iterator/iterator_concepts.gif deleted file mode 100644 index bac35c7..0000000 Binary files a/development/libs/iterator/iterator_concepts.gif and /dev/null differ diff --git a/development/libs/iterator/iterator_concepts.htm b/development/libs/iterator/iterator_concepts.htm deleted file mode 100644 index f2f8dcd..0000000 --- a/development/libs/iterator/iterator_concepts.htm +++ /dev/null @@ -1,663 +0,0 @@ - - - - -Iterator Concepts - -C++ Boost - -
- - -

Iterator Concepts

- -

The standard iterator categories and requirements are flawed because -they use a single hierarchy of requirements to address two orthogonal -issues: iterator traversal and dereference return -type. The current iterator requirement hierarchy is mainly -geared towards iterator traversal (hence the category names), while -requirements that address dereference return type sneak in at various -places. - -

-The iterator requirements should be separated into two hierarchies. -One set of concepts handles the return type semantics: -

- -The other set of concepts handles iterator traversal: - - - -The current Input Iterator and Output Iterator requirements will -continue to be used as is. Note that Input Iterator implies Readable -Iterator and Output Iterator implies Writable Iterator. - -

-Note: we considered defining a Single-Pass Iterator, which could be -combined with Readable or Writable Iterator to replace the Input and -Output Iterator requirements. We rejected this idea because there are -some differences between Input and Output Iterators that make it hard -to merge them: for example Input Iterator requires Equality Comparable -while Output Iterator does not. - - -

-
- - - -
Figure 1: -The iterator concepts and refinement relationships. -
-
-

- - -

Relationship with the standard iterator concepts

- -

-std::Input Iterator implies boost::ReadableIterator. - -

-std::Output Iterator implies boost::Writable Iterator. - -

-std::Forward Iterator refines boost::Forward Iterator and -boost::Constant Lvalue Iterator or boost::Mutable Lvalue Iterator. - -

-std::Bidirectional Iterator refines boost::Bidirectional Iterator and -boost::Constant Lvalue Iterator or boost::Mutable Lvalue Iterator. - -

-std::Random Access Iterator refines boost::Random Access Iterator and -boost::Constant Lvalue Iterator or boost::Mutable Lvalue Iterator. - - -

Notation

- - - - - - - - - - - - - - - - - -
XThe iterator type.
TThe value type of X, i.e., std::iterator_traits<X>::value_type.
x, yAn object of type X.
tAn object of type T.
- -

- -


- - -

-Readable Iterator -

- -A Readable Iterator is an iterator that dereferences to produce an -rvalue that is convertible to the value_type of the -iterator. - -

Associated Types

- - - - - - - - - - - - - - - - - - - - - -
Value typestd::iterator_traits<X>::value_typeThe type of the objects pointed to by the iterator.
Reference typestd::iterator_traits<X>::reference - The return type of dereferencing the iterator. This - type must be convertible to T. -
Return Categorystd::return_category<X>::type - A type convertible to std::readable_iterator_tag -
- -

Refinement of

- -Copy Constructible - -

Valid expressions

- - - - - - - - - - - - - - - -
NameExpressionType requirementsReturn type
Dereference*x std::iterator_traits<X>::reference
Member accessx->mT is a type with a member named m. -If m is a data member, the type of m. -If m is a member function, the return type of m. -
- -

- -


- - -

-Writable Iterator -

- -A Writable Iterator is an iterator that can be used to store a value -using the dereference-assignment expression. - -

Definitions

- -If x is an Writable Iterator of type X, then the -expression *x = a; stores the value a into -x. Note that operator=, like other C++ functions, -may be overloaded; it may, in fact, even be a template function. In -general, then, a may be any of several different types. A -type A belongs to the set of value types of X -if, for an object a of type A, *x = a; is -well-defined and does not require performing any non-trivial -conversions on a. - -

Associated Types

- - - - - - - - - -
Return Categorystd::return_category<X>::type - A type convertible to std::writable_iterator_tag -
- - - -

Refinement of

- -Copy Constructible - -

Valid expressions

- - - - - - - - - - -
NameExpressionReturn type
Dereference assignment*x = aunspecified
- -

- - -


- - -

-Swappable Iterator -

- -A Swappable Iterator is an iterator whose dereferenced values can be -swapped. - -

-Note: the requirements for Swappable Iterator are dependent on the -issues surrounding std::swap() being resolved. Here we assume -that the issue will be resolved by allowing the overload of -std::swap() for user-defined types. - -

-Note: Readable Iterator and Writable Iterator combined implies -Swappable Iterator because of the fully templated -std::swap(). However, Swappable Iterator does not imply -Readable Iterator nor Writable Iterator. - -

Associated Types

- - - - - - - - - -
Return Categorystd::return_category<X>::type - A type convertible to std::swappable_iterator_tag -
- - -

Valid expressions

- -Of the two valid expressions listed below, only one OR the -other is required. If std::iter_swap() is overloaded for -X then std::swap() is not required. If -std::iter_swap() is not overloaded for X then the -default (fully templated) version is used, which will call -std::swap() (this means changing the current requirements for -std::iter_swap()). - -

- - - - - - - - - - - - - - - - - -
NameExpressionReturn type
Iterator Swapstd::iter_swap(x, y)void
Dereference and Swapstd::swap(*x, *y)void
- -

- - -


- - -

-Constant Lvalue Iterator -

- -A Constant Lvalue Iterator is an iterator that dereferences to produce a -const reference to the pointed-to object, i.e., the associated -reference type is const T&. Changing the value -of or destroying an iterator that models Constant Lvalue Iterator does -not invalidate pointers and references previously obtained from that -iterator. - - -

Refinement of

- -Readable Iterator - -

Associated Types

- - - - - - - - - - - - - - - - - -
Reference typestd::iterator_traits<X>::reference - The return type of dereferencing the iterator, which must be - const T&. -
Return Categorystd::return_category<X>::type - A type convertible to std::constant_lvalue_iterator_tag -
- - - -

- -


- - -

-Mutable Lvalue Iterator -

- -A Mutable Lvalue Iterator is an iterator that dereferences to produce a -reference to the pointed-to object. The associated reference -type is T&. Changing the value of or destroying an -iterator that models Mutable Lvalue Iterator does not invalidate -pointers and references previously obtained from that iterator. - -

Refinement of

- -Readable Iterator, -Writable Iterator, -and Swappable Iterator. - - - -

Associated Types

- - - - - - - - - - - - - - - - - -
Reference typestd::iterator_traits<X>::referenceThe return type of dereferencing the iterator, which must be - T&.
Return Categorystd::return_category<X>::type - A type convertible to std::mutable_lvalue_iterator_tag -
- - - -

-


- - -

-Forward Traversal Iterator -

- -The Forward Iterator is an iterator that can be incremented. Also, it -is permissible to make multiple passes through the iterator's range. - -

Refinement of

- -Copy Constructible, -Assignable, -Default Constructible, and -Equality Comparable - - -

Associated types

- - - - - - - - - - - - - - -
Difference Typestd::iterator_traits<X>::difference_type - A signed integral type used for representing distances - between iterators that point into the same range. -
Traversal Categorystd::traversal_category<X>::type - A type convertible to std::forward_traversal_tag -
- -

Valid expressions

- - - - - - - - - - - - - - -
NameExpressionType requirementsReturn type
Preincrement++i X&
Postincrementi++ convertible to const X&
- -

-


- - -

-Bidirectional Traversal Iterator -

- -An iterator that can be incremented and decremented. - -

Refinement of

- -Forward Traversal Iterator - -

Associated types

- - - - - - - -
Traversal Categorystd::traversal_category<X>::type - A type convertible to std::bidirectional_traversal_tag -
- -

Valid expressions

- - - - - - - - - - - - -
NameExpressionType requirementsReturn type
Predecrement--i X&
Postdecrementi-- convertible to const X&
- -

-


- - -

-Random Access Traversal Iterator -

- -An iterator that provides constant-time methods for moving forward and -backward in arbitrary-sized steps. - -

Refinement of

- -Bidirectional Traversal Iterator and -Less Than Comparable where < is a total ordering - -

Associated types

- - - - - - - -
Traversal Categorystd::traversal_category<X>::type - A type convertible to std::random_access_traversal_tag -
- -

Valid expressions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameExpressionType requirementsReturn type
Iterator additioni += n X&
Iterator additioni + n or n + i X
Iterator subtractioni -= n X&
Iterator subtractioni - n X
Differencei - j std::iterator_traits<X>::difference_type
Element operatori[n]X must also be a model of - Readable Iterator. std::iterator_traits<X>::reference
Element assignmenti[n] = tX must also be a model of - Writable Iterator.unspecified
- -

- -


- - -
Copyright © 2000 -Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) -
- - - diff --git a/doc/BidirectionalTraversal.html b/doc/BidirectionalTraversal.html deleted file mode 100644 index 9de555e..0000000 --- a/doc/BidirectionalTraversal.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - -Bidirectional Traversal Concept - - - -

Bidirectional Traversal Concept

-
-

A class or built-in type X models the Bidirectional Traversal -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)
ExpressionReturn TypeAssertion/Semantics / -Pre-/Post-condition
--rX&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<X>::typeConvertible to -bidirectional_traversal_tag 
-
- - - - diff --git a/doc/BidirectionalTraversal.rst b/doc/BidirectionalTraversal.rst deleted file mode 100755 index 8655c63..0000000 --- a/doc/BidirectionalTraversal.rst +++ /dev/null @@ -1,37 +0,0 @@ -Bidirectional Traversal Concept -............................... - -A class or built-in type ``X`` models the *Bidirectional Traversal* -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``| | -| | | | -+--------------------------------+-------------------------------+---------------------+ diff --git a/doc/ForwardTraversal.html b/doc/ForwardTraversal.html deleted file mode 100644 index 80447aa..0000000 --- a/doc/ForwardTraversal.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - -Forward Traversal Concept - - - -

Forward Traversal Concept

-
-

A class or built-in type X models the Forward Traversal -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.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator)
ExpressionReturn TypeAssertion/Note
X u;X&note: u may have a -singular value.
++rX&r == s and r is -dereferenceable implies -++r == ++s.
iterator_traits<X>::difference_typeA signed integral type representing -the distance between iterators 
iterator_traversal<X>::typeConvertible to -forward_traversal_tag 
-
- - - - diff --git a/doc/ForwardTraversal.rst b/doc/ForwardTraversal.rst deleted file mode 100755 index c4156d5..0000000 --- a/doc/ForwardTraversal.rst +++ /dev/null @@ -1,27 +0,0 @@ -Forward Traversal Concept -......................... - -A class or built-in type ``X`` models the *Forward Traversal* -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. - -+--------------------------------------------------------------------------------------------------------+ -|Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator) | -+---------------------------------------+-----------------------------------+----------------------------+ -|Expression |Return Type |Assertion/Note | -+=======================================+===================================+============================+ -|``X u;`` |``X&`` |note: ``u`` may have a | -| | |singular value. | -+---------------------------------------+-----------------------------------+----------------------------+ -|``++r`` |``X&`` |``r == s`` and ``r`` is | -| | |dereferenceable implies | -| | |``++r == ++s.`` | -+---------------------------------------+-----------------------------------+----------------------------+ -|``iterator_traits::difference_type``|A signed integral type representing| | -| |the distance between iterators | | -| | | | -+---------------------------------------+-----------------------------------+----------------------------+ -|``iterator_traversal::type`` |Convertible to | | -| |``forward_traversal_tag`` | | -+---------------------------------------+-----------------------------------+----------------------------+ diff --git a/doc/GNUmakefile b/doc/GNUmakefile deleted file mode 100755 index 85917f7..0000000 --- a/doc/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright David Abrahams 2004. Distributed under the Boost -# Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -ECHO = /bin/echo - -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." - diff --git a/doc/IncrementableIterator.html b/doc/IncrementableIterator.html deleted file mode 100644 index 0544d22..0000000 --- a/doc/IncrementableIterator.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -Incrementable Iterator Concept - - - -

Incrementable Iterator Concept

-
-

A class or built-in type X models the Incrementable Iterator -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)
ExpressionReturn TypeAssertion/Semantics
++rX&&r == &++r
r++X
-{
-   X tmp = r;
-   ++r;
-   return tmp;
-}
-
-
iterator_traversal<X>::typeConvertible to -incrementable_traversal_tag 
-
- - - - diff --git a/doc/IncrementableIterator.rst b/doc/IncrementableIterator.rst deleted file mode 100755 index f14928e..0000000 --- a/doc/IncrementableIterator.rst +++ /dev/null @@ -1,28 +0,0 @@ -Incrementable Iterator Concept -.............................. - -A class or built-in type ``X`` models the *Incrementable Iterator* -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/Semantics | -+================================+===============================+====================+ -|``++r`` |``X&`` |``&r == &++r`` | -+--------------------------------+-------------------------------+--------------------+ -|``r++`` |``X`` |:: | -| | | | -| | | { | -| | | X tmp = r; | -| | | ++r; | -| | | return tmp; | -| | | } | -+--------------------------------+-------------------------------+--------------------+ -|``iterator_traversal::type`` |Convertible to | | -| |``incrementable_traversal_tag``| | -+--------------------------------+-------------------------------+--------------------+ diff --git a/doc/InteroperableIterator.rst b/doc/InteroperableIterator.rst deleted file mode 100644 index 0cb751e..0000000 --- a/doc/InteroperableIterator.rst +++ /dev/null @@ -1,57 +0,0 @@ -Interoperable Iterator Concept -.............................. - -A class or built-in type ``X`` that models Single Pass Iterator is -*interoperable with* a class or built-in type ``Y`` that also models -Single Pass Iterator if the following expressions are valid and -respect the stated semantics. In the tables below, ``x`` is an object -of type ``X``, ``y`` is an object of type ``Y``, ``Distance`` is -``iterator_traits::difference_type``, and ``n`` represents a -constant object of type ``Distance``. - -+-----------+-----------------------+---------------------------------------------------+ -|Expression |Return Type |Assertion/Precondition/Postcondition | -+===========+=======================+===================================================+ -|``y = x`` |``Y`` |post: ``y == x`` | -+-----------+-----------------------+---------------------------------------------------+ -|``Y(x)`` |``Y`` |post: ``Y(x) == x`` | -+-----------+-----------------------+---------------------------------------------------+ -|``x == y`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. | -+-----------+-----------------------+---------------------------------------------------+ -|``y == x`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. | -+-----------+-----------------------+---------------------------------------------------+ -|``x != y`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain. | -+-----------+-----------------------+---------------------------------------------------+ -|``y != x`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain. | -+-----------+-----------------------+---------------------------------------------------+ - -If ``X`` and ``Y`` both model Random Access Traversal Iterator then -the following additional requirements must be met. - -+-----------+-----------------------+---------------------+--------------------------------------+ -|Expression |Return Type |Operational Semantics|Assertion/ Precondition | -+===========+=======================+=====================+======================================+ -|``x < y`` |convertible to ``bool``|``y - x > 0`` |``<`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y < x`` |convertible to ``bool``|``x - y > 0`` |``<`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x > y`` |convertible to ``bool``|``y < x`` |``>`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y > x`` |convertible to ``bool``|``x < y`` |``>`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x >= y`` |convertible to ``bool``|``!(x < y)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y >= x`` |convertible to ``bool``|``!(y < x)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x <= y`` |convertible to ``bool``|``!(x > y)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y <= x`` |convertible to ``bool``|``!(y > x)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y - x`` |``Distance`` |``distance(Y(x),y)`` |pre: there exists a value ``n`` of | -| | | |``Distance`` such that ``x + n == y``.| -| | | |``y == x + (y - x)``. | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x - y`` |``Distance`` |``distance(y,Y(x))`` |pre: there exists a value ``n`` of | -| | | |``Distance`` such that ``y + n == x``.| -| | | |``x == y + (x - y)``. | -+-----------+-----------------------+---------------------+--------------------------------------+ diff --git a/doc/LvalueIterator.html b/doc/LvalueIterator.html deleted file mode 100644 index 29b3187..0000000 --- a/doc/LvalueIterator.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -Lvalue Iterator Concept - - - -

Lvalue Iterator Concept

-
-

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

- ----- - - - - - - - - - - - - - - -
Lvalue Iterator Requirements
ExpressionReturn TypeNote/Assertion
*aT&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.
-
- - - - diff --git a/doc/LvalueIterator.rst b/doc/LvalueIterator.rst deleted file mode 100755 index 46c61b1..0000000 --- a/doc/LvalueIterator.rst +++ /dev/null @@ -1,21 +0,0 @@ -Lvalue Iterator Concept -....................... - -The *Lvalue Iterator* concept adds the requirement that the return -type of ``operator*`` type be a reference to the value type of the -iterator. - -+-------------------------------------------------------------+ -| Lvalue Iterator Requirements | -+-------------+-----------+-----------------------------------+ -|Expression |Return Type|Note/Assertion | -+=============+===========+===================================+ -|``*a`` | ``T&`` |``T`` is *cv* | -| | |``iterator_traits::value_type`` | -| | |where *cv* is an optional | -| | |cv-qualification. | -| | |pre: ``a`` is | -| | |dereferenceable. If ``a | -| | |== b`` then ``*a`` is | -| | |equivalent to ``*b``. | -+-------------+-----------+-----------------------------------+ diff --git a/doc/RandomAccessTraversal.html b/doc/RandomAccessTraversal.html deleted file mode 100644 index 761ab0d..0000000 --- a/doc/RandomAccessTraversal.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - -Random Access Traversal Concept - - - -

Random Access Traversal Concept

-
-

A class or built-in type X models the Random Access Traversal -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.

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Random Access Traversal Iterator Requirements (in addition to Bidirectional Traversal)
ExpressionReturn TypeOperational SemanticsAssertion/ -Precondition
r += nX&
-{
-  Distance m = n;
-  if (m >= 0)
-    while (m--)
-      ++r;
-  else
-    while (m++)
-      --r;
-  return r;
-}
-
-
 
a + n, n + aX{ X tmp = a; return tmp -+= n; } 
r -= nX&return r += -n 
a - nX{ X tmp = a; return tmp --= n; } 
b - aDistancea < b ?  distance(a,b) -: -distance(b,a)pre: there exists a -value n of -Distance such that -a + n == b. b -== a + (b - a).
a[n]convertible to T*(a + n)pre: a is a Readable -Iterator
a[n] = vconvertible to T*(a + n) = vpre: a is a Writable -iterator
a < bconvertible to boolb - a > 0< is a total -ordering relation
a > bconvertible to boolb < a> is a total -ordering relation
a >= bconvertible to bool!(a < b) 
a <= bconvertible to bool!(a > b) 
iterator_traversal<X>::typeConvertible to -random_access_traversal_tag  
-
- - - - diff --git a/doc/RandomAccessTraversal.rst b/doc/RandomAccessTraversal.rst deleted file mode 100644 index 97b0f3d..0000000 --- a/doc/RandomAccessTraversal.rst +++ /dev/null @@ -1,63 +0,0 @@ -Random Access Traversal Concept -............................... - -A class or built-in type ``X`` models the *Random Access Traversal* -concept if the following expressions are valid and respect the stated -semantics. In the table below, ``Distance`` is -``iterator_traits::difference_type`` and ``n`` represents a -constant object of type ``Distance``. - -+------------------------------------------------------------------------------------------------------------------+ -|Random Access Traversal Iterator Requirements (in addition to Bidirectional Traversal) | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|Expression |Return Type |Operational Semantics |Assertion/ | -| | | |Precondition | -+===============================+=================================+=========================+======================+ -|``r += n`` |``X&`` |:: | | -| | | | | -| | | { | | -| | | Distance m = n; | | -| | | if (m >= 0) | | -| | | while (m--) | | -| | | ++r; | | -| | | else | | -| | | while (m++) | | -| | | --r; | | -| | | return r; | | -| | | } | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a + n``, ``n + a`` |``X`` |``{ X tmp = a; return tmp| | -| | |+= n; }`` | | -| | | | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``r -= n`` |``X&`` |``return r += -n`` | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a - n`` |``X`` |``{ X tmp = a; return tmp| | -| | |-= n; }`` | | -| | | | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``b - a`` |``Distance`` |``a < b ? distance(a,b) |pre: there exists a | -| | |: -distance(b,a)`` |value ``n`` of | -| | | |``Distance`` such that| -| | | |``a + n == b``. ``b | -| | | |== a + (b - a)``. | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``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 < b`` |convertible to ``bool`` |``b - a > 0`` |``<`` is a total | -| | | |ordering relation | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a > b`` |convertible to ``bool`` |``b < a`` |``>`` is a total | -| | | |ordering relation | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a >= b`` |convertible to ``bool`` |``!(a < b)`` | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a <= b`` |convertible to ``bool`` |``!(a > b)`` | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``iterator_traversal::type``|Convertible to | | | -| |``random_access_traversal_tag`` | | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ diff --git a/doc/ReadableIterator.html b/doc/ReadableIterator.html deleted file mode 100644 index df231d3..0000000 --- a/doc/ReadableIterator.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -Readable Iterator Concept - - - -

Readable Iterator Concept

-
-

A class or built-in type X models the Readable Iterator concept -for value type T if, in addition to X being Assignable and -Copy Constructible, the following expressions are valid and respect -the stated semantics. U is the type of any specified member of -type T.

- ----- - - - - - - - - - - - - - - - - - - - - - - -
Readable Iterator Requirements (in addition to Assignable and Copy Constructible)
ExpressionReturn TypeNote/Precondition
iterator_traits<X>::value_typeTAny non-reference, -non-cv-qualified type
*aConvertible to T
-
pre: a is dereferenceable. If a == b then *a
-
is equivalent to *b.
-
-
a->mU&pre: pre: (*a).m is well-defined. Equivalent to (*a).m.
-
- - - - diff --git a/doc/ReadableIterator.rst b/doc/ReadableIterator.rst deleted file mode 100755 index d38dad5..0000000 --- a/doc/ReadableIterator.rst +++ /dev/null @@ -1,23 +0,0 @@ - -Readable Iterator Concept -......................... - -A class or built-in type ``X`` models the *Readable Iterator* concept -for value type ``T`` if, in addition to ``X`` being Assignable and -Copy Constructible, the following expressions are valid and respect -the stated semantics. ``U`` is the type of any specified member of -type ``T``. - -+-----------------------------------------------------------------------------------------------------------------------------+ -|Readable Iterator Requirements (in addition to Assignable and Copy Constructible) | -+-----------------------------------+------------------------+----------------------------------------------------------------+ -|Expression |Return Type |Note/Precondition | -+===================================+========================+================================================================+ -|``iterator_traits::value_type`` |``T`` |Any non-reference, | -| | |non-cv-qualified type | -+-----------------------------------+------------------------+----------------------------------------------------------------+ -|``*a`` | Convertible to ``T`` |pre: ``a`` is dereferenceable. If ``a == b`` then ``*a`` | -| | | is equivalent to ``*b``. | -+-----------------------------------+------------------------+----------------------------------------------------------------+ -|``a->m`` |``U&`` |pre: ``pre: (*a).m`` is well-defined. Equivalent to ``(*a).m``. | -+-----------------------------------+------------------------+----------------------------------------------------------------+ diff --git a/doc/SinglePassIterator.html b/doc/SinglePassIterator.html deleted file mode 100644 index bd176d8..0000000 --- a/doc/SinglePassIterator.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - -Single Pass Iterator Concept - - - -

Single Pass Iterator Concept

-
-

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 -Comparable)
ExpressionReturn TypeAssertion/Semantics / -Pre-/Post-condition
++rX&pre: r is -dereferenceable; post: -r is dereferenceable or -r is past-the-end
a == bconvertible to bool== is an equivalence -relation over its domain
a != bconvertible to bool!(a == b)
iterator_traversal<X>::typeConvertible to -single_pass_traversal_tag 
-
- - - - diff --git a/doc/SinglePassIterator.rst b/doc/SinglePassIterator.rst deleted file mode 100755 index 2754d97..0000000 --- a/doc/SinglePassIterator.rst +++ /dev/null @@ -1,28 +0,0 @@ -Single Pass Iterator Concept -............................ - -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 | -|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``| | -+--------------------------------+-----------------------------+---------------------------+ diff --git a/doc/SwappableIterator.html b/doc/SwappableIterator.html deleted file mode 100644 index 7478e5f..0000000 --- a/doc/SwappableIterator.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - -Swappable Iterator Concept - - - -

Swappable Iterator Concept

-
-

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.

- ----- - - - - - - - - - - - - - - -
Swappable Iterator Requirements (in addition to Copy Constructible)
ExpressionReturn TypePostcondition
iter_swap(a, b)voidthe pointed to values are -exchanged
-
-
[Note: An iterator that is a model of the Readable and Writable Iterator concepts
-
is also a model of Swappable Iterator. --end note]
-
-
- - - - diff --git a/doc/SwappableIterator.rst b/doc/SwappableIterator.rst deleted file mode 100755 index ec94d32..0000000 --- a/doc/SwappableIterator.rst +++ /dev/null @@ -1,19 +0,0 @@ -Swappable Iterator Concept -.......................... - -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. - -+---------------------------------------------------------------------+ -|Swappable Iterator Requirements (in addition to Copy Constructible) | -+-------------------------+-------------+-----------------------------+ -|Expression |Return Type |Postcondition | -+=========================+=============+=============================+ -|``iter_swap(a, b)`` |``void`` |the pointed to values are | -| | |exchanged | -+-------------------------+-------------+-----------------------------+ - -[*Note:* An iterator that is a model of the *Readable* and *Writable Iterator* concepts - is also a model of *Swappable Iterator*. *--end note*] - diff --git a/doc/WritableIterator.html b/doc/WritableIterator.html deleted file mode 100644 index c3676bf..0000000 --- a/doc/WritableIterator.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - -Writable Iterator Concept - - - -

Writable Iterator Concept

-
-

A class or built-in type X models the Writable Iterator concept -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.

- ----- - - - - - - - - - - - - - - -
Writable Iterator Requirements (in addition to Copy Constructible)
ExpressionReturn TypePrecondition
*a = o pre: The type of o -is in the set of -value types of X
-
- - - - diff --git a/doc/WritableIterator.rst b/doc/WritableIterator.rst deleted file mode 100755 index 7b854cc..0000000 --- a/doc/WritableIterator.rst +++ /dev/null @@ -1,17 +0,0 @@ -Writable Iterator Concept -......................... - -A class or built-in type ``X`` models the *Writable Iterator* concept -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*. - -+---------------------------------------------------------------------+ -|Writable Iterator Requirements (in addition to Copy Constructible) | -+-------------------------+--------------+----------------------------+ -|Expression |Return Type |Precondition | -+=========================+==============+============================+ -|``*a = o`` | | pre: The type of ``o`` | -| | | is in the set of | -| | | value types of ``X`` | -+-------------------------+--------------+----------------------------+ diff --git a/doc/access.png b/doc/access.png deleted file mode 100644 index 80011dc..0000000 Binary files a/doc/access.png and /dev/null differ diff --git a/doc/access2old.png b/doc/access2old.png deleted file mode 100644 index 8a87b84..0000000 Binary files a/doc/access2old.png and /dev/null differ diff --git a/doc/counting_iterator.html b/doc/counting_iterator.html deleted file mode 100644 index 8faa043..0000000 --- a/doc/counting_iterator.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - -Counting Iterator - - - - - - - -
-

Counting Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:

How would you fill up a vector with the numbers zero -through one hundred using std::copy()? The only iterator -operation missing from builtin integer types is an -operator*() that returns the current value of the integer. -The counting iterator adaptor adds this crucial piece of -functionality to whatever type it wraps. One can use the -counting iterator adaptor not only with integer types, but with -any incrementable type.

-

counting_iterator adapts an object by adding an operator* that -returns the current value of the object. All other iterator operations -are forwarded to the adapted object.

-
- -
-

counting_iterator synopsis

-
-template <
-    class Incrementable
-  , class CategoryOrTraversal = use_default
-  , class Difference = use_default
->
-class counting_iterator
-{
-public:
-    typedef Incrementable value_type;
-    typedef const Incrementable& reference;
-    typedef const Incrementable* pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-    counting_iterator();
-    counting_iterator(counting_iterator const& rhs);
-    explicit counting_iterator(Incrementable x);
-    Incrementable const& base() const;
-    reference operator*() const;
-    counting_iterator& operator++();
-    counting_iterator& operator--();
-private:
-    Incrementable m_inc; // exposition
-};
-
-

If the Difference argument is use_default then -difference_type is an unspecified signed integral -type. Otherwise difference_type is Difference.

-

iterator_category is determined according to the following -algorithm:

-
-if (CategoryOrTraversal is not use_default)
-    return CategoryOrTraversal
-else if (numeric_limits<Incrementable>::is_specialized)
-    return iterator-category(
-        random_access_traversal_tag, Incrementable, const Incrementable&)
-else
-    return iterator-category(
-         iterator_traversal<Incrementable>::type, 
-         Incrementable, const Incrementable&)
-
-
-
[Note: implementers are encouraged to provide an implementation of
-
operator- and a difference_type that avoids overflows in -the cases where std::numeric_limits<Incrementable>::is_specialized -is true.]
-
-
-
-

counting_iterator requirements

-

The Incrementable argument shall be Copy Constructible and Assignable.

-

If iterator_category is convertible to forward_iterator_tag -or forward_traversal_tag, the following must be well-formed:

-
-Incrementable i, j;
-++i;         // pre-increment
-i == j;      // operator equal
-
-

If iterator_category is convertible to -bidirectional_iterator_tag or bidirectional_traversal_tag, -the following expression must also be well-formed:

-
---i
-
-

If iterator_category is convertible to -random_access_iterator_tag or random_access_traversal_tag, -the following must must also be valid:

-
-counting_iterator::difference_type n;
-i += n;
-n = i - j;
-i < j;
-
-
-
-

counting_iterator models

-

Specializations of counting_iterator model Readable Lvalue -Iterator. In addition, they model the concepts corresponding to the -iterator tags to which their iterator_category is convertible. -Also, if CategoryOrTraversal is not use_default then -counting_iterator models the concept corresponding to the iterator -tag CategoryOrTraversal. Otherwise, if -numeric_limits<Incrementable>::is_specialized, then -counting_iterator models Random Access Traversal Iterator. -Otherwise, counting_iterator models the same iterator traversal -concepts modeled by Incrementable.

-

counting_iterator<X,C1,D1> is interoperable with -counting_iterator<Y,C2,D2> if and only if X is -interoperable with Y.

-
-
-

counting_iterator operations

-

In addition to the operations required by the concepts modeled by -counting_iterator, counting_iterator provides the following -operations.

-

counting_iterator();

- --- - - - - - -
Requires:Incrementable is Default Constructible.
Effects:Default construct the member m_inc.
-

counting_iterator(counting_iterator const& rhs);

- --- - - - -
Effects:Construct member m_inc from rhs.m_inc.
-

explicit counting_iterator(Incrementable x);

- --- - - - -
Effects:Construct member m_inc from x.
-

reference operator*() const;

- --- - - - -
Returns:m_inc
-

counting_iterator& operator++();

- --- - - - - - -
Effects:++m_inc
Returns:*this
-

counting_iterator& operator--();

- --- - - - - - -
Effects:--m_inc
Returns:*this
-

Incrementable const& base() const;

- --- - - - -
Returns:m_inc
-
-template <class Incrementable>
-counting_iterator<Incrementable> make_counting_iterator(Incrementable x);
-
- --- - - - -
Returns:An instance of counting_iterator<Incrementable> -with current constructed from x.
-
-
-

Example

-

This example fills an array with numbers and a second array with -pointers into the first array, using counting_iterator for both -tasks. Finally indirect_iterator is used to print out the numbers -into the first array via indirection through the second array.

-
-int N = 7;
-std::vector<int> numbers;
-typedef std::vector<int>::iterator n_iter;
-std::copy(boost::counting_iterator<int>(0),
-         boost::counting_iterator<int>(N),
-         std::back_inserter(numbers));
-
-std::vector<std::vector<int>::iterator> pointers;
-std::copy(boost::make_counting_iterator(numbers.begin()),
-          boost::make_counting_iterator(numbers.end()),
-          std::back_inserter(pointers));
-
-std::cout << "indirectly printing out the numbers from 0 to " 
-          << N << std::endl;
-std::copy(boost::make_indirect_iterator(pointers.begin()),
-          boost::make_indirect_iterator(pointers.end()),
-          std::ostream_iterator<int>(std::cout, " "));
-std::cout << std::endl;
-
-

The output is:

-
-indirectly printing out the numbers from 0 to 7
-0 1 2 3 4 5 6 
-
-

The source code for this example can be found here.

-
-
- - - - diff --git a/doc/counting_iterator.pdf b/doc/counting_iterator.pdf deleted file mode 100755 index 408d113..0000000 Binary files a/doc/counting_iterator.pdf and /dev/null differ diff --git a/doc/counting_iterator.rst b/doc/counting_iterator.rst deleted file mode 100644 index 191011a..0000000 --- a/doc/counting_iterator.rst +++ /dev/null @@ -1,39 +0,0 @@ -+++++++++++++++++++ - Counting Iterator -+++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: How would you fill up a vector with the numbers zero - through one hundred using ``std::copy()``? The only iterator - operation missing from builtin integer types is an - ``operator*()`` that returns the current value of the integer. - The counting iterator adaptor adds this crucial piece of - functionality to whatever type it wraps. One can use the - counting iterator adaptor not only with integer types, but with - any incrementable type. - - .. include:: counting_iterator_abstract.rst - -.. contents:: Table of Contents - -``counting_iterator`` synopsis -.............................. - -.. include:: counting_iterator_ref.rst -.. include:: make_counting_iterator.rst - -.. include:: counting_iterator_eg.rst - -.. _iterator-category: iterator_facade.html#iterator-category -.. |iterator-category| replace:: *iterator-category* diff --git a/doc/counting_iterator_abstract.rst b/doc/counting_iterator_abstract.rst deleted file mode 100644 index bdb8491..0000000 --- a/doc/counting_iterator_abstract.rst +++ /dev/null @@ -1,4 +0,0 @@ -``counting_iterator`` adapts an object by adding an ``operator*`` that -returns the current value of the object. All other iterator operations -are forwarded to the adapted object. - diff --git a/doc/counting_iterator_eg.rst b/doc/counting_iterator_eg.rst deleted file mode 100644 index 5f6b3b3..0000000 --- a/doc/counting_iterator_eg.rst +++ /dev/null @@ -1,40 +0,0 @@ - -Example -....... - -This example fills an array with numbers and a second array with -pointers into the first array, using ``counting_iterator`` for both -tasks. Finally ``indirect_iterator`` is used to print out the numbers -into the first array via indirection through the second array. - -:: - - int N = 7; - std::vector numbers; - typedef std::vector::iterator n_iter; - std::copy(boost::counting_iterator(0), - boost::counting_iterator(N), - std::back_inserter(numbers)); - - std::vector::iterator> pointers; - std::copy(boost::make_counting_iterator(numbers.begin()), - boost::make_counting_iterator(numbers.end()), - std::back_inserter(pointers)); - - std::cout << "indirectly printing out the numbers from 0 to " - << N << std::endl; - std::copy(boost::make_indirect_iterator(pointers.begin()), - boost::make_indirect_iterator(pointers.end()), - std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - -The output is:: - - indirectly printing out the numbers from 0 to 7 - 0 1 2 3 4 5 6 - -The source code for this example can be found `here`__. - -__ ../example/counting_iterator_example.cpp - diff --git a/doc/counting_iterator_ref.rst b/doc/counting_iterator_ref.rst deleted file mode 100644 index bc94db7..0000000 --- a/doc/counting_iterator_ref.rst +++ /dev/null @@ -1,145 +0,0 @@ -:: - - template < - class Incrementable - , class CategoryOrTraversal = use_default - , class Difference = use_default - > - class counting_iterator - { - public: - typedef Incrementable value_type; - typedef const Incrementable& reference; - typedef const Incrementable* pointer; - typedef /* see below */ difference_type; - typedef /* see below */ iterator_category; - - counting_iterator(); - counting_iterator(counting_iterator const& rhs); - explicit counting_iterator(Incrementable x); - Incrementable const& base() const; - reference operator*() const; - counting_iterator& operator++(); - counting_iterator& operator--(); - private: - Incrementable m_inc; // exposition - }; - - -If the ``Difference`` argument is ``use_default`` then -``difference_type`` is an unspecified signed integral -type. Otherwise ``difference_type`` is ``Difference``. - -``iterator_category`` is determined according to the following -algorithm: - -.. parsed-literal:: - - if (CategoryOrTraversal is not use_default) - return CategoryOrTraversal - else if (numeric_limits::is_specialized) - return |iterator-category|_\ ( - random_access_traversal_tag, Incrementable, const Incrementable&) - else - return |iterator-category|_\ ( - iterator_traversal::type, - Incrementable, const Incrementable&) - -[*Note:* implementers are encouraged to provide an implementation of - ``operator-`` and a ``difference_type`` that avoids overflows in - the cases where ``std::numeric_limits::is_specialized`` - is true.] - -``counting_iterator`` requirements -.................................. - -The ``Incrementable`` argument shall be Copy Constructible and Assignable. - -If ``iterator_category`` is convertible to ``forward_iterator_tag`` -or ``forward_traversal_tag``, the following must be well-formed:: - - Incrementable i, j; - ++i; // pre-increment - i == j; // operator equal - - -If ``iterator_category`` is convertible to -``bidirectional_iterator_tag`` or ``bidirectional_traversal_tag``, -the following expression must also be well-formed:: - - --i - -If ``iterator_category`` is convertible to -``random_access_iterator_tag`` or ``random_access_traversal_tag``, -the following must must also be valid:: - - counting_iterator::difference_type n; - i += n; - n = i - j; - i < j; - -``counting_iterator`` models -............................ - -Specializations of ``counting_iterator`` model Readable Lvalue -Iterator. In addition, they model the concepts corresponding to the -iterator tags to which their ``iterator_category`` is convertible. -Also, if ``CategoryOrTraversal`` is not ``use_default`` then -``counting_iterator`` models the concept corresponding to the iterator -tag ``CategoryOrTraversal``. Otherwise, if -``numeric_limits::is_specialized``, then -``counting_iterator`` models Random Access Traversal Iterator. -Otherwise, ``counting_iterator`` models the same iterator traversal -concepts modeled by ``Incrementable``. - -``counting_iterator`` is interoperable with -``counting_iterator`` if and only if ``X`` is -interoperable with ``Y``. - - - -``counting_iterator`` operations -................................ - -In addition to the operations required by the concepts modeled by -``counting_iterator``, ``counting_iterator`` provides the following -operations. - - -``counting_iterator();`` - -:Requires: ``Incrementable`` is Default Constructible. -:Effects: Default construct the member ``m_inc``. - - -``counting_iterator(counting_iterator const& rhs);`` - -:Effects: Construct member ``m_inc`` from ``rhs.m_inc``. - - - -``explicit counting_iterator(Incrementable x);`` - -:Effects: Construct member ``m_inc`` from ``x``. - - -``reference operator*() const;`` - -:Returns: ``m_inc`` - - -``counting_iterator& operator++();`` - -:Effects: ``++m_inc`` -:Returns: ``*this`` - - -``counting_iterator& operator--();`` - -:Effects: ``--m_inc`` -:Returns: ``*this`` - - -``Incrementable const& base() const;`` - -:Returns: ``m_inc`` diff --git a/doc/default.css b/doc/default.css deleted file mode 100644 index 0e4226a..0000000 --- a/doc/default.css +++ /dev/null @@ -1,224 +0,0 @@ -/* -:Author: David Goodger -:Contact: goodger@users.sourceforge.net -:date: $Date$ -:version: $Revision$ -:copyright: This stylesheet has been placed in the public domain. - -Default cascading style sheet for the HTML output of Docutils. -*/ - -.first { - margin-top: 0 } - -.last { - margin-bottom: 0 } - -a.toc-backref { - text-decoration: none ; - color: black } - -dd { - margin-bottom: 0.5em } - -div.abstract { - margin: 2em 5em } - -div.abstract p.topic-title { - font-weight: bold ; - text-align: center } - -div.attention, div.caution, div.danger, div.error, div.hint, -div.important, div.note, div.tip, div.warning, div.admonition { - margin: 2em ; - border: medium outset ; - padding: 1em } - -div.attention p.admonition-title, div.caution p.admonition-title, -div.danger p.admonition-title, div.error p.admonition-title, -div.warning p.admonition-title { - color: red ; - font-weight: bold ; - font-family: sans-serif } - -div.hint p.admonition-title, div.important p.admonition-title, -div.note p.admonition-title, div.tip p.admonition-title, -div.admonition p.admonition-title { - font-weight: bold ; - font-family: sans-serif } - -div.dedication { - margin: 2em 5em ; - text-align: center ; - font-style: italic } - -div.dedication p.topic-title { - font-weight: bold ; - font-style: normal } - -div.figure { - margin-left: 2em } - -div.footer, div.header { - font-size: smaller } - -div.sidebar { - margin-left: 1em ; - border: medium outset ; - padding: 0em 1em ; - background-color: #ffffee ; - width: 40% ; - float: right ; - clear: right } - -div.sidebar p.rubric { - font-family: sans-serif ; - font-size: medium } - -div.system-messages { - margin: 5em } - -div.system-messages h1 { - color: red } - -div.system-message { - border: medium outset ; - padding: 1em } - -div.system-message p.system-message-title { - color: red ; - font-weight: bold } - -div.topic { - margin: 2em } - -h1.title { - text-align: center } - -h2.subtitle { - text-align: center } - -hr { - width: 75% } - -ol.simple, ul.simple { - margin-bottom: 1em } - -ol.arabic { - list-style: decimal } - -ol.loweralpha { - list-style: lower-alpha } - -ol.upperalpha { - list-style: upper-alpha } - -ol.lowerroman { - list-style: lower-roman } - -ol.upperroman { - list-style: upper-roman } - -p.attribution { - text-align: right ; - margin-left: 50% } - -p.caption { - font-style: italic } - -p.credits { - font-style: italic ; - font-size: smaller } - -p.label { - white-space: nowrap } - -p.rubric { - font-weight: bold ; - font-size: larger ; - color: maroon ; - text-align: center } - -p.sidebar-title { - font-family: sans-serif ; - font-weight: bold ; - font-size: larger } - -p.sidebar-subtitle { - font-family: sans-serif ; - font-weight: bold } - -p.topic-title { - font-weight: bold } - -pre.address { - margin-bottom: 0 ; - margin-top: 0 ; - font-family: serif ; - font-size: 100% } - -pre.line-block { - font-family: serif ; - font-size: 100% } - -pre.literal-block, pre.doctest-block { - margin-left: 2em ; - margin-right: 2em ; - background-color: #eeeeee } - -span.classifier { - font-family: sans-serif ; - font-style: oblique } - -span.classifier-delimiter { - font-family: sans-serif ; - font-weight: bold } - -span.interpreted { - font-family: sans-serif } - -span.option { - white-space: nowrap } - -span.option-argument { - font-style: italic } - -span.pre { - white-space: pre } - -span.problematic { - color: red } - -table { - margin-top: 0.5em ; - margin-bottom: 0.5em } - -table.citation { - border-left: solid thin gray ; - padding-left: 0.5ex } - -table.docinfo { - margin: 2em 4em } - -table.footnote { - border-left: solid thin black ; - padding-left: 0.5ex } - -td, th { - padding-left: 0.5em ; - padding-right: 0.5em ; - vertical-align: top } - -th.docinfo-name, th.field-name { - font-weight: bold ; - text-align: left ; - white-space: nowrap } - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - font-size: 100% } - -tt { - background-color: #eeeeee } - -ul.auto-toc { - list-style-type: none } diff --git a/doc/docutils.sty b/doc/docutils.sty deleted file mode 100755 index a6fce3f..0000000 --- a/doc/docutils.sty +++ /dev/null @@ -1,54 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%% docutils.sty: A style for docutils latex output %%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% -%% o author: Alexander Schmolck (a.schmolck@gmx.net) -%% o created: 2002-07-07 10:50:31+00:40 -%% o last modified: $Date: 2004/01/29 05:55:26 $ -%% o keywords: -%% o license: -%XXX titlesec -%% XXX geometry -\usepackage{graphicx} -\usepackage{latexsym} % extra symbols -\usepackage{url} % !!!: pay attention when using in other commands!!! -\usepackage{verbatim} % normal verbatim has lenght-limit -\usepackage{enumerate} % easy style choice with e.g: ``\begin{enumerate}[Ex i.]`` -\usepackage{hyperref} %href, htarget and hlink XXX: pdfauthor, pdfcreator etc. -\usepackage{xr} %XXX do we need this? -% need this to have ``fboxes`` in ``enviroments``, as well as ``verbatim``s -\usepackage{fancybox} -\usepackage{mdwtab} % better tables and arrays (fixes spacing and adds - % vertical align and multirows (m)) -\usepackage{ltxtable} % long and autoscaling tables (use X for autoscaled - % columns) -\newcommand{\transition}{\vspace{2em}\par\hrule{}\par\vspace{2em}} -\newcommand{\classifier}[1]{(\textit{#1})} -\newenvironment{topic}[1]% -{\begin{Sbox}% - \begin{minipage}{.8\textwidth}% - \protect{\large{\textbf{#1}}}\par\vspace{.5em}}% -{\end{minipage}\end{Sbox}\fbox{\TheSbox}\par\vspace{.5em}} -%XXX shadow box for warnings? -\newenvironment{admonition}[1]% -{\begin{center}% - \begin{Sbox}% - \begin{minipage}{.9\textwidth}% - \protect{\textsc{#1}}\par\vspace{.2em}}% -{\end{minipage}\end{Sbox}\fbox{\TheSbox}\par\vspace{.5em}\end{center}} - -\newenvironment{doctest}% -{\VerbatimEnvironment - \begin{Verbatim}}% -{\end{Verbatim}} -% {% -% \begin{Sbox}% -% \begin{minipage}{.8\textwidth}% -% \protect{\large{\textsc{#1}}\par\vspace{.5em}}}% -% {\end{minipage}\end{Sbox}\fbox{\TheSbox}\par\vspace{.5em}} -%{\end{minipage}\end{Sbox}\fbox{\TheSbox}} - - -%% just a piece of example code -% \newcommand{\vitem}% -% {\SaveVerb[{\item[\UseVerb{\MyTemp}]}]{\MyTemp}} diff --git a/doc/facade-and-adaptor.diff b/doc/facade-and-adaptor.diff deleted file mode 100755 index 07f0e40..0000000 --- a/doc/facade-and-adaptor.diff +++ /dev/null @@ -1,228 +0,0 @@ -Index: 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 ---- facade-and-adaptor.rst 22 Sep 2003 19:55:00 -0000 1.9 -+++ facade-and-adaptor.rst 18 Jan 2004 15:51:06 -0000 1.14 -@@ -3,17 +3,25 @@ None - +++++++++++++++++++++++++++++ - - :Author: David Abrahams, Jeremy Siek, Thomas Witt --:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@acm.org -+:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com - :organization: `Boost Consulting`_, Indiana University `Open Systems -- Lab`_, University of Hanover `Institute for Transport -- Railway Operation and Construction`_ --:date: $Date: 2004/01/18 19:56:39 $ --:Number: N1530=03-0113 -+ Lab`_, `Zephyr Associates, Inc.`_ -+:date: $Date: 2004/01/18 19:56:39 $ -+ -+:Number: This is a revised version of N1530_\ =03-0113, which was -+ accepted for Technical Report 1 by the C++ standard -+ committee's library working group. -+ -+.. Version 1.9 of this ReStructuredText document corresponds to -+ n1530_, the paper accepted by the LWG. -+ -+.. _n1530: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1530.html -+ - :copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved - - .. _`Boost Consulting`: http://www.boost-consulting.com - .. _`Open Systems Lab`: http://www.osl.iu.edu --.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de -+.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - - :abstract: We propose a set of class templates that help programmers - build standard-conforming iterators, both from scratch and -@@ -124,15 +132,15 @@ None - ================= - - This proposal is formulated in terms of the new ``iterator concepts`` --as proposed in `n1477`_, since user-defined and especially adapted -+as proposed in n1550_, since user-defined and especially adapted - iterators suffer from the well known categorization problems that are - inherent to the current iterator categories. - --.. _`n1477`: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1477.html -+.. _n1550: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1550.html - --This proposal does not strictly depend on proposal `n1477`_, as there -+This proposal does not strictly depend on proposal n1550_, as there - is a direct mapping between new and old categories. This proposal --could be reformulated using this mapping if `n1477`_ was not accepted. -+could be reformulated using this mapping if n1550_ was not accepted. - - Interoperability - ================ -@@ -141,24 +149,24 @@ None - current standard. There are currently two defect reports that are - concerned with interoperability issues. - --Issue `179`_ concerns the fact that mutable container iterator types -+Issue 179_ concerns the fact that mutable container iterator types - are only required to be convertible to the corresponding constant - iterator types, but objects of these types are not required to - interoperate in comparison or subtraction expressions. This situation - is tedious in practice and out of line with the way built in types - work. This proposal implements the proposed resolution to issue --`179`_, as most standard library implementations do nowadays. In other -+179_, as most standard library implementations do nowadays. In other - words, if an iterator type A has an implicit or user defined - conversion to an iterator type B, the iterator types are interoperable - and the usual set of operators are available. - --Issue `280`_ concerns the current lack of interoperability between -+Issue 280_ concerns the current lack of interoperability between - reverse iterator types. The proposed new reverse_iterator template - fixes the issues raised in 280. It provides the desired - interoperability without introducing unwanted overloads. - --.. _`179`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#179 --.. _`280`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280 -+.. _179: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#179 -+.. _280: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280 - - - Iterator Facade -@@ -195,7 +203,7 @@ None - * ``filter_iterator``, which provides a view of an iterator range in - which some elements of the underlying range are skipped. - --.. _counting_iterator: -+.. _counting: - - * ``counting_iterator``, which adapts any incrementable type - (e.g. integers, iterators) so that incrementing/decrementing the -@@ -226,15 +234,13 @@ Issue 9.1 et al - :: - - struct use_default; -- const unsigned use_default_access = -1; - - struct iterator_core_access { /* implementation detail */ }; - - template < - class Derived - , class Value -- , unsigned AccessCategory -- , class TraversalCategory -+ , class CategoryOrTraversal - , class Reference = Value& - , class Difference = ptrdiff_t - > -@@ -244,8 +250,7 @@ Issue 9.1 et al. - class Derived - , class Base - , class Value = use_default -- , unsigned Access = use_default_access -- , class Traversal = use_default -+ , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > -@@ -254,10 +259,9 @@ Issue 9.1 et al. - template < - class Iterator - , class Value = use_default -- , unsigned Access = use_default_access -- , class Traversal = use_default -+ , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator; - -Issue 9.44y - -+ template -+ struct pointee; -+ -+ template -+ struct indirect_reference; -+ - template - class reverse_iterator; - -@@ -277,8 +287,7 @@ Issue 9.1 et al. - - template < - class Incrementable -- , unsigned Access = use_default_access -- , class Traversal = use_default -+ , class CategoryOrTraversal = use_default - , class Difference = use_default - > - class counting_iterator -@@ -312,17 +321,35 @@ Issue 9.8 - Specialized adaptors [lib.iterator.special.adaptors] - ==================================================== - --.. The requirements for all of these need to be written *much* more -- formally -DWA -- - --[*Note:* The ``enable_if_convertible::type`` expression used in -+The ``enable_if_convertible::type`` expression used in - this section is for exposition purposes. The converting constructors - for specialized adaptors should be only be in an overload set provided - that an object of type ``X`` is implicitly convertible to an object of --type ``Y``. The ``enable_if_convertible`` approach uses SFINAE to -+type ``Y``. -+The signatures involving ``enable_if_convertible`` should behave -+*as-if* ``enable_if_convertible`` were defined to be:: -+ -+ template enable_if_convertible_impl -+ {}; -+ -+ template <> enable_if_convertible_impl -+ { struct type; }; -+ -+ template -+ struct enable_if_convertible -+ : enable_if_convertible_impl::value> -+ {}; -+ -+If an expression other than the default argument is used to supply -+the value of a function parameter whose type is written in terms -+of ``enable_if_convertible``, the program is ill-formed, no -+diagnostic required. -+ -+[*Note:* The ``enable_if_convertible`` approach uses SFINAE to - take the constructor out of the overload set when the types are not --implicitly convertible.] -+implicitly convertible. -+] - - - Indirect iterator -@@ -330,6 +357,16 @@ Issue 9.44y - - .. include:: indirect_iterator_abstract.rst - -+Class template ``pointee`` -+.................................... -+ -+.. include:: pointee_ref.rst -+ -+Class template ``indirect_reference`` -+..................................... -+ -+.. include:: indirect_reference_ref.rst -+ - Class template ``indirect_iterator`` - .................................... - -@@ -393,8 +430,7 @@ - - - --.. -- LocalWords: Abrahams Siek Witt istream ostream iter MTL strided interoperate -+.. LocalWords: Abrahams Siek Witt istream ostream iter MTL strided interoperate - LocalWords: CRTP metafunctions inlining lvalue JGS incrementable BGL LEDA cv - LocalWords: GraphBase struct ptrdiff UnaryFunction const int typename bool pp - LocalWords: lhs rhs SFINAE markup iff tmp OtherDerived OtherIterator DWA foo diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html deleted file mode 100755 index 0af07bc..0000000 --- a/doc/facade-and-adaptor.html +++ /dev/null @@ -1,2638 +0,0 @@ - - - - - - -Iterator Facade and Adaptor - - - - - - -
-

Iterator Facade and Adaptor

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com
Organization:Boost Consulting, Indiana University Open Systems -Lab, Zephyr Associates, Inc.
Date:2004-11-01
Number:This is a revised version of N1530=03-0113, which was -accepted for Technical Report 1 by the C++ standard -committee's library working group.
- - --- - - - -
copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:We propose a set of class templates that help programmers -build standard-conforming iterators, both from scratch and -by adapting other iterators.
-
-

Table of Contents

- -
-
-

Motivation

-

Iterators play an important role in modern C++ programming. The -iterator is the central abstraction of the algorithms of the Standard -Library, allowing algorithms to be re-used in in a wide variety of -contexts. The C++ Standard Library contains a wide variety of useful -iterators. Every one of the standard containers comes with constant -and mutable iterators [2], and also reverse versions of those -same iterators which traverse the container in the opposite direction. -The Standard also supplies istream_iterator and -ostream_iterator for reading from and writing to streams, -insert_iterator, front_insert_iterator and -back_insert_iterator for inserting elements into containers, and -raw_storage_iterator for initializing raw memory [7].

-

Despite the many iterators supplied by the Standard Library, obvious -and useful iterators are missing, and creating new iterator types is -still a common task for C++ programmers. The literature documents -several of these, for example line_iterator [3] and Constant_iterator -[9]. The iterator abstraction is so powerful that we expect -programmers will always need to invent new iterator types.

-

Although it is easy to create iterators that almost conform to the -standard, the iterator requirements contain subtleties which can make -creating an iterator which actually conforms quite difficult. -Further, the iterator interface is rich, containing many operators -that are technically redundant and tedious to implement. To automate -the repetitive work of constructing iterators, we propose -iterator_facade, an iterator base class template which provides -the rich interface of standard iterators and delegates its -implementation to member functions of the derived class. In addition -to reducing the amount of code necessary to create an iterator, the -iterator_facade also provides compile-time error detection. -Iterator implementation mistakes that often go unnoticed are turned -into compile-time errors because the derived class implementation must -match the expectations of the iterator_facade.

-

A common pattern of iterator construction is the adaptation of one -iterator to form a new one. The functionality of an iterator is -composed of four orthogonal aspects: traversal, indirection, equality -comparison and distance measurement. Adapting an old iterator to -create a new one often saves work because one can reuse one aspect of -functionality while redefining the other. For example, the Standard -provides reverse_iterator, which adapts any Bidirectional Iterator -by inverting its direction of traversal. As with plain iterators, -iterator adaptors defined outside the Standard have become commonplace -in the literature:

-
    -
  • Checked iter[13] adds bounds-checking to an existing iterator.
  • -
  • The iterators of the View Template Library[14], which adapts -containers, are themselves adaptors over the underlying iterators.
  • -
  • Smart iterators [5] adapt an iterator's dereferencing behavior by -applying a function object to the object being referenced and -returning the result.
  • -
  • Custom iterators [4], in which a variety of adaptor types are enumerated.
  • -
  • Compound iterators [1], which access a slice out of a container of containers.
  • -
  • Several iterator adaptors from the MTL [12]. The MTL contains a -strided iterator, where each call to operator++() moves the -iterator ahead by some constant factor, and a scaled iterator, which -multiplies the dereferenced value by some constant.
  • -
- - - - - -
[1]We use the term concept to mean a set of requirements -that a type must satisfy to be used with a particular template -parameter.
- - - - - -
[2]The term mutable iterator refers to iterators over objects that -can be changed by assigning to the dereferenced iterator, while -constant iterator refers to iterators over objects that cannot be -modified.
-

To fulfill the need for constructing adaptors, we propose the -iterator_adaptor class template. Instantiations of -iterator_adaptor serve as a base classes for new iterators, -providing the default behavior of forwarding all operations to the -underlying iterator. The user can selectively replace these features -in the derived iterator class. This proposal also includes a number -of more specialized adaptors, such as the transform_iterator that -applies some user-specified function during the dereference of the -iterator.

-
-
-

Impact on the Standard

-

This proposal is purely an addition to the C++ standard library. -However, note that this proposal relies on the proposal for New -Iterator Concepts.

-
-
-

Design

-
-

Iterator Concepts

-

This proposal is formulated in terms of the new iterator concepts -as proposed in n1550, since user-defined and especially adapted -iterators suffer from the well known categorization problems that are -inherent to the current iterator categories.

-

This proposal does not strictly depend on proposal n1550, as there -is a direct mapping between new and old categories. This proposal -could be reformulated using this mapping if n1550 was not accepted.

-
-
-

Interoperability

-

The question of iterator interoperability is poorly addressed in the -current standard. There are currently two defect reports that are -concerned with interoperability issues.

-

Issue 179 concerns the fact that mutable container iterator types -are only required to be convertible to the corresponding constant -iterator types, but objects of these types are not required to -interoperate in comparison or subtraction expressions. This situation -is tedious in practice and out of line with the way built in types -work. This proposal implements the proposed resolution to issue -179, as most standard library implementations do nowadays. In other -words, if an iterator type A has an implicit or user defined -conversion to an iterator type B, the iterator types are interoperable -and the usual set of operators are available.

-

Issue 280 concerns the current lack of interoperability between -reverse iterator types. The proposed new reverse_iterator template -fixes the issues raised in 280. It provides the desired -interoperability without introducing unwanted overloads.

-
-
-

Iterator Facade

- - -

While the iterator interface is rich, there is a core subset of the -interface that is necessary for all the functionality. We have -identified the following core behaviors for iterators:

-
    -
  • dereferencing
  • -
  • incrementing
  • -
  • decrementing
  • -
  • equality comparison
  • -
  • random-access motion
  • -
  • distance measurement
  • -
-

In addition to the behaviors listed above, the core interface elements -include the associated types exposed through iterator traits: -value_type, reference, difference_type, and -iterator_category.

-

Iterator facade uses the Curiously Recurring Template -Pattern (CRTP) [Cop95] so that the user can specify the behavior -of iterator_facade in a derived class. Former designs used -policy objects to specify the behavior, but that approach was -discarded for several reasons:

-
-
    -
  1. the creation and eventual copying of the policy object may create -overhead that can be avoided with the current approach.
  2. -
  3. The policy object approach does not allow for custom constructors -on the created iterator types, an essential feature if -iterator_facade should be used in other library -implementations.
  4. -
  5. Without the use of CRTP, the standard requirement that an -iterator's operator++ returns the iterator type itself -would mean that all iterators built with the library would -have to be specializations of iterator_facade<...>, rather -than something more descriptive like -indirect_iterator<T*>. Cumbersome type generator -metafunctions would be needed to build new parameterized -iterators, and a separate iterator_adaptor layer would be -impossible.
  6. -
-
-
-

Usage

-

The user of iterator_facade derives his iterator class from a -specialization of iterator_facade and passes the derived -iterator class as iterator_facade's first template parameter. -The order of the other template parameters have been carefully -chosen to take advantage of useful defaults. For example, when -defining a constant lvalue iterator, the user can pass a -const-qualified version of the iterator's value_type as -iterator_facade's Value parameter and omit the -Reference parameter which follows.

-

The derived iterator class must define member functions implementing -the iterator's core behaviors. The following table describes -expressions which are required to be valid depending on the category -of the derived iterator type. These member functions are described -briefly below and in more detail in the iterator facade -requirements.

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionEffects
i.dereference()Access the value referred to
i.equal(j)Compare for equality with j
i.increment()Advance by one position
i.decrement()Retreat by one position
i.advance(n)Advance by n positions
i.distance_to(j)Measure the distance to j
-
- -

In addition to implementing the core interface functions, an iterator -derived from iterator_facade typically defines several -constructors. To model any of the standard iterator concepts, the -iterator must at least have a copy constructor. Also, if the iterator -type X is meant to be automatically interoperate with another -iterator type Y (as with constant and mutable iterators) then -there must be an implicit conversion from X to Y or from Y -to X (but not both), typically implemented as a conversion -constructor. Finally, if the iterator is to model Forward Traversal -Iterator or a more-refined iterator concept, a default constructor is -required.

-
-
-

Iterator Core Access

-

iterator_facade and the operator implementations need to be able -to access the core member functions in the derived class. Making the -core member functions public would expose an implementation detail to -the user. The design used here ensures that implementation details do -not appear in the public interface of the derived iterator type.

-

Preventing direct access to the core member functions has two -advantages. First, there is no possibility for the user to accidently -use a member function of the iterator when a member of the value_type -was intended. This has been an issue with smart pointer -implementations in the past. The second and main advantage is that -library implementers can freely exchange a hand-rolled iterator -implementation for one based on iterator_facade without fear of -breaking code that was accessing the public core member functions -directly.

-

In a naive implementation, keeping the derived class' core member -functions private would require it to grant friendship to -iterator_facade and each of the seven operators. In order to -reduce the burden of limiting access, iterator_core_access is -provided, a class that acts as a gateway to the core member functions -in the derived iterator class. The author of the derived class only -needs to grant friendship to iterator_core_access to make his core -member functions available to the library.

- - -

iterator_core_access will be typically implemented as an empty -class containing only private static member functions which invoke the -iterator core member functions. There is, however, no need to -standardize the gateway protocol. Note that even if -iterator_core_access used public member functions it would not -open a safety loophole, as every core member function preserves the -invariants of the iterator.

-
-
-

operator[]

-

The indexing operator for a generalized iterator presents special -challenges. A random access iterator's operator[] is only -required to return something convertible to its value_type. -Requiring that it return an lvalue would rule out currently-legal -random-access iterators which hold the referenced value in a data -member (e.g. counting_iterator), because *(p+n) is a reference -into the temporary iterator p+n, which is destroyed when -operator[] returns.

-

Writable iterators built with iterator_facade implement the -semantics required by the preferred resolution to issue 299 and -adopted by proposal n1550: the result of p[n] is an object -convertible to the iterator's value_type, and p[n] = x is -equivalent to *(p + n) = x (Note: This result object may be -implemented as a proxy containing a copy of p+n). This approach -will work properly for any random-access iterator regardless of the -other details of its implementation. A user who knows more about -the implementation of her iterator is free to implement an -operator[] that returns an lvalue in the derived iterator -class; it will hide the one supplied by iterator_facade from -clients of her iterator.

-
-
-

operator->

-

The reference type of a readable iterator (and today's input -iterator) need not in fact be a reference, so long as it is -convertible to the iterator's value_type. When the value_type -is a class, however, it must still be possible to access members -through operator->. Therefore, an iterator whose reference -type is not in fact a reference must return a proxy containing a copy -of the referenced value from its operator->.

-

The return types for iterator_facade's operator-> and -operator[] are not explicitly specified. Instead, those types -are described in terms of a set of requirements, which must be -satisfied by the iterator_facade implementation.

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

Iterator Adaptor

- - -

The iterator_adaptor class template adapts some Base [3] -type to create a new iterator. Instantiations of iterator_adaptor -are derived from a corresponding instantiation of iterator_facade -and implement the core behaviors in terms of the Base type. In -essence, iterator_adaptor merely forwards all operations to an -instance of the Base type, which it stores as a member.

- - - - - -
[3]The term "Base" here does not refer to a base class and is -not meant to imply the use of derivation. We have followed the lead -of the standard library, which provides a base() function to access -the underlying iterator object of a reverse_iterator adaptor.
-

The user of iterator_adaptor creates a class derived from an -instantiation of iterator_adaptor and then selectively -redefines some of the core member functions described in the -iterator_facade core requirements table. The Base type need -not meet the full requirements for an iterator; it need only -support the operations used by the core interface functions of -iterator_adaptor that have not been redefined in the user's -derived class.

-

Several of the template parameters of iterator_adaptor default -to use_default. This allows the -user to make use of a default parameter even when she wants to -specify a parameter later in the parameter list. Also, the -defaults for the corresponding associated types are somewhat -complicated, so metaprogramming is required to compute them, and -use_default can help to simplify the implementation. Finally, -the identity of the use_default type is not left unspecified -because specification helps to highlight that the Reference -template parameter may not always be identical to the iterator's -reference type, and will keep users from making mistakes based on -that assumption.

-
-
-

Specialized Adaptors

-

This proposal also contains several examples of specialized adaptors -which were easily implemented using iterator_adaptor:

-
    -
  • indirect_iterator, which iterates over iterators, pointers, -or smart pointers and applies an extra level of dereferencing.
  • -
  • A new reverse_iterator, which inverts the direction of a Base -iterator's motion, while allowing adapted constant and mutable -iterators to interact in the expected ways (unlike those in most -implementations of C++98).
  • -
  • transform_iterator, which applies a user-defined function object -to the underlying values when dereferenced.
  • -
  • filter_iterator, which provides a view of an iterator range in -which some elements of the underlying range are skipped.
  • -
-
    -
  • counting_iterator, which adapts any incrementable type -(e.g. integers, iterators) so that incrementing/decrementing the -adapted iterator and dereferencing it produces successive values of -the Base type.
  • -
  • function_output_iterator, which makes it easier to create custom -output iterators.
  • -
-

Based on examples in the Boost library, users have generated many new -adaptors, among them a permutation adaptor which applies some -permutation to a random access iterator, and a strided adaptor, which -adapts a random access iterator by multiplying its unit of motion by a -constant factor. In addition, the Boost Graph Library (BGL) uses -iterator adaptors to adapt other graph libraries, such as LEDA [10] -and Stanford GraphBase [8], to the BGL interface (which requires C++ -Standard compliant iterators).

-
-
-
-

Proposed Text

-
-

Header <iterator_helper> synopsis [lib.iterator.helper.synopsis]

-
-struct use_default;
-
-struct iterator_core_access { /* implementation detail */ };
-
-template <
-    class Derived
-  , class Value
-  , class CategoryOrTraversal
-  , class Reference  = Value&
-  , class Difference = ptrdiff_t
->
-class iterator_facade;
-
-template <
-    class Derived
-  , class Base
-  , class Value      = use_default
-  , class CategoryOrTraversal  = use_default
-  , class Reference  = use_default
-  , class Difference = use_default
->
-class iterator_adaptor;
-
-template <
-    class Iterator
-  , class Value = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator;
-
-template <class Dereferenceable>
-struct pointee;
-
-template <class Dereferenceable>
-struct indirect_reference;
-
-template <class Iterator>
-class reverse_iterator;
-
-template <
-    class UnaryFunction
-  , class Iterator
-  , class Reference = use_default
-  , class Value = use_default
->
-class transform_iterator;
-
-template <class Predicate, class Iterator>
-class filter_iterator;
-
-template <
-    class Incrementable
-  , class CategoryOrTraversal  = use_default
-  , class Difference = use_default
->
-class counting_iterator;
-
-template <class UnaryFunction>
-class function_output_iterator;
-
-
-
-

Iterator facade [lib.iterator.facade]

-

iterator_facade is a base class template that implements the -interface of standard iterators in terms of a few core functions -and associated types, to be supplied by a derived iterator class.

-
-

Class template iterator_facade

- - -
-template <
-    class Derived
-  , class Value
-  , class CategoryOrTraversal
-  , class Reference  = Value&
-  , class Difference = ptrdiff_t
->
-class iterator_facade {
- public:
-    typedef remove_const<Value>::type value_type;
-    typedef Reference reference;
-    typedef Value* pointer;
-    typedef Difference difference_type;
-    typedef /* see below */ iterator_category;
-
-    reference operator*() const;
-    /* see below */ operator->() const;
-    /* see below */ operator[](difference_type n) const;
-    Derived& operator++();
-    Derived operator++(int);
-    Derived& operator--();
-    Derived operator--(int);
-    Derived& operator+=(difference_type n);
-    Derived& operator-=(difference_type n);
-    Derived operator-(difference_type n) const;
- protected:
-    typedef iterator_facade iterator_facade_;
-};
-
-// Comparison operators
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type // exposition
-operator ==(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator !=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-// Iterator difference
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-/* see below */
-operator-(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-          iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-// Iterator addition
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (iterator_facade<Dr,V,TC,R,D> const&,
-                   typename Derived::difference_type n);
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (typename Derived::difference_type n,
-                   iterator_facade<Dr,V,TC,R,D> const&);
-
-

The iterator_category member of iterator_facade is

-
-iterator-category(CategoryOrTraversal, value_type, reference)
-
-

where iterator-category is defined as follows:

-
-iterator-category(C,R,V) :=
-   if (C is convertible to std::input_iterator_tag
-       || C is convertible to std::output_iterator_tag
-   )
-       return C
-
-   else if (C is not convertible to incrementable_traversal_tag)
-       the program is ill-formed
-
-   else return a type X satisfying the following two constraints:
-
-      1. X is convertible to X1, and not to any more-derived
-         type, where X1 is defined by:
-
-           if (R is a reference type
-               && C is convertible to forward_traversal_tag)
-           {
-               if (C is convertible to random_access_traversal_tag)
-                   X1 = random_access_iterator_tag
-               else if (C is convertible to bidirectional_traversal_tag)
-                   X1 = bidirectional_iterator_tag
-               else
-                   X1 = forward_iterator_tag
-           }
-           else
-           {
-               if (C is convertible to single_pass_traversal_tag
-                   && R is convertible to V)
-                   X1 = input_iterator_tag
-               else
-                   X1 = C
-           }
-
-      2. category-to-traversal(X) is convertible to the most
-         derived traversal tag type to which X is also
-         convertible, and not to any more-derived traversal tag
-         type.
-
-

[Note: the intention is to allow iterator_category to be one of -the five original category tags when convertibility to one of the -traversal tags would add no information]

- - - -

The enable_if_interoperable template used above is for exposition -purposes. The member operators should only be in an overload set -provided the derived types Dr1 and Dr2 are interoperable, -meaning that at least one of the types is convertible to the other. The -enable_if_interoperable approach uses SFINAE to take the operators -out of the overload set when the types are not interoperable. -The operators should behave as-if enable_if_interoperable -were defined to be:

-
-template <bool, typename> enable_if_interoperable_impl
-{};
-
-template <typename T> enable_if_interoperable_impl<true,T>
-{ typedef T type; };
-
-template<typename Dr1, typename Dr2, typename T>
-struct enable_if_interoperable
-  : enable_if_interoperable_impl<
-        is_convertible<Dr1,Dr2>::value || is_convertible<Dr2,Dr1>::value
-      , T
-    >
-{};
-
-
-
-

iterator_facade Requirements

-

The following table describes the typical valid expressions on -iterator_facade's Derived parameter, depending on the -iterator concept(s) it will model. The operations in the first -column must be made accessible to member functions of class -iterator_core_access. In addition, -static_cast<Derived*>(iterator_facade*) shall be well-formed.

-

In the table below, F is iterator_facade<X,V,C,R,D>, a is an -object of type X, b and c are objects of type const X, -n is an object of F::difference_type, y is a constant -object of a single pass iterator type interoperable with X, and z -is a constant object of a random access traversal iterator type -interoperable with X.

-
-

iterator_facade Core Operations

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeAssertion/NoteUsed to implement Iterator -Concept(s)
c.dereference()F::reference Readable Iterator, Writable -Iterator
c.equal(y)convertible to booltrue iff c and y -refer to the same -position.Single Pass Iterator
a.increment()unused Incrementable Iterator
a.decrement()unused Bidirectional Traversal -Iterator
a.advance(n)unused Random Access Traversal -Iterator
c.distance_to(z)convertible to -F::difference_typeequivalent to -distance(c, X(z)).Random Access Traversal -Iterator
-
-
-
-

iterator_facade operations

-

The operations in this section are described in terms of operations on -the core interface of Derived which may be inaccessible -(i.e. private). The implementation should access these operations -through member functions of class iterator_core_access.

-

reference operator*() const;

- --- - - - -
Returns:static_cast<Derived const*>(this)->dereference()
-

operator->() const; (see below)

- --- - - - -
Returns:

If reference is a reference type, an object -of type pointer equal to:

-
-&static_cast<Derived const*>(this)->dereference()
-
-

Otherwise returns an object of unspecified type such that, -(*static_cast<Derived const*>(this))->m is equivalent to (w = **static_cast<Derived const*>(this), -w.m) for some temporary object w of type value_type.

-
-

unspecified operator[](difference_type n) const;

- --- - - - -
Returns:an object convertible to value_type. For constant -objects v of type value_type, and n of type -difference_type, (*this)[n] = v is equivalent to -*(*this + n) = v, and static_cast<value_type -const&>((*this)[n]) is equivalent to -static_cast<value_type const&>(*(*this + n))
-

Derived& operator++();

- --- - - - -
Effects:
-static_cast<Derived*>(this)->increment();
-return *static_cast<Derived*>(this);
-
-
-

Derived operator++(int);

- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-++*this;
-return tmp;
-
-
-

Derived& operator--();

- --- - - - -
Effects:
-static_cast<Derived*>(this)->decrement();
-return *static_cast<Derived*>(this);
-
-
-

Derived operator--(int);

- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
---*this;
-return tmp;
-
-
-

Derived& operator+=(difference_type n);

- --- - - - -
Effects:
-static_cast<Derived*>(this)->advance(n);
-return *static_cast<Derived*>(this);
-
-
-

Derived& operator-=(difference_type n);

- --- - - - -
Effects:
-static_cast<Derived*>(this)->advance(-n);
-return *static_cast<Derived*>(this);
-
-
-

Derived operator-(difference_type n) const;

- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-return tmp -= n;
-
-
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (iterator_facade<Dr,V,TC,R,D> const&,
-                   typename Derived::difference_type n);
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (typename Derived::difference_type n,
-                   iterator_facade<Dr,V,TC,R,D> const&);
-
- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-return tmp += n;
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator ==(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).equal((Dr2 const&)rhs).
-
Otherwise,
-
((Dr2 const&)rhs).equal((Dr1 const&)lhs).
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator !=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
!((Dr1 const&)lhs).equal((Dr2 const&)rhs).
-
Otherwise,
-
!((Dr2 const&)rhs).equal((Dr1 const&)lhs).
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) < 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) > 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) <= 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) >= 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) > 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) < 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) >= 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) <= 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,difference>::type
-operator -(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - - - -
Return Type:

if is_convertible<Dr2,Dr1>::value

-
-
-
then
-
difference shall be -iterator_traits<Dr1>::difference_type.
-
Otherwise
-
difference shall be iterator_traits<Dr2>::difference_type
-
-
-
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
-((Dr1 const&)lhs).distance_to((Dr2 const&)rhs).
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs).
-
-
-
-
-
-

Iterator adaptor [lib.iterator.adaptor]

- - -

Each specialization of the iterator_adaptor class template is derived from -a specialization of iterator_facade. The core interface functions -expected by iterator_facade are implemented in terms of the -iterator_adaptor's Base template parameter. A class derived -from iterator_adaptor typically redefines some of the core -interface functions to adapt the behavior of the Base type. -Whether the derived class models any of the standard iterator concepts -depends on the operations supported by the Base type and which -core interface functions of iterator_facade are redefined in the -Derived class.

-
-

Class template iterator_adaptor

- - -
-template <
-    class Derived
-  , class Base
-  , class Value               = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference           = use_default
-  , class Difference = use_default
->
-class iterator_adaptor 
-  : public iterator_facade<Derived, V', C', R', D'> // see details
-{
-    friend class iterator_core_access;
- public:
-    iterator_adaptor();
-    explicit iterator_adaptor(Base const& iter);
-    typedef Base base_type;
-    Base const& base() const;
- protected:
-    typedef iterator_adaptor iterator_adaptor_;
-    Base const& base_reference() const;
-    Base& base_reference();
- private: // Core iterator interface for iterator_facade.  
-    typename iterator_adaptor::reference dereference() const;
-
-    template <
-    class OtherDerived, class OtherIterator, class V, class C, class R, class D
-    >   
-    bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const;
-
-    void advance(typename iterator_adaptor::difference_type n);
-    void increment();
-    void decrement();
-
-    template <
-        class OtherDerived, class OtherIterator, class V, class C, class R, class D
-    >   
-    typename iterator_adaptor::difference_type distance_to(
-        iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const;
-
- private:
-    Base m_iterator; // exposition only
-};
-
-
-
-

iterator_adaptor requirements

-

static_cast<Derived*>(iterator_adaptor*) shall be well-formed. -The Base argument shall be Assignable and Copy Constructible.

-
-
-

iterator_adaptor base class parameters

-

The V', C', R', and D' parameters of the iterator_facade -used as a base class in the summary of iterator_adaptor -above are defined as follows:

-
-V' = if (Value is use_default)
-          return iterator_traits<Base>::value_type
-      else
-          return Value
-
-C' = if (CategoryOrTraversal is use_default)
-          return iterator_traversal<Base>::type
-      else
-          return CategoryOrTraversal
-
-R' = if (Reference is use_default)
-          if (Value is use_default)
-              return iterator_traits<Base>::reference
-          else
-              return Value&
-      else
-          return Reference
-
-D' = if (Difference is use_default)
-          return iterator_traits<Base>::difference_type
-      else
-          return Difference
-
- - - -
-
-

iterator_adaptor public operations

-

iterator_adaptor();

- --- - - - - - -
Requires:The Base type must be Default Constructible.
Returns:An instance of iterator_adaptor with -m_iterator default constructed.
-

explicit iterator_adaptor(Base const& iter);

- --- - - - -
Returns:An instance of iterator_adaptor with -m_iterator copy constructed from iter.
-

Base const& base() const;

- --- - - - -
Returns:m_iterator
-
-
-

iterator_adaptor protected member functions

-

Base const& base_reference() const;

- --- - - - -
Returns:A const reference to m_iterator.
-

Base& base_reference();

- --- - - - -
Returns:A non-const reference to m_iterator.
-
-
-

iterator_adaptor private member functions

-

typename iterator_adaptor::reference dereference() const;

- --- - - - -
Returns:*m_iterator
-
-template <
-class OtherDerived, class OtherIterator, class V, class C, class R, class D
->   
-bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const;
-
- --- - - - -
Returns:m_iterator == x.base()
-

void advance(typename iterator_adaptor::difference_type n);

- --- - - - -
Effects:m_iterator += n;
-

void increment();

- --- - - - -
Effects:++m_iterator;
-

void decrement();

- --- - - - -
Effects:--m_iterator;
-
-template <
-    class OtherDerived, class OtherIterator, class V, class C, class R, class D
->   
-typename iterator_adaptor::difference_type distance_to(
-    iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const;
-
- --- - - - -
Returns:y.base() - m_iterator
-
-
-
-

Specialized adaptors [lib.iterator.special.adaptors]

-

The enable_if_convertible<X,Y>::type expression used in -this section is for exposition purposes. The converting constructors -for specialized adaptors should be only be in an overload set provided -that an object of type X is implicitly convertible to an object of -type Y. -The signatures involving enable_if_convertible should behave -as-if enable_if_convertible were defined to be:

-
-template <bool> enable_if_convertible_impl
-{};
-
-template <> enable_if_convertible_impl<true>
-{ struct type; };
-
-template<typename From, typename To>
-struct enable_if_convertible
-  : enable_if_convertible_impl<is_convertible<From,To>::value>
-{};
-
-

If an expression other than the default argument is used to supply -the value of a function parameter whose type is written in terms -of enable_if_convertible, the program is ill-formed, no -diagnostic required.

-

[Note: The enable_if_convertible approach uses SFINAE to -take the constructor out of the overload set when the types are not -implicitly convertible. -]

-
-

Indirect iterator

-

indirect_iterator adapts an iterator by applying an -extra dereference inside of operator*(). For example, this -iterator adaptor makes it possible to view a container of pointers -(e.g. list<foo*>) as if it were a container of the pointed-to type -(e.g. list<foo>). indirect_iterator depends on two -auxiliary traits, pointee and indirect_reference, to -provide support for underlying iterators whose value_type is -not an iterator.

-
-

Class template pointee

- - - -
-template <class Dereferenceable>
-struct pointee
-{
-    typedef /* see below */ type;
-};
-
- --- - - - -
Requires:For an object x of type Dereferenceable, *x -is well-formed. If ++x is ill-formed it shall neither be -ambiguous nor shall it violate access control, and -Dereferenceable::element_type shall be an accessible type. -Otherwise iterator_traits<Dereferenceable>::value_type shall -be well formed. [Note: These requirements need not apply to -explicit or partial specializations of pointee]
-

type is determined according to the following algorithm, where -x is an object of type Dereferenceable:

-
-if ( ++x is ill-formed )
-{
-    return ``Dereferenceable::element_type``
-}
-else if (``*x`` is a mutable reference to
-         std::iterator_traits<Dereferenceable>::value_type)
-{
-    return iterator_traits<Dereferenceable>::value_type
-}
-else
-{
-    return iterator_traits<Dereferenceable>::value_type const
-}
-
-
-
-

Class template indirect_reference

- - - -
-template <class Dereferenceable>
-struct indirect_reference
-{
-    typedef /* see below */ type;
-};
-
- --- - - - -
Requires:For an object x of type Dereferenceable, *x -is well-formed. If ++x is ill-formed it shall neither be -ambiguous nor shall it violate access control, and -pointee<Dereferenceable>::type& shall be well-formed. -Otherwise iterator_traits<Dereferenceable>::reference shall -be well formed. [Note: These requirements need not apply to -explicit or partial specializations of indirect_reference]
-

type is determined according to the following algorithm, where -x is an object of type Dereferenceable:

-
-if ( ++x is ill-formed )
-    return ``pointee<Dereferenceable>::type&``
-else
-    std::iterator_traits<Dereferenceable>::reference
-
-
-
-

Class template indirect_iterator

-
-template <
-    class Iterator
-  , class Value = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator
-{
- public:
-    typedef /* see below */ value_type;
-    typedef /* see below */ reference;
-    typedef /* see below */ pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-    indirect_iterator();
-    indirect_iterator(Iterator x);
-
-    template <
-        class Iterator2, class Value2, class Category2
-      , class Reference2, class Difference2
-    >
-    indirect_iterator(
-        indirect_iterator<
-             Iterator2, Value2, Category2, Reference2, Difference2
-        > const& y
-      , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition
-    );
-
-    Iterator const& base() const;
-    reference operator*() const;
-    indirect_iterator& operator++();
-    indirect_iterator& operator--();
-private:
-   Iterator m_iterator; // exposition
-};
-
-

The member types of indirect_iterator are defined according to -the following pseudo-code, where V is -iterator_traits<Iterator>::value_type

-
-if (Value is use_default) then
-    typedef remove_const<pointee<V>::type>::type value_type;
-else
-    typedef remove_const<Value>::type value_type;
-
-if (Reference is use_default) then
-    if (Value is use_default) then
-        typedef indirect_reference<V>::type reference;
-    else
-        typedef Value& reference;
-else
-    typedef Reference reference;
-
-if (Value is use_default) then 
-    typedef pointee<V>::type* pointer;
-else 
-    typedef Value* pointer;
-
-if (Difference is use_default)
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-else
-    typedef Difference difference_type;
-
-if (CategoryOrTraversal is use_default)
-    typedef iterator-category (
-        iterator_traversal<Iterator>::type,``reference``,``value_type``
-    ) iterator_category;
-else
-    typedef iterator-category (
-        CategoryOrTraversal,``reference``,``value_type``
-    ) iterator_category;
-
-
-
-

indirect_iterator requirements

-

The expression *v, where v is an object of -iterator_traits<Iterator>::value_type, shall be valid -expression and convertible to reference. Iterator shall -model the traversal concept indicated by iterator_category. -Value, Reference, and Difference shall be chosen so -that value_type, reference, and difference_type meet -the requirements indicated by iterator_category.

-

[Note: there are further requirements on the -iterator_traits<Iterator>::value_type if the Value -parameter is not use_default, as implied by the algorithm for -deducing the default for the value_type member.]

-
-
-

indirect_iterator models

-

In addition to the concepts indicated by iterator_category -and by iterator_traversal<indirect_iterator>::type, a -specialization of indirect_iterator models the following -concepts, Where v is an object of -iterator_traits<Iterator>::value_type:

-
-
    -
  • Readable Iterator if reference(*v) is convertible to -value_type.
  • -
  • Writable Iterator if reference(*v) = t is a valid -expression (where t is an object of type -indirect_iterator::value_type)
  • -
  • Lvalue Iterator if reference is a reference type.
  • -
-
-

indirect_iterator<X,V1,C1,R1,D1> is interoperable with -indirect_iterator<Y,V2,C2,R2,D2> if and only if X is -interoperable with Y.

-
-
-

indirect_iterator operations

-

In addition to the operations required by the concepts described -above, specializations of indirect_iterator provide the -following operations.

-

indirect_iterator();

- --- - - - - - -
Requires:Iterator must be Default Constructible.
Effects:Constructs an instance of indirect_iterator with -a default-constructed m_iterator.
-

indirect_iterator(Iterator x);

- --- - - - -
Effects:Constructs an instance of indirect_iterator with -m_iterator copy constructed from x.
-
-template <
-    class Iterator2, class Value2, unsigned Access, class Traversal
-  , class Reference2, class Difference2
->
-indirect_iterator(
-    indirect_iterator<
-         Iterator2, Value2, Access, Traversal, Reference2, Difference2
-    > const& y
-  , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition
-);
-
- --- - - - - - -
Requires:Iterator2 is implicitly convertible to Iterator.
Effects:Constructs an instance of indirect_iterator whose -m_iterator subobject is constructed from y.base().
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:**m_iterator
-

indirect_iterator& operator++();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-

indirect_iterator& operator--();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-
-
-
-

Reverse iterator

-

The reverse iterator adaptor iterates through the adapted iterator -range in the opposite direction.

-
-

Class template reverse_iterator

-
-template <class Iterator>
-class reverse_iterator
-{
-public:
-  typedef iterator_traits<Iterator>::value_type value_type;
-  typedef iterator_traits<Iterator>::reference reference;
-  typedef iterator_traits<Iterator>::pointer pointer;
-  typedef iterator_traits<Iterator>::difference_type difference_type;
-  typedef /* see below */ iterator_category;
-
-  reverse_iterator() {}
-  explicit reverse_iterator(Iterator x) ;
-
-  template<class OtherIterator>
-  reverse_iterator(
-      reverse_iterator<OtherIterator> const& r
-    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-  );
-  Iterator const& base() const;
-  reference operator*() const;
-  reverse_iterator& operator++();
-  reverse_iterator& operator--();
-private:
-  Iterator m_iterator; // exposition
-};
-
-

If Iterator models Random Access Traversal Iterator and Readable -Lvalue Iterator, then iterator_category is convertible to -random_access_iterator_tag. Otherwise, if -Iterator models Bidirectional Traversal Iterator and Readable -Lvalue Iterator, then iterator_category is convertible to -bidirectional_iterator_tag. Otherwise, iterator_category is -convertible to input_iterator_tag.

-
-
-

reverse_iterator requirements

-

Iterator must be a model of Bidirectional Traversal Iterator. The -type iterator_traits<Iterator>::reference must be the type of -*i, where i is an object of type Iterator.

-
-
-

reverse_iterator models

-

A specialization of reverse_iterator models the same iterator -traversal and iterator access concepts modeled by its Iterator -argument. In addition, it may model old iterator concepts -specified in the following table:

- ---- - - - - - - - - - - - - - - - - - - - -
If I modelsthen reverse_iterator<I> models
Readable Lvalue Iterator, -Bidirectional Traversal IteratorBidirectional Iterator
Writable Lvalue Iterator, -Bidirectional Traversal IteratorMutable Bidirectional Iterator
Readable Lvalue Iterator, -Random Access Traversal IteratorRandom Access Iterator
Writable Lvalue Iterator, -Random Access Traversal IteratorMutable Random Access Iterator
-

reverse_iterator<X> is interoperable with -reverse_iterator<Y> if and only if X is interoperable with -Y.

-
-
-

reverse_iterator operations

-

In addition to the operations required by the concepts modeled by -reverse_iterator, reverse_iterator provides the following -operations.

-

reverse_iterator();

- --- - - - - - -
Requires:Iterator must be Default Constructible.
Effects:Constructs an instance of reverse_iterator with m_iterator -default constructed.
-

explicit reverse_iterator(Iterator x);

- --- - - - -
Effects:Constructs an instance of reverse_iterator with -m_iterator copy constructed from x.
-
-template<class OtherIterator>
-reverse_iterator(
-    reverse_iterator<OtherIterator> const& r
-  , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-);
-
- --- - - - - - -
Requires:OtherIterator is implicitly convertible to Iterator.
Effects:Constructs instance of reverse_iterator whose -m_iterator subobject is constructed from y.base().
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Effects:
-
-Iterator tmp = m_iterator;
-return *--tmp;
-
-

reverse_iterator& operator++();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-

reverse_iterator& operator--();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-
-
-
-

Transform iterator

-

The transform iterator adapts an iterator by modifying the -operator* to apply a function object to the result of -dereferencing the iterator and returning the result.

-
-

Class template transform_iterator

- -
-template <class UnaryFunction,
-          class Iterator, 
-          class Reference = use_default, 
-          class Value = use_default>
-class transform_iterator
-{
-public:
-  typedef /* see below */ value_type;
-  typedef /* see below */ reference;
-  typedef /* see below */ pointer;
-  typedef iterator_traits<Iterator>::difference_type difference_type;
-  typedef /* see below */ iterator_category;
-
-  transform_iterator();
-  transform_iterator(Iterator const& x, UnaryFunction f);
-
-  template<class F2, class I2, class R2, class V2>
-  transform_iterator(
-        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
-  );
-  UnaryFunction functor() const;
-  Iterator const& base() const;
-  reference operator*() const;
-  transform_iterator& operator++();
-  transform_iterator& operator--();
-private:
-  Iterator m_iterator; // exposition only
-  UnaryFunction m_f;   // exposition only
-};
-
-

If Reference is use_default then the reference member of -transform_iterator is -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type. -Otherwise, reference is Reference.

-

If Value is use_default then the value_type member is -remove_cv<remove_reference<reference> >::type. Otherwise, -value_type is Value.

-

If Iterator models Readable Lvalue Iterator and if Iterator -models Random Access Traversal Iterator, then iterator_category is -convertible to random_access_iterator_tag. Otherwise, if -Iterator models Bidirectional Traversal Iterator, then -iterator_category is convertible to -bidirectional_iterator_tag. Otherwise iterator_category is -convertible to forward_iterator_tag. If Iterator does not -model Readable Lvalue Iterator then iterator_category is -convertible to input_iterator_tag.

-
-
-

transform_iterator requirements

-

The type UnaryFunction must be Assignable, Copy Constructible, and -the expression f(*i) must be valid where f is an object of -type UnaryFunction, i is an object of type Iterator, and -where the type of f(*i) must be -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type.

-

The argument Iterator shall model Readable Iterator.

-
-
-

transform_iterator models

-

The resulting transform_iterator models the most refined of the -following that is also modeled by Iterator.

-
-
    -
  • Writable Lvalue Iterator if transform_iterator::reference is a non-const reference.
  • -
  • Readable Lvalue Iterator if transform_iterator::reference is a const reference.
  • -
  • Readable Iterator otherwise.
  • -
-
-

The transform_iterator models the most refined standard traversal -concept that is modeled by the Iterator argument.

-

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.

- ---- - - - - - - - - - - - - - - - - - - - -
If Iterator modelsthen transform_iterator models
Single Pass IteratorInput Iterator
Forward Traversal IteratorForward Iterator
Bidirectional Traversal IteratorBidirectional Iterator
Random Access Traversal IteratorRandom Access Iterator
-

If transform_iterator models Writable Lvalue Iterator then it is a -mutable iterator (as defined in the old iterator requirements).

-

transform_iterator<F1, X, R1, V1> is interoperable with -transform_iterator<F2, Y, R2, V2> if and only if X is -interoperable with Y.

-
-
-

transform_iterator operations

-

In addition to the operations required by the concepts modeled by -transform_iterator, transform_iterator provides the following -operations.

-

transform_iterator();

- --- - - - -
Returns:An instance of transform_iterator with m_f -and m_iterator default constructed.
-

transform_iterator(Iterator const& x, UnaryFunction f);

- --- - - - -
Returns:An instance of transform_iterator with m_f -initialized to f and m_iterator initialized to x.
-
-template<class F2, class I2, class R2, class V2>
-transform_iterator(
-      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
-);
-
- --- - - - - - -
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.
-

UnaryFunction functor() const;

- --- - - - -
Returns:m_f
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:m_f(*m_iterator)
-

transform_iterator& operator++();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-

transform_iterator& operator--();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-
-
-
-

Filter iterator

-

The filter iterator adaptor creates a view of an iterator range in -which some elements of the range are skipped. A predicate function -object controls which elements are skipped. When the predicate is -applied to an element, if it returns true then the element is -retained and if it returns false then the element is skipped -over. When skipping over elements, it is necessary for the filter -adaptor to know when to stop so as to avoid going past the end of the -underlying range. A filter iterator is therefore constructed with pair -of iterators indicating the range of elements in the unfiltered -sequence to be traversed.

-
-

Class template filter_iterator

- - - - -
-template <class Predicate, class Iterator>
-class filter_iterator
-{
- public:
-    typedef iterator_traits<Iterator>::value_type value_type;
-    typedef iterator_traits<Iterator>::reference reference;
-    typedef iterator_traits<Iterator>::pointer pointer;
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-    typedef /* see below */ iterator_category;
-
-    filter_iterator();
-    filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());
-    filter_iterator(Iterator x, Iterator end = Iterator());
-    template<class OtherIterator>
-    filter_iterator(
-        filter_iterator<Predicate, OtherIterator> const& t
-        , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-        );
-    Predicate predicate() const;
-    Iterator end() const;
-    Iterator const& base() const;
-    reference operator*() const;
-    filter_iterator& operator++();
-private:
-    Predicate m_pred; // exposition only
-    Iterator m_iter;  // exposition only
-    Iterator m_end;   // exposition only
-};
-
-

If Iterator models Readable Lvalue Iterator and Bidirectional Traversal -Iterator then iterator_category is convertible to -std::bidirectional_iterator_tag. -Otherwise, if Iterator models Readable Lvalue Iterator and Forward Traversal -Iterator then iterator_category is convertible to -std::forward_iterator_tag. -Otherwise iterator_category is -convertible to std::input_iterator_tag.

-
-
-

filter_iterator requirements

-

The Iterator argument shall meet the requirements of Readable -Iterator and Single Pass Iterator or it shall meet the requirements of -Input Iterator.

-

The Predicate argument must be Assignable, Copy Constructible, and -the expression p(x) must be valid where p is an object of type -Predicate, x is an object of type -iterator_traits<Iterator>::value_type, and where the type of -p(x) must be convertible to bool.

-
-
-

filter_iterator models

-

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

- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Single Pass IteratorSingle Pass Iterator
Forward Traversal IteratorForward Traversal Iterator
Bidirectional Traversal IteratorBidirectional Traversal Iterator
- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable IteratorReadable Iterator
Writable IteratorWritable Iterator
Lvalue IteratorLvalue Iterator
- ---- - - - - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable Iterator, Single Pass IteratorInput Iterator
Readable Lvalue Iterator, Forward Traversal IteratorForward Iterator
Writable Lvalue Iterator, Forward Traversal IteratorMutable Forward Iterator
Writable Lvalue Iterator, Bidirectional IteratorMutable Bidirectional Iterator
-

filter_iterator<P1, X> is interoperable with filter_iterator<P2, Y> -if and only if X is interoperable with Y.

-
-
-

filter_iterator operations

-

In addition to those operations required by the concepts that -filter_iterator models, filter_iterator provides the following -operations.

-

filter_iterator();

- --- - - - - - -
Requires:Predicate and Iterator must be Default Constructible.
Effects:Constructs a filter_iterator whose``m_pred``, m_iter, and m_end -members are a default constructed.
-

filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());

- --- - - - -
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that f(*m_iter) == true -or else``m_iter == end``. The member m_pred is constructed from -f and m_end from end.
-

filter_iterator(Iterator x, Iterator end = Iterator());

- --- - - - - - -
Requires:Predicate must be Default Constructible and -Predicate is a class type (not a function pointer).
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that m_pred(*m_iter) == true -or else``m_iter == end``. The member m_pred is default constructed.
-
-template <class OtherIterator>
-filter_iterator(
-    filter_iterator<Predicate, OtherIterator> const& t
-    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-    );``
-
- --- - - - - - -
Requires:OtherIterator is implicitly convertible to Iterator.
Effects:Constructs a filter iterator whose members are copied from t.
-

Predicate predicate() const;

- --- - - - -
Returns:m_pred
-

Iterator end() const;

- --- - - - -
Returns:m_end
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:*m_iter
-

filter_iterator& operator++();

- --- - - - - - -
Effects:Increments m_iter and then continues to -increment m_iter until either m_iter == m_end -or m_pred(*m_iter) == true.
Returns:*this
-
-
-
-

Counting iterator

-

counting_iterator adapts an object by adding an operator* that -returns the current value of the object. All other iterator operations -are forwarded to the adapted object.

-
-

Class template counting_iterator

-
-template <
-    class Incrementable
-  , class CategoryOrTraversal = use_default
-  , class Difference = use_default
->
-class counting_iterator
-{
-public:
-    typedef Incrementable value_type;
-    typedef const Incrementable& reference;
-    typedef const Incrementable* pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-    counting_iterator();
-    counting_iterator(counting_iterator const& rhs);
-    explicit counting_iterator(Incrementable x);
-    Incrementable const& base() const;
-    reference operator*() const;
-    counting_iterator& operator++();
-    counting_iterator& operator--();
-private:
-    Incrementable m_inc; // exposition
-};
-
-

If the Difference argument is use_default then -difference_type is an unspecified signed integral -type. Otherwise difference_type is Difference.

-

iterator_category is determined according to the following -algorithm:

-
-if (CategoryOrTraversal is not use_default)
-    return CategoryOrTraversal
-else if (numeric_limits<Incrementable>::is_specialized)
-    return iterator-category(
-        random_access_traversal_tag, Incrementable, const Incrementable&)
-else
-    return iterator-category(
-         iterator_traversal<Incrementable>::type, 
-         Incrementable, const Incrementable&)
-
-
-
[Note: implementers are encouraged to provide an implementation of
-
operator- and a difference_type that avoids overflows in -the cases where std::numeric_limits<Incrementable>::is_specialized -is true.]
-
-
-
-

counting_iterator requirements

-

The Incrementable argument shall be Copy Constructible and Assignable.

-

If iterator_category is convertible to forward_iterator_tag -or forward_traversal_tag, the following must be well-formed:

-
-Incrementable i, j;
-++i;         // pre-increment
-i == j;      // operator equal
-
-

If iterator_category is convertible to -bidirectional_iterator_tag or bidirectional_traversal_tag, -the following expression must also be well-formed:

-
---i
-
-

If iterator_category is convertible to -random_access_iterator_tag or random_access_traversal_tag, -the following must must also be valid:

-
-counting_iterator::difference_type n;
-i += n;
-n = i - j;
-i < j;
-
-
-
-

counting_iterator models

-

Specializations of counting_iterator model Readable Lvalue -Iterator. In addition, they model the concepts corresponding to the -iterator tags to which their iterator_category is convertible. -Also, if CategoryOrTraversal is not use_default then -counting_iterator models the concept corresponding to the iterator -tag CategoryOrTraversal. Otherwise, if -numeric_limits<Incrementable>::is_specialized, then -counting_iterator models Random Access Traversal Iterator. -Otherwise, counting_iterator models the same iterator traversal -concepts modeled by Incrementable.

-

counting_iterator<X,C1,D1> is interoperable with -counting_iterator<Y,C2,D2> if and only if X is -interoperable with Y.

-
-
-

counting_iterator operations

-

In addition to the operations required by the concepts modeled by -counting_iterator, counting_iterator provides the following -operations.

-

counting_iterator();

- --- - - - - - -
Requires:Incrementable is Default Constructible.
Effects:Default construct the member m_inc.
-

counting_iterator(counting_iterator const& rhs);

- --- - - - -
Effects:Construct member m_inc from rhs.m_inc.
-

explicit counting_iterator(Incrementable x);

- --- - - - -
Effects:Construct member m_inc from x.
-

reference operator*() const;

- --- - - - -
Returns:m_inc
-

counting_iterator& operator++();

- --- - - - - - -
Effects:++m_inc
Returns:*this
-

counting_iterator& operator--();

- --- - - - - - -
Effects:--m_inc
Returns:*this
-

Incrementable const& base() const;

- --- - - - -
Returns:m_inc
-
-
-
-

Function output iterator

-

The function output iterator adaptor makes it easier to create custom -output iterators. The adaptor takes a unary function and creates a -model of Output Iterator. Each item assigned to the output iterator is -passed as an argument to the unary function. The motivation for this -iterator is that creating a conforming output iterator is non-trivial, -particularly because the proper implementation usually requires a -proxy object.

-
-

Class template function_output_iterator

-
-template <class UnaryFunction>
-class function_output_iterator {
-public:
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-  explicit function_output_iterator();
-
-  explicit function_output_iterator(const UnaryFunction& f);
-
-  /* see below */ operator*();
-  function_output_iterator& operator++();
-  function_output_iterator& operator++(int);
-private:
-  UnaryFunction m_f;     // exposition only
-};
-
-
-
-

function_output_iterator requirements

-

UnaryFunction must be Assignable and Copy Constructible.

-
-
-

function_output_iterator models

-

function_output_iterator is a model of the Writable and -Incrementable Iterator concepts.

-
-
-

function_output_iterator operations

-

explicit function_output_iterator(const UnaryFunction& f = UnaryFunction());

- --- - - - -
Effects:Constructs an instance of function_output_iterator -with m_f constructed from f.
-

operator*();

- --- - - - -
Returns:An object r of unspecified type such that r = t -is equivalent to m_f(t) for all t.
-

function_output_iterator& operator++();

- --- - - - -
Returns:*this
-

function_output_iterator& operator++(int);

- --- - - - -
Returns:*this
- -
-
-
-
-
- - - - diff --git a/doc/facade-and-adaptor.pdf b/doc/facade-and-adaptor.pdf deleted file mode 100755 index 7bf3472..0000000 Binary files a/doc/facade-and-adaptor.pdf and /dev/null differ diff --git a/doc/facade-and-adaptor.rst b/doc/facade-and-adaptor.rst deleted file mode 100644 index fbaf0f3..0000000 --- a/doc/facade-and-adaptor.rst +++ /dev/null @@ -1,434 +0,0 @@ -+++++++++++++++++++++++++++++ - Iterator Facade and Adaptor -+++++++++++++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, `Zephyr Associates, Inc.`_ -:date: $Date$ - -:Number: This is a revised version of N1530_\ =03-0113, which was - accepted for Technical Report 1 by the C++ standard - committee's library working group. - -.. Version 1.9 of this ReStructuredText document corresponds to - n1530_, the paper accepted by the LWG. - -.. _n1530: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1530.html - -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - -:abstract: We propose a set of class templates that help programmers - build standard-conforming iterators, both from scratch and - by adapting other iterators. - -.. contents:: Table of Contents - -============ - Motivation -============ - -Iterators play an important role in modern C++ programming. The -iterator is the central abstraction of the algorithms of the Standard -Library, allowing algorithms to be re-used in in a wide variety of -contexts. The C++ Standard Library contains a wide variety of useful -iterators. Every one of the standard containers comes with constant -and mutable iterators [#mutable]_, and also reverse versions of those -same iterators which traverse the container in the opposite direction. -The Standard also supplies ``istream_iterator`` and -``ostream_iterator`` for reading from and writing to streams, -``insert_iterator``, ``front_insert_iterator`` and -``back_insert_iterator`` for inserting elements into containers, and -``raw_storage_iterator`` for initializing raw memory [7]. - -Despite the many iterators supplied by the Standard Library, obvious -and useful iterators are missing, and creating new iterator types is -still a common task for C++ programmers. The literature documents -several of these, for example line_iterator [3] and Constant_iterator -[9]. The iterator abstraction is so powerful that we expect -programmers will always need to invent new iterator types. - -Although it is easy to create iterators that *almost* conform to the -standard, the iterator requirements contain subtleties which can make -creating an iterator which *actually* conforms quite difficult. -Further, the iterator interface is rich, containing many operators -that are technically redundant and tedious to implement. To automate -the repetitive work of constructing iterators, we propose -``iterator_facade``, an iterator base class template which provides -the rich interface of standard iterators and delegates its -implementation to member functions of the derived class. In addition -to reducing the amount of code necessary to create an iterator, the -``iterator_facade`` also provides compile-time error detection. -Iterator implementation mistakes that often go unnoticed are turned -into compile-time errors because the derived class implementation must -match the expectations of the ``iterator_facade``. - -A common pattern of iterator construction is the adaptation of one -iterator to form a new one. The functionality of an iterator is -composed of four orthogonal aspects: traversal, indirection, equality -comparison and distance measurement. Adapting an old iterator to -create a new one often saves work because one can reuse one aspect of -functionality while redefining the other. For example, the Standard -provides ``reverse_iterator``, which adapts any Bidirectional Iterator -by inverting its direction of traversal. As with plain iterators, -iterator adaptors defined outside the Standard have become commonplace -in the literature: - -* Checked iter[13] adds bounds-checking to an existing iterator. - -* The iterators of the View Template Library[14], which adapts - containers, are themselves adaptors over the underlying iterators. - -* Smart iterators [5] adapt an iterator's dereferencing behavior by - applying a function object to the object being referenced and - returning the result. - -* Custom iterators [4], in which a variety of adaptor types are enumerated. - -* Compound iterators [1], which access a slice out of a container of containers. - -* Several iterator adaptors from the MTL [12]. The MTL contains a - strided iterator, where each call to ``operator++()`` moves the - iterator ahead by some constant factor, and a scaled iterator, which - multiplies the dereferenced value by some constant. - -.. [#concept] We use the term concept to mean a set of requirements - that a type must satisfy to be used with a particular template - parameter. - -.. [#mutable] The term mutable iterator refers to iterators over objects that - can be changed by assigning to the dereferenced iterator, while - constant iterator refers to iterators over objects that cannot be - modified. - -To fulfill the need for constructing adaptors, we propose the -``iterator_adaptor`` class template. Instantiations of -``iterator_adaptor`` serve as a base classes for new iterators, -providing the default behavior of forwarding all operations to the -underlying iterator. The user can selectively replace these features -in the derived iterator class. This proposal also includes a number -of more specialized adaptors, such as the ``transform_iterator`` that -applies some user-specified function during the dereference of the -iterator. - -======================== - Impact on the Standard -======================== - -This proposal is purely an addition to the C++ standard library. -However, note that this proposal relies on the proposal for New -Iterator Concepts. - -======== - Design -======== - -Iterator Concepts -================= - -This proposal is formulated in terms of the new ``iterator concepts`` -as proposed in n1550_, since user-defined and especially adapted -iterators suffer from the well known categorization problems that are -inherent to the current iterator categories. - -.. _n1550: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1550.html - -This proposal does not strictly depend on proposal n1550_, as there -is a direct mapping between new and old categories. This proposal -could be reformulated using this mapping if n1550_ was not accepted. - -Interoperability -================ - -The question of iterator interoperability is poorly addressed in the -current standard. There are currently two defect reports that are -concerned with interoperability issues. - -Issue 179_ concerns the fact that mutable container iterator types -are only required to be convertible to the corresponding constant -iterator types, but objects of these types are not required to -interoperate in comparison or subtraction expressions. This situation -is tedious in practice and out of line with the way built in types -work. This proposal implements the proposed resolution to issue -179_, as most standard library implementations do nowadays. In other -words, if an iterator type A has an implicit or user defined -conversion to an iterator type B, the iterator types are interoperable -and the usual set of operators are available. - -Issue 280_ concerns the current lack of interoperability between -reverse iterator types. The proposed new reverse_iterator template -fixes the issues raised in 280. It provides the desired -interoperability without introducing unwanted overloads. - -.. _179: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#179 -.. _280: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#280 - - -Iterator Facade -=============== - -.. include:: iterator_facade_body.rst - -Iterator Adaptor -================ - -.. include:: iterator_adaptor_body.rst - -Specialized Adaptors -==================== - -This proposal also contains several examples of specialized adaptors -which were easily implemented using ``iterator_adaptor``: - -* ``indirect_iterator``, which iterates over iterators, pointers, - or smart pointers and applies an extra level of dereferencing. - -* A new ``reverse_iterator``, which inverts the direction of a Base - iterator's motion, while allowing adapted constant and mutable - iterators to interact in the expected ways (unlike those in most - implementations of C++98). - -* ``transform_iterator``, which applies a user-defined function object - to the underlying values when dereferenced. - -* ``filter_iterator``, which provides a view of an iterator range in - which some elements of the underlying range are skipped. - -.. _counting: - -* ``counting_iterator``, which adapts any incrementable type - (e.g. integers, iterators) so that incrementing/decrementing the - adapted iterator and dereferencing it produces successive values of - the Base type. - -* ``function_output_iterator``, which makes it easier to create custom - output iterators. - -Based on examples in the Boost library, users have generated many new -adaptors, among them a permutation adaptor which applies some -permutation to a random access iterator, and a strided adaptor, which -adapts a random access iterator by multiplying its unit of motion by a -constant factor. In addition, the Boost Graph Library (BGL) uses -iterator adaptors to adapt other graph libraries, such as LEDA [10] -and Stanford GraphBase [8], to the BGL interface (which requires C++ -Standard compliant iterators). - -=============== - Proposed Text -=============== - - -Header ```` synopsis [lib.iterator.helper.synopsis] -======================================================================= - - -:: - - struct use_default; - - struct iterator_core_access { /* implementation detail */ }; - - template < - class Derived - , class Value - , class CategoryOrTraversal - , class Reference = Value& - , class Difference = ptrdiff_t - > - class iterator_facade; - - template < - class Derived - , class Base - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class iterator_adaptor; - - template < - class Iterator - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator; - - template - struct pointee; - - template - struct indirect_reference; - - template - class reverse_iterator; - - template < - class UnaryFunction - , class Iterator - , class Reference = use_default - , class Value = use_default - > - class transform_iterator; - - template - class filter_iterator; - - template < - class Incrementable - , class CategoryOrTraversal = use_default - , class Difference = use_default - > - class counting_iterator; - - template - class function_output_iterator; - - - -Iterator facade [lib.iterator.facade] -===================================== - -.. include:: iterator_facade_abstract.rst - -Class template ``iterator_facade`` ----------------------------------- - -.. include:: iterator_facade_ref.rst - -Iterator adaptor [lib.iterator.adaptor] -======================================= - -.. include:: iterator_adaptor_abstract.rst - -Class template ``iterator_adaptor`` ------------------------------------ - -.. include:: iterator_adaptor_ref.rst - - -Specialized adaptors [lib.iterator.special.adaptors] -==================================================== - - -The ``enable_if_convertible::type`` expression used in -this section is for exposition purposes. The converting constructors -for specialized adaptors should be only be in an overload set provided -that an object of type ``X`` is implicitly convertible to an object of -type ``Y``. -The signatures involving ``enable_if_convertible`` should behave -*as-if* ``enable_if_convertible`` were defined to be:: - - template enable_if_convertible_impl - {}; - - template <> enable_if_convertible_impl - { struct type; }; - - template - struct enable_if_convertible - : enable_if_convertible_impl::value> - {}; - -If an expression other than the default argument is used to supply -the value of a function parameter whose type is written in terms -of ``enable_if_convertible``, the program is ill-formed, no -diagnostic required. - -[*Note:* The ``enable_if_convertible`` approach uses SFINAE to -take the constructor out of the overload set when the types are not -implicitly convertible. -] - - -Indirect iterator ------------------ - -.. include:: indirect_iterator_abstract.rst - -Class template ``pointee`` -.................................... - -.. include:: pointee_ref.rst - -Class template ``indirect_reference`` -..................................... - -.. include:: indirect_reference_ref.rst - -Class template ``indirect_iterator`` -.................................... - -.. include:: indirect_iterator_ref.rst - -Reverse iterator ----------------- - -.. include:: reverse_iterator_abstract.rst - -Class template ``reverse_iterator`` -................................... - -.. include:: reverse_iterator_ref.rst - - -Transform iterator ------------------- - -.. include:: transform_iterator_abstract.rst - -Class template ``transform_iterator`` -..................................... - -.. include:: transform_iterator_ref.rst - - -Filter iterator ---------------- - -.. include:: filter_iterator_abstract.rst - - -Class template ``filter_iterator`` -.................................. - -.. include:: filter_iterator_ref.rst - - -Counting iterator ------------------ - -.. include:: counting_iterator_abstract.rst - -Class template ``counting_iterator`` -.................................... - -.. include:: counting_iterator_ref.rst - - -Function output iterator ------------------------- - -.. include:: func_output_iter_abstract.rst - -Class template ``function_output_iterator`` -........................................... - -.. include:: func_output_iter_ref.rst - - - - -.. LocalWords: Abrahams Siek Witt istream ostream iter MTL strided interoperate - LocalWords: CRTP metafunctions inlining lvalue JGS incrementable BGL LEDA cv - LocalWords: GraphBase struct ptrdiff UnaryFunction const int typename bool pp - LocalWords: lhs rhs SFINAE markup iff tmp OtherDerived OtherIterator DWA foo - LocalWords: dereferenceable subobject AdaptableUnaryFunction impl pre ifdef'd - LocalWords: OtherIncrementable Coplien diff --git a/doc/facade_iterator_category.rst b/doc/facade_iterator_category.rst deleted file mode 100755 index 6b60d85..0000000 --- a/doc/facade_iterator_category.rst +++ /dev/null @@ -1,53 +0,0 @@ -.. |iterator-category| replace:: *iterator-category* -.. _iterator-category: - -.. parsed-literal:: - - *iterator-category*\ (C,R,V) := - if (C is convertible to std::input_iterator_tag - || C is convertible to std::output_iterator_tag - ) - return C - - else if (C is not convertible to incrementable_traversal_tag) - *the program is ill-formed* - - else return a type X satisfying the following two constraints: - - 1. X is convertible to X1, and not to any more-derived - type, where X1 is defined by: - - if (R is a reference type - && C is convertible to forward_traversal_tag) - { - if (C is convertible to random_access_traversal_tag) - X1 = random_access_iterator_tag - else if (C is convertible to bidirectional_traversal_tag) - X1 = bidirectional_iterator_tag - else - X1 = forward_iterator_tag - } - else - { - if (C is convertible to single_pass_traversal_tag - && R is convertible to V) - X1 = input_iterator_tag - else - X1 = C - } - - 2. |category-to-traversal|_\ (X) is convertible to the most - derived traversal tag type to which X is also - convertible, and not to any more-derived traversal tag - type. - -.. |category-to-traversal| replace:: *category-to-traversal* -.. _`category-to-traversal`: new-iter-concepts.html#category-to-traversal - -[Note: the intention is to allow ``iterator_category`` to be one of -the five original category tags when convertibility to one of the -traversal tags would add no information] - -.. Copyright David Abrahams 2004. Use, modification and distribution is -.. subject to the Boost Software License, Version 1.0. (See accompanying -.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/doc/filter_iterator.html b/doc/filter_iterator.html deleted file mode 100644 index bba015f..0000000 --- a/doc/filter_iterator.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - -Filter Iterator - - - - - - - -

Filter Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
-
- --- - - - -
abstract:The filter iterator adaptor creates a view of an iterator range in -which some elements of the range are skipped. A predicate function -object controls which elements are skipped. When the predicate is -applied to an element, if it returns true then the element is -retained and if it returns false then the element is skipped -over. When skipping over elements, it is necessary for the filter -adaptor to know when to stop so as to avoid going past the end of the -underlying range. A filter iterator is therefore constructed with pair -of iterators indicating the range of elements in the unfiltered -sequence to be traversed.
- -
-

filter_iterator synopsis

- - - - -
-template <class Predicate, class Iterator>
-class filter_iterator
-{
- public:
-    typedef iterator_traits<Iterator>::value_type value_type;
-    typedef iterator_traits<Iterator>::reference reference;
-    typedef iterator_traits<Iterator>::pointer pointer;
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-    typedef /* see below */ iterator_category;
-
-    filter_iterator();
-    filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());
-    filter_iterator(Iterator x, Iterator end = Iterator());
-    template<class OtherIterator>
-    filter_iterator(
-        filter_iterator<Predicate, OtherIterator> const& t
-        , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-        );
-    Predicate predicate() const;
-    Iterator end() const;
-    Iterator const& base() const;
-    reference operator*() const;
-    filter_iterator& operator++();
-private:
-    Predicate m_pred; // exposition only
-    Iterator m_iter;  // exposition only
-    Iterator m_end;   // exposition only
-};
-
-

If Iterator models Readable Lvalue Iterator and Bidirectional Traversal -Iterator then iterator_category is convertible to -std::bidirectional_iterator_tag. -Otherwise, if Iterator models Readable Lvalue Iterator and Forward Traversal -Iterator then iterator_category is convertible to -std::forward_iterator_tag. -Otherwise iterator_category is -convertible to std::input_iterator_tag.

-
-
-

filter_iterator requirements

-

The Iterator argument shall meet the requirements of Readable -Iterator and Single Pass Iterator or it shall meet the requirements of -Input Iterator.

-

The Predicate argument must be Assignable, Copy Constructible, and -the expression p(x) must be valid where p is an object of type -Predicate, x is an object of type -iterator_traits<Iterator>::value_type, and where the type of -p(x) must be convertible to bool.

-
-
-

filter_iterator models

-

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

- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Single Pass IteratorSingle Pass Iterator
Forward Traversal IteratorForward Traversal Iterator
Bidirectional Traversal IteratorBidirectional Traversal Iterator
- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable IteratorReadable Iterator
Writable IteratorWritable Iterator
Lvalue IteratorLvalue Iterator
- ---- - - - - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable Iterator, Single Pass IteratorInput Iterator
Readable Lvalue Iterator, Forward Traversal IteratorForward Iterator
Writable Lvalue Iterator, Forward Traversal IteratorMutable Forward Iterator
Writable Lvalue Iterator, Bidirectional IteratorMutable Bidirectional Iterator
-

filter_iterator<P1, X> is interoperable with filter_iterator<P2, Y> -if and only if X is interoperable with Y.

-
-
-

filter_iterator operations

-

In addition to those operations required by the concepts that -filter_iterator models, filter_iterator provides the following -operations.

-

filter_iterator();

- --- - - - - - -
Requires:Predicate and Iterator must be Default Constructible.
Effects:Constructs a filter_iterator whose``m_pred``, m_iter, and m_end -members are a default constructed.
-

filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());

- --- - - - -
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that f(*m_iter) == true -or else``m_iter == end``. The member m_pred is constructed from -f and m_end from end.
-

filter_iterator(Iterator x, Iterator end = Iterator());

- --- - - - - - -
Requires:Predicate must be Default Constructible and -Predicate is a class type (not a function pointer).
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that m_pred(*m_iter) == true -or else``m_iter == end``. The member m_pred is default constructed.
-
-template <class OtherIterator>
-filter_iterator(
-    filter_iterator<Predicate, OtherIterator> const& t
-    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-    );``
-
- --- - - - - - -
Requires:OtherIterator is implicitly convertible to Iterator.
Effects:Constructs a filter iterator whose members are copied from t.
-

Predicate predicate() const;

- --- - - - -
Returns:m_pred
-

Iterator end() const;

- --- - - - -
Returns:m_end
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:*m_iter
-

filter_iterator& operator++();

- --- - - - - - -
Effects:Increments m_iter and then continues to -increment m_iter until either m_iter == m_end -or m_pred(*m_iter) == true.
Returns:*this
-
-template <class Predicate, class Iterator>
-filter_iterator<Predicate,Iterator>
-make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());
-
- --- - - - -
Returns:filter_iterator<Predicate,Iterator>(f, x, end)
-
-template <class Predicate, class Iterator>
-filter_iterator<Predicate,Iterator>
-make_filter_iterator(Iterator x, Iterator end = Iterator());
-
- --- - - - -
Returns:filter_iterator<Predicate,Iterator>(x, end)
-
-
-

Example

-

This example uses filter_iterator and then -make_filter_iterator to output only the positive integers from an -array of integers. Then make_filter_iterator is is used to output -the integers greater than -2.

-
-struct is_positive_number {
-  bool operator()(int x) { return 0 < x; }
-};
-
-int main()
-{
-  int numbers_[] = { 0, -1, 4, -3, 5, 8, -2 };
-  const int N = sizeof(numbers_)/sizeof(int);
-
-  typedef int* base_iterator;
-  base_iterator numbers(numbers_);
-
-  // Example using filter_iterator
-  typedef boost::filter_iterator<is_positive_number, base_iterator>
-    FilterIter;
-
-  is_positive_number predicate;
-  FilterIter filter_iter_first(predicate, numbers, numbers + N);
-  FilterIter filter_iter_last(predicate, numbers + N, numbers + N);
-
-  std::copy(filter_iter_first, filter_iter_last, std::ostream_iterator<int>(std::cout, " "));
-  std::cout << std::endl;
-
-  // Example using make_filter_iterator()
-  std::copy(boost::make_filter_iterator<is_positive_number>(numbers, numbers + N),
-            boost::make_filter_iterator<is_positive_number>(numbers + N, numbers + N),
-            std::ostream_iterator<int>(std::cout, " "));
-  std::cout << std::endl;
-
-  // Another example using make_filter_iterator()
-  std::copy(
-      boost::make_filter_iterator(
-          std::bind2nd(std::greater<int>(), -2)
-        , numbers, numbers + N)
-
-    , boost::make_filter_iterator(
-          std::bind2nd(std::greater<int>(), -2)
-        , numbers + N, numbers + N)
-
-    , std::ostream_iterator<int>(std::cout, " ")
-  );
-
-  std::cout << std::endl;
-
-  return boost::exit_success;
-}
-
-

The output is:

-
-4 5 8 
-4 5 8 
-0 -1 4 5 8 
-
-

The source code for this example can be found here.

-
-
- - - - diff --git a/doc/filter_iterator.pdf b/doc/filter_iterator.pdf deleted file mode 100755 index 031ea64..0000000 Binary files a/doc/filter_iterator.pdf and /dev/null differ diff --git a/doc/filter_iterator.rst b/doc/filter_iterator.rst deleted file mode 100644 index 2b1ebc3..0000000 --- a/doc/filter_iterator.rst +++ /dev/null @@ -1,29 +0,0 @@ -+++++++++++++++++ - Filter Iterator -+++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - - .. include:: filter_iterator_abstract.rst - -.. contents:: Table of Contents - -``filter_iterator`` synopsis -............................ - -.. include:: filter_iterator_ref.rst -.. include:: make_filter_iterator.rst - -.. include:: filter_iterator_eg.rst diff --git a/doc/filter_iterator_abstract.rst b/doc/filter_iterator_abstract.rst deleted file mode 100644 index 4695478..0000000 --- a/doc/filter_iterator_abstract.rst +++ /dev/null @@ -1,11 +0,0 @@ -The filter iterator adaptor creates a view of an iterator range in -which some elements of the range are skipped. A predicate function -object controls which elements are skipped. When the predicate is -applied to an element, if it returns ``true`` then the element is -retained and if it returns ``false`` then the element is skipped -over. When skipping over elements, it is necessary for the filter -adaptor to know when to stop so as to avoid going past the end of the -underlying range. A filter iterator is therefore constructed with pair -of iterators indicating the range of elements in the unfiltered -sequence to be traversed. - diff --git a/doc/filter_iterator_eg.rst b/doc/filter_iterator_eg.rst deleted file mode 100644 index 36448fe..0000000 --- a/doc/filter_iterator_eg.rst +++ /dev/null @@ -1,69 +0,0 @@ - -Example -....... - -This example uses ``filter_iterator`` and then -``make_filter_iterator`` to output only the positive integers from an -array of integers. Then ``make_filter_iterator`` is is used to output -the integers greater than ``-2``. - -:: - - struct is_positive_number { - bool operator()(int x) { return 0 < x; } - }; - - int main() - { - int numbers_[] = { 0, -1, 4, -3, 5, 8, -2 }; - const int N = sizeof(numbers_)/sizeof(int); - - typedef int* base_iterator; - base_iterator numbers(numbers_); - - // Example using filter_iterator - typedef boost::filter_iterator - FilterIter; - - is_positive_number predicate; - FilterIter filter_iter_first(predicate, numbers, numbers + N); - FilterIter filter_iter_last(predicate, numbers + N, numbers + N); - - std::copy(filter_iter_first, filter_iter_last, std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - // Example using make_filter_iterator() - std::copy(boost::make_filter_iterator(numbers, numbers + N), - boost::make_filter_iterator(numbers + N, numbers + N), - std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - // Another example using make_filter_iterator() - std::copy( - boost::make_filter_iterator( - std::bind2nd(std::greater(), -2) - , numbers, numbers + N) - - , boost::make_filter_iterator( - std::bind2nd(std::greater(), -2) - , numbers + N, numbers + N) - - , std::ostream_iterator(std::cout, " ") - ); - - std::cout << std::endl; - - return boost::exit_success; - } - - -The output is:: - - 4 5 8 - 4 5 8 - 0 -1 4 5 8 - - -The source code for this example can be found `here`__. - -__ ../example/filter_iterator_example.cpp diff --git a/doc/filter_iterator_ref.html b/doc/filter_iterator_ref.html deleted file mode 100755 index 0ffd956..0000000 --- a/doc/filter_iterator_ref.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - - - -
- - - - -
-template <class Predicate, class Iterator>
-class filter_iterator
-{
- public:
-    typedef iterator_traits<Iterator>::value_type value_type;
-    typedef iterator_traits<Iterator>::reference reference;
-    typedef iterator_traits<Iterator>::pointer pointer;
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-    typedef /* see below */ iterator_category;
-
-    filter_iterator();
-    filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());
-    filter_iterator(Iterator x, Iterator end = Iterator());
-    template<class OtherIterator>
-    filter_iterator(
-        filter_iterator<Predicate, OtherIterator> const& t
-        , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-        );
-    Predicate predicate() const;
-    Iterator end() const;
-    Iterator const& base() const;
-    reference operator*() const;
-    filter_iterator& operator++();
-private:
-    Predicate m_pred; // exposition only
-    Iterator m_iter;  // exposition only
-    Iterator m_end;   // exposition only
-};
-
-

If Iterator models Readable Lvalue Iterator and Bidirectional Traversal -Iterator then iterator_category is convertible to -std::bidirectional_iterator_tag. -Otherwise, if Iterator models Readable Lvalue Iterator and Forward Traversal -Iterator then iterator_category is convertible to -std::forward_iterator_tag. -Otherwise iterator_category is -convertible to std::input_iterator_tag.

-
-

filter_iterator requirements

-

The Iterator argument shall meet the requirements of Readable -Iterator and Single Pass Iterator or it shall meet the requirements of -Input Iterator.

-

The Predicate argument must be Assignable, Copy Constructible, and -the expression p(x) must be valid where p is an object of type -Predicate, x is an object of type -iterator_traits<Iterator>::value_type, and where the type of -p(x) must be convertible to bool.

-
-
-

filter_iterator models

-

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

- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Single Pass IteratorSingle Pass Iterator
Forward Traversal IteratorForward Traversal Iterator
Bidirectional Traversal IteratorBidirectional Traversal Iterator
- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable IteratorReadable Iterator
Writable IteratorWritable Iterator
Lvalue IteratorLvalue Iterator
- ---- - - - - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable Iterator, Single Pass IteratorInput Iterator
Readable Lvalue Iterator, Forward Traversal IteratorForward Iterator
Writable Lvalue Iterator, Forward Traversal IteratorMutable Forward Iterator
Writable Lvalue Iterator, Bidirectional IteratorMutable Bidirectional Iterator
-

filter_iterator<P1, X> is interoperable with filter_iterator<P2, Y> -if and only if X is interoperable with Y.

-
-
-

filter_iterator operations

-

In addition to those operations required by the concepts that -filter_iterator models, filter_iterator provides the following -operations.

-

filter_iterator();

- --- - - - - - -
Requires:Predicate and Iterator must be Default Constructible.
Effects:Constructs a filter_iterator whose``m_pred``, m_iter, and m_end -members are a default constructed.
-

filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());

- --- - - - -
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that f(*m_iter) == true -or else``m_iter == end``. The member m_pred is constructed from -f and m_end from end.
-

filter_iterator(Iterator x, Iterator end = Iterator());

- --- - - - - - -
Requires:Predicate must be Default Constructible and -Predicate is a class type (not a function pointer).
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that m_pred(*m_iter) == true -or else``m_iter == end``. The member m_pred is default constructed.
-
-template <class OtherIterator>
-filter_iterator(
-    filter_iterator<Predicate, OtherIterator> const& t
-    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-    );``
-
- --- - - - - - -
Requires:OtherIterator is implicitly convertible to Iterator.
Effects:Constructs a filter iterator whose members are copied from t.
-

Predicate predicate() const;

- --- - - - -
Returns:m_pred
-

Iterator end() const;

- --- - - - -
Returns:m_end
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:*m_iter
-

filter_iterator& operator++();

- --- - - - - - -
Effects:Increments m_iter and then continues to -increment m_iter until either m_iter == m_end -or m_pred(*m_iter) == true.
Returns:*this
-
-
- - - - diff --git a/doc/filter_iterator_ref.rst b/doc/filter_iterator_ref.rst deleted file mode 100644 index 1759788..0000000 --- a/doc/filter_iterator_ref.rst +++ /dev/null @@ -1,177 +0,0 @@ -.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt -.. 2004. Use, modification and distribution is subject to the Boost -.. Software License, Version 1.0. (See accompanying file -.. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -:: - - template - class filter_iterator - { - public: - typedef iterator_traits::value_type value_type; - typedef iterator_traits::reference reference; - typedef iterator_traits::pointer pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - filter_iterator(); - filter_iterator(Predicate f, Iterator x, Iterator end = Iterator()); - filter_iterator(Iterator x, Iterator end = Iterator()); - template - filter_iterator( - filter_iterator const& t - , typename enable_if_convertible::type* = 0 // exposition - ); - Predicate predicate() const; - Iterator end() const; - Iterator const& base() const; - reference operator*() const; - filter_iterator& operator++(); - private: - Predicate m_pred; // exposition only - Iterator m_iter; // exposition only - Iterator m_end; // exposition only - }; - - -If ``Iterator`` models Readable Lvalue Iterator and Bidirectional Traversal -Iterator then ``iterator_category`` is convertible to -``std::bidirectional_iterator_tag``. -Otherwise, if ``Iterator`` models Readable Lvalue Iterator and Forward Traversal -Iterator then ``iterator_category`` is convertible to -``std::forward_iterator_tag``. -Otherwise ``iterator_category`` is -convertible to ``std::input_iterator_tag``. - - -``filter_iterator`` requirements -................................ - -The ``Iterator`` argument shall meet the requirements of Readable -Iterator and Single Pass Iterator or it shall meet the requirements of -Input Iterator. - -The ``Predicate`` argument must be Assignable, Copy Constructible, and -the expression ``p(x)`` must be valid where ``p`` is an object of type -``Predicate``, ``x`` is an object of type -``iterator_traits::value_type``, and where the type of -``p(x)`` must be convertible to ``bool``. - - -``filter_iterator`` models -.......................... - -The concepts that ``filter_iterator`` models are dependent on which -concepts the ``Iterator`` argument models, as specified in the -following tables. - -+---------------------------------+------------------------------------------+ -|If ``Iterator`` models |then ``filter_iterator`` models | -+=================================+==========================================+ -|Single Pass Iterator |Single Pass Iterator | -+---------------------------------+------------------------------------------+ -|Forward Traversal Iterator |Forward Traversal Iterator | -+---------------------------------+------------------------------------------+ -|Bidirectional Traversal Iterator |Bidirectional Traversal Iterator | -+---------------------------------+------------------------------------------+ - -+--------------------------------+----------------------------------------------+ -| If ``Iterator`` models | then ``filter_iterator`` models | -+================================+==============================================+ -| Readable Iterator | Readable Iterator | -+--------------------------------+----------------------------------------------+ -| Writable Iterator | Writable Iterator | -+--------------------------------+----------------------------------------------+ -| Lvalue Iterator | Lvalue Iterator | -+--------------------------------+----------------------------------------------+ - -+-------------------------------------------------------+---------------------------------+ -|If ``Iterator`` models | then ``filter_iterator`` models | -+=======================================================+=================================+ -|Readable Iterator, Single Pass Iterator | Input Iterator | -+-------------------------------------------------------+---------------------------------+ -|Readable Lvalue Iterator, Forward Traversal Iterator | Forward Iterator | -+-------------------------------------------------------+---------------------------------+ -|Writable Lvalue Iterator, Forward Traversal Iterator | Mutable Forward Iterator | -+-------------------------------------------------------+---------------------------------+ -|Writable Lvalue Iterator, Bidirectional Iterator | Mutable Bidirectional Iterator | -+-------------------------------------------------------+---------------------------------+ - - -``filter_iterator`` is interoperable with ``filter_iterator`` -if and only if ``X`` is interoperable with ``Y``. - - -``filter_iterator`` operations -.............................. - -In addition to those operations required by the concepts that -``filter_iterator`` models, ``filter_iterator`` provides the following -operations. - - -``filter_iterator();`` - -:Requires: ``Predicate`` and ``Iterator`` must be Default Constructible. -:Effects: Constructs a ``filter_iterator`` whose``m_pred``, ``m_iter``, and ``m_end`` - members are a default constructed. - - -``filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());`` - -:Effects: Constructs a ``filter_iterator`` where ``m_iter`` is either - the first position in the range ``[x,end)`` such that ``f(*m_iter) == true`` - or else``m_iter == end``. The member ``m_pred`` is constructed from - ``f`` and ``m_end`` from ``end``. - - - -``filter_iterator(Iterator x, Iterator end = Iterator());`` - -:Requires: ``Predicate`` must be Default Constructible and - ``Predicate`` is a class type (not a function pointer). -:Effects: Constructs a ``filter_iterator`` where ``m_iter`` is either - the first position in the range ``[x,end)`` such that ``m_pred(*m_iter) == true`` - or else``m_iter == end``. The member ``m_pred`` is default constructed. - - -:: - - template - filter_iterator( - filter_iterator const& t - , typename enable_if_convertible::type* = 0 // exposition - );`` - -:Requires: ``OtherIterator`` is implicitly convertible to ``Iterator``. -:Effects: Constructs a filter iterator whose members are copied from ``t``. - - -``Predicate predicate() const;`` - -:Returns: ``m_pred`` - - -``Iterator end() const;`` - -:Returns: ``m_end`` - - -``Iterator const& base() const;`` - -:Returns: ``m_iterator`` - - - -``reference operator*() const;`` - -:Returns: ``*m_iter`` - - -``filter_iterator& operator++();`` - -:Effects: Increments ``m_iter`` and then continues to - increment ``m_iter`` until either ``m_iter == m_end`` - or ``m_pred(*m_iter) == true``. -:Returns: ``*this`` diff --git a/doc/func_output_iter_abstract.rst b/doc/func_output_iter_abstract.rst deleted file mode 100644 index 11fb4f1..0000000 --- a/doc/func_output_iter_abstract.rst +++ /dev/null @@ -1,8 +0,0 @@ -The function output iterator adaptor makes it easier to create custom -output iterators. The adaptor takes a unary function and creates a -model of Output Iterator. Each item assigned to the output iterator is -passed as an argument to the unary function. The motivation for this -iterator is that creating a conforming output iterator is non-trivial, -particularly because the proper implementation usually requires a -proxy object. - diff --git a/doc/func_output_iter_ref.rst b/doc/func_output_iter_ref.rst deleted file mode 100644 index f46a91c..0000000 --- a/doc/func_output_iter_ref.rst +++ /dev/null @@ -1,62 +0,0 @@ -:: - - template - class function_output_iterator { - public: - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - explicit function_output_iterator(); - - explicit function_output_iterator(const UnaryFunction& f); - - /* see below */ operator*(); - function_output_iterator& operator++(); - function_output_iterator& operator++(int); - private: - UnaryFunction m_f; // exposition only - }; - - - -``function_output_iterator`` requirements -......................................... - -``UnaryFunction`` must be Assignable and Copy Constructible. - - - -``function_output_iterator`` models -................................... - -``function_output_iterator`` is a model of the Writable and -Incrementable Iterator concepts. - - - -``function_output_iterator`` operations -....................................... - -``explicit function_output_iterator(const UnaryFunction& f = UnaryFunction());`` - -:Effects: Constructs an instance of ``function_output_iterator`` - with ``m_f`` constructed from ``f``. - - -``operator*();`` - -:Returns: An object ``r`` of unspecified type such that ``r = t`` - is equivalent to ``m_f(t)`` for all ``t``. - - -``function_output_iterator& operator++();`` - -:Returns: ``*this`` - - -``function_output_iterator& operator++(int);`` - -:Returns: ``*this`` diff --git a/doc/function_output_iterator.html b/doc/function_output_iterator.html deleted file mode 100644 index 7c9486d..0000000 --- a/doc/function_output_iterator.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - -Function Output Iterator - - - - - - - -
-

Function Output Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:The function output iterator adaptor makes it easier to create custom -output iterators. The adaptor takes a unary function and creates a -model of Output Iterator. Each item assigned to the output iterator is -passed as an argument to the unary function. The motivation for this -iterator is that creating a conforming output iterator is non-trivial, -particularly because the proper implementation usually requires a -proxy object.
- -
-template <class UnaryFunction>
-class function_output_iterator {
-public:
-  typedef std::output_iterator_tag iterator_category;
-  typedef void                     value_type;
-  typedef void                     difference_type;
-  typedef void                     pointer;
-  typedef void                     reference;
-
-  explicit function_output_iterator();
-
-  explicit function_output_iterator(const UnaryFunction& f);
-
-  /* see below */ operator*();
-  function_output_iterator& operator++();
-  function_output_iterator& operator++(int);
-private:
-  UnaryFunction m_f;     // exposition only
-};
-
-
-

function_output_iterator requirements

-

UnaryFunction must be Assignable and Copy Constructible.

-
-
-

function_output_iterator models

-

function_output_iterator is a model of the Writable and -Incrementable Iterator concepts.

-
-
-

function_output_iterator operations

-

explicit function_output_iterator(const UnaryFunction& f = UnaryFunction());

- --- - - - -
Effects:Constructs an instance of function_output_iterator -with m_f constructed from f.
-

operator*();

- --- - - - -
Returns:An object r of unspecified type such that r = t -is equivalent to m_f(t) for all t.
-

function_output_iterator& operator++();

- --- - - - -
Returns:*this
-

function_output_iterator& operator++(int);

- --- - - - -
Returns:*this
-
-
-

Example

-
-struct string_appender
-{
-    string_appender(std::string& s)
-        : m_str(&s)
-    {}
-
-    void operator()(const std::string& x) const
-    {
-        *m_str += x;
-    }
-
-    std::string* m_str;
-};
-
-int main(int, char*[])
-{
-  std::vector<std::string> x;
-  x.push_back("hello");
-  x.push_back(" ");
-  x.push_back("world");
-  x.push_back("!");
-
-  std::string s = "";
-  std::copy(x.begin(), x.end(), 
-            boost::make_function_output_iterator(string_appender(s)));
-
-  std::cout << s << std::endl;
-
-  return 0;
-}
-
-
-
- - - - diff --git a/doc/function_output_iterator.pdf b/doc/function_output_iterator.pdf deleted file mode 100755 index c6538ea..0000000 Binary files a/doc/function_output_iterator.pdf and /dev/null differ diff --git a/doc/function_output_iterator.rst b/doc/function_output_iterator.rst deleted file mode 100644 index a78c950..0000000 --- a/doc/function_output_iterator.rst +++ /dev/null @@ -1,24 +0,0 @@ -++++++++++++++++++++++++++ - Function Output Iterator -++++++++++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - - .. include:: func_output_iter_abstract.rst - -.. contents:: Table of Contents - -.. include:: func_output_iter_ref.rst -.. include:: function_output_iterator_eg.rst \ No newline at end of file diff --git a/doc/function_output_iterator_eg.rst b/doc/function_output_iterator_eg.rst deleted file mode 100644 index eb635df..0000000 --- a/doc/function_output_iterator_eg.rst +++ /dev/null @@ -1,35 +0,0 @@ -Example -....... - -:: - - struct string_appender - { - string_appender(std::string& s) - : m_str(&s) - {} - - void operator()(const std::string& x) const - { - *m_str += x; - } - - std::string* m_str; - }; - - int main(int, char*[]) - { - std::vector x; - x.push_back("hello"); - x.push_back(" "); - x.push_back("world"); - x.push_back("!"); - - std::string s = ""; - std::copy(x.begin(), x.end(), - boost::make_function_output_iterator(string_appender(s))); - - std::cout << s << std::endl; - - return 0; - } diff --git a/doc/generate.py b/doc/generate.py deleted file mode 100644 index f5d0de8..0000000 --- a/doc/generate.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/python -# Copyright David Abrahams 2004. Use, modification and distribution is -# subject to the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -# -# Generate html, TeX, and PDF versions of all the source files -# -import os -import sys - -from syscmd import syscmd -from sources import sources - -if 0: - for s in sources: - syscmd('boosthtml %s' % s) -else: - extensions = ('html', 'pdf') - - if len(sys.argv) > 1: - extensions = sys.argv[1:] - - all = [ '%s.%s' % (os.path.splitext(s)[0],ext) - for ext in extensions - for s in sources - ] - - print 'make %s' % ' '.join(all) - syscmd('make %s' % ' '.join(all)) - - diff --git a/doc/index.html b/doc/index.html deleted file mode 100755 index 0868477..0000000 --- a/doc/index.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -The Boost.Iterator Library Boost - - - - - - - - diff --git a/doc/index.rst b/doc/index.rst deleted file mode 100755 index 8f3a947..0000000 --- a/doc/index.rst +++ /dev/null @@ -1,319 +0,0 @@ -+++++++++++++++++++++++++++++++++++++++++++++++++ - The Boost.Iterator Library |(logo)|__ -+++++++++++++++++++++++++++++++++++++++++++++++++ - -.. |(logo)| image:: ../../../boost.png - :alt: Boost - -__ ../../../index.htm - - -------------------------------------- - - -:Authors: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com -:organizations: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, `Zephyr Associates, Inc.`_ -:date: $Date$ - -:copyright: Copyright David Abrahams, Jeremy Siek, Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - -:Abstract: The Boost Iterator Library contains two parts. The first - is a system of concepts_ which extend the C++ standard - iterator requirements. The second is a framework of - components for building iterators based on these - extended concepts and includes several useful iterator - adaptors. The extended iterator concepts have been - carefully designed so that old-style iterators - can fit in the new concepts and so that new-style - iterators will be compatible with old-style algorithms, - though algorithms may need to be updated if they want to - take full advantage of the new-style iterator - capabilities. Several components of this library have - been accepted into the C++ standard technical report. - The components of the Boost Iterator Library replace the - older Boost Iterator Adaptor Library. - -.. _concepts: ../../../more/generic_programming.html#concept - -.. contents:: **Table of Contents** - - -------------------------------------- - - -===================== - New-Style Iterators -===================== - -The iterator categories defined in C++98 are extremely limiting -because they bind together two orthogonal concepts: traversal and -element access. For example, because a random access iterator is -required to return a reference (and not a proxy) when dereferenced, -it is impossible to capture the capabilities of -``vector::iterator`` using the C++98 categories. This is the -infamous "``vector`` is not a container, and its iterators -aren't random access iterators", debacle about which Herb Sutter -wrote two papers for the standards comittee (n1185_ and n1211_), -and a `Guru of the Week`__. New-style iterators go well beyond -patching up ``vector``, though: there are lots of other -iterators already in use which can't be adequately represented by -the existing concepts. For details about the new iterator -concepts, see our - -.. _n1185: http://www.gotw.ca/publications/N1185.pdf -.. _n1211: http://www.gotw.ca/publications/N1211.pdf -__ http://www.gotw.ca/gotw/050.htm - - - `Standard Proposal For New-Style Iterators`__ (PDF__) - -__ new-iter-concepts.html -__ new-iter-concepts.pdf - -============================= - Iterator Facade and Adaptor -============================= - -Writing standard-conforming iterators is tricky, but the need comes -up often. In order to ease the implementation of new iterators, -the Boost.Iterator library provides the |facade| class template, -which implements many useful defaults and compile-time checks -designed to help the iterator author ensure that his iterator is -correct. - -It is also common to define a new iterator that is similar to some -underlying iterator or iterator-like type, but that modifies some -aspect of the underlying type's behavior. For that purpose, the -library supplies the |adaptor| class template, which is specially -designed to take advantage of as much of the underlying type's -behavior as possible. - -The documentation for these two classes can be found at the following -web pages: - -* |facade|_ (PDF__) - -* |adaptor|_ (PDF__) - - -.. |facade| replace:: ``iterator_facade`` -.. _facade: iterator_facade.html -__ iterator_facade.pdf - -.. |adaptor| replace:: ``iterator_adaptor`` -.. _adaptor: iterator_adaptor.html -__ iterator_adaptor.pdf - -Both |facade| and |adaptor| as well as many of the `specialized -adaptors`_ mentioned below have been proposed for standardization, -and accepted into the first C++ technical report; see our - - `Standard Proposal For Iterator Facade and Adaptor`__ (PDF__) - -for more details. - -__ facade-and-adaptor.html -__ facade-and-adaptor.pdf - -====================== - Specialized Adaptors -====================== - -The iterator library supplies a useful suite of standard-conforming -iterator templates based on the Boost `iterator facade and adaptor`_. - -* |counting|_ (PDF__): an iterator over a sequence of consecutive values. - Implements a "lazy sequence" - -* |filter|_ (PDF__): an iterator over the subset of elements of some - sequence which satisfy a given predicate - -* |function|_ (PDF__): an output iterator wrapping a unary function - object; each time an element is written into the dereferenced - iterator, it is passed as a parameter to the function object. - -* |indirect|_ (PDF__): an iterator over the objects *pointed-to* by the - elements of some sequence. - -* |permutation|_ (PDF__): an iterator over the elements of some random-access - sequence, rearranged according to some sequence of integer indices. - -* |reverse|_ (PDF__): an iterator which traverses the elements of some - bidirectional sequence in reverse. Corrects many of the - shortcomings of C++98's ``std::reverse_iterator``. - -* |shared|_: an iterator over elements of a container whose - lifetime is maintained by a |shared_ptr|_ stored in the iterator. - -* |transform|_ (PDF__): an iterator over elements which are the result of - applying some functional transformation to the elements of an - underlying sequence. This component also replaces the old - ``projection_iterator_adaptor``. - -* |zip|_ (PDF__): an iterator over tuples of the elements at corresponding - positions of heterogeneous underlying iterators. - -.. |counting| replace:: ``counting_iterator`` -.. _counting: counting_iterator.html -__ counting_iterator.pdf - -.. |filter| replace:: ``filter_iterator`` -.. _filter: filter_iterator.html -__ filter_iterator.pdf - -.. |function| replace:: ``function_output_iterator`` -.. _function: function_output_iterator.html -__ function_output_iterator.pdf - -.. |indirect| replace:: ``indirect_iterator`` -.. _indirect: indirect_iterator.html -__ indirect_iterator.pdf - -.. |permutation| replace:: ``permutation_iterator`` -.. _permutation: permutation_iterator.html -__ permutation_iterator.pdf - -.. |reverse| replace:: ``reverse_iterator`` -.. _reverse: reverse_iterator.html -__ reverse_iterator.pdf - -.. |shared| replace:: ``shared_container_iterator`` -.. _shared: ../../utility/shared_container_iterator.html - -.. |transform| replace:: ``transform_iterator`` -.. _transform: transform_iterator.html -__ transform_iterator.pdf - -.. |zip| replace:: ``zip_iterator`` -.. _zip: zip_iterator.html -__ zip_iterator.pdf - -.. |shared_ptr| replace:: ``shared_ptr`` -.. _shared_ptr: ../../smart_ptr/shared_ptr.htm - -==================== - Iterator Utilities -==================== - -Traits ------- - -* |pointee|_ (PDF__): Provides the capability to deduce the referent types - of pointers, smart pointers and iterators in generic code. Used - in |indirect|. - -* |iterator_traits|_ (PDF__): Provides MPL_\ -compatible metafunctions which - retrieve an iterator's traits. Also corrects for the deficiencies - of broken implementations of ``std::iterator_traits``. - -.. * |interoperable|_ (PDF__): Provides an MPL_\ -compatible metafunction for - testing iterator interoperability - -.. |pointee| replace:: ``pointee.hpp`` -.. _pointee: pointee.html -__ pointee.pdf - -.. |iterator_traits| replace:: ``iterator_traits.hpp`` -.. _iterator_traits: iterator_traits.html -__ iterator_traits.pdf - -.. |interoperable| replace:: ``interoperable.hpp`` -.. _interoperable: interoperable.html -.. comment! __ interoperable.pdf - -.. _MPL: ../../mpl/doc/index.html - -Testing and Concept Checking ----------------------------- - -* |iterator_concepts|_ (PDF__): Concept checking classes for the new iterator concepts. - -* |iterator_archetypes|_ (PDF__): Concept archetype classes for the new iterators concepts. - -.. |iterator_concepts| replace:: ``iterator_concepts.hpp`` -.. _iterator_concepts: iterator_concepts.html -__ iterator_concepts.pdf - -.. |iterator_archetypes| replace:: ``iterator_archetypes.hpp`` -.. _iterator_archetypes: iterator_archetypes.html -__ iterator_archetypes.pdf - -======================================================= - Upgrading from the old Boost Iterator Adaptor Library -======================================================= - -.. _Upgrading: - -If you have been using the old Boost Iterator Adaptor library to -implement iterators, you probably wrote a ``Policies`` class which -captures the core operations of your iterator. In the new library -design, you'll move those same core operations into the body of the -iterator class itself. If you were writing a family of iterators, -you probably wrote a `type generator`_ to build the -``iterator_adaptor`` specialization you needed; in the new library -design you don't need a type generator (though may want to keep it -around as a compatibility aid for older code) because, due to the -use of the Curiously Recurring Template Pattern (CRTP) [Cop95]_, -you can now define the iterator class yourself and acquire -functionality through inheritance from ``iterator_facade`` or -``iterator_adaptor``. As a result, you also get much finer control -over how your iterator works: you can add additional constructors, -or even override the iterator functionality provided by the -library. - -.. _`type generator`: ../../../more/generic_programming.html#type_generator - -If you're looking for the old ``projection_iterator`` component, -its functionality has been merged into ``transform_iterator``: as -long as the function object's ``result_type`` (or the ``Reference`` -template argument, if explicitly specified) is a true reference -type, ``transform_iterator`` will behave like -``projection_iterator`` used to. - -========= - History -========= - -In 2000 Dave Abrahams was writing an iterator for a container of -pointers, which would access the pointed-to elements when -dereferenced. Naturally, being a library writer, he decided to -generalize the idea and the Boost Iterator Adaptor library was born. -Dave was inspired by some writings of Andrei Alexandrescu and chose a -policy based design (though he probably didn't capture Andrei's idea -very well - there was only one policy class for all the iterator's -orthogonal properties). Soon Jeremy Siek realized he would need the -library and they worked together to produce a "Boostified" version, -which was reviewed and accepted into the library. They wrote a paper -and made several important revisions of the code. - -Eventually, several shortcomings of the older library began to make -the need for a rewrite apparent. Dave and Jeremy started working -at the Santa Cruz C++ committee meeting in 2002, and had quickly -generated a working prototype. At the urging of Mat Marcus, they -decided to use the GenVoca/CRTP pattern approach, and moved the -policies into the iterator class itself. Thomas Witt expressed -interest and became the voice of strict compile-time checking for -the project, adding uses of the SFINAE technique to eliminate false -converting constructors and operators from the overload set. He -also recognized the need for a separate ``iterator_facade``, and -factored it out of ``iterator_adaptor``. Finally, after a -near-complete rewrite of the prototype, they came up with the -library you see today. - -.. [Cop95] [Coplien, 1995] Coplien, J., Curiously Recurring Template - Patterns, C++ Report, February 1995, pp. 24-27. - -.. - LocalWords: Abrahams Siek Witt const bool Sutter's WG int UL LI href Lvalue - LocalWords: ReadableIterator WritableIterator SwappableIterator cv pre iter - LocalWords: ConstantLvalueIterator MutableLvalueIterator CopyConstructible TR - LocalWords: ForwardTraversalIterator BidirectionalTraversalIterator lvalue - LocalWords: RandomAccessTraversalIterator dereferenceable Incrementable tmp - LocalWords: incrementable xxx min prev inplace png oldeqnew AccessTag struct - LocalWords: TraversalTag typename lvalues DWA Hmm JGS diff --git a/doc/indirect_iterator.html b/doc/indirect_iterator.html deleted file mode 100644 index 9e80b9b..0000000 --- a/doc/indirect_iterator.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - -Indirect Iterator - - - - - - - -
-

Indirect Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:indirect_iterator adapts an iterator by applying an -extra dereference inside of operator*(). For example, this -iterator adaptor makes it possible to view a container of pointers -(e.g. list<foo*>) as if it were a container of the pointed-to type -(e.g. list<foo>). indirect_iterator depends on two -auxiliary traits, pointee and indirect_reference, to -provide support for underlying iterators whose value_type is -not an iterator.
- -
-

indirect_iterator synopsis

-
-template <
-    class Iterator
-  , class Value = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator
-{
- public:
-    typedef /* see below */ value_type;
-    typedef /* see below */ reference;
-    typedef /* see below */ pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-    indirect_iterator();
-    indirect_iterator(Iterator x);
-
-    template <
-        class Iterator2, class Value2, class Category2
-      , class Reference2, class Difference2
-    >
-    indirect_iterator(
-        indirect_iterator<
-             Iterator2, Value2, Category2, Reference2, Difference2
-        > const& y
-      , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition
-    );
-
-    Iterator const& base() const;
-    reference operator*() const;
-    indirect_iterator& operator++();
-    indirect_iterator& operator--();
-private:
-   Iterator m_iterator; // exposition
-};
-
-

The member types of indirect_iterator are defined according to -the following pseudo-code, where V is -iterator_traits<Iterator>::value_type

-
-if (Value is use_default) then
-    typedef remove_const<pointee<V>::type>::type value_type;
-else
-    typedef remove_const<Value>::type value_type;
-
-if (Reference is use_default) then
-    if (Value is use_default) then
-        typedef indirect_reference<V>::type reference;
-    else
-        typedef Value& reference;
-else
-    typedef Reference reference;
-
-if (Value is use_default) then 
-    typedef pointee<V>::type* pointer;
-else 
-    typedef Value* pointer;
-
-if (Difference is use_default)
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-else
-    typedef Difference difference_type;
-
-if (CategoryOrTraversal is use_default)
-    typedef iterator-category (
-        iterator_traversal<Iterator>::type,``reference``,``value_type``
-    ) iterator_category;
-else
-    typedef iterator-category (
-        CategoryOrTraversal,``reference``,``value_type``
-    ) iterator_category;
-
-
-
-

indirect_iterator requirements

-

The expression *v, where v is an object of -iterator_traits<Iterator>::value_type, shall be valid -expression and convertible to reference. Iterator shall -model the traversal concept indicated by iterator_category. -Value, Reference, and Difference shall be chosen so -that value_type, reference, and difference_type meet -the requirements indicated by iterator_category.

-

[Note: there are further requirements on the -iterator_traits<Iterator>::value_type if the Value -parameter is not use_default, as implied by the algorithm for -deducing the default for the value_type member.]

-
-
-

indirect_iterator models

-

In addition to the concepts indicated by iterator_category -and by iterator_traversal<indirect_iterator>::type, a -specialization of indirect_iterator models the following -concepts, Where v is an object of -iterator_traits<Iterator>::value_type:

-
-
    -
  • Readable Iterator if reference(*v) is convertible to -value_type.
  • -
  • Writable Iterator if reference(*v) = t is a valid -expression (where t is an object of type -indirect_iterator::value_type)
  • -
  • Lvalue Iterator if reference is a reference type.
  • -
-
-

indirect_iterator<X,V1,C1,R1,D1> is interoperable with -indirect_iterator<Y,V2,C2,R2,D2> if and only if X is -interoperable with Y.

-
-
-

indirect_iterator operations

-

In addition to the operations required by the concepts described -above, specializations of indirect_iterator provide the -following operations.

-

indirect_iterator();

- --- - - - - - -
Requires:Iterator must be Default Constructible.
Effects:Constructs an instance of indirect_iterator with -a default-constructed m_iterator.
-

indirect_iterator(Iterator x);

- --- - - - -
Effects:Constructs an instance of indirect_iterator with -m_iterator copy constructed from x.
-
-template <
-    class Iterator2, class Value2, unsigned Access, class Traversal
-  , class Reference2, class Difference2
->
-indirect_iterator(
-    indirect_iterator<
-         Iterator2, Value2, Access, Traversal, Reference2, Difference2
-    > const& y
-  , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition
-);
-
- --- - - - - - -
Requires:Iterator2 is implicitly convertible to Iterator.
Effects:Constructs an instance of indirect_iterator whose -m_iterator subobject is constructed from y.base().
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:**m_iterator
-

indirect_iterator& operator++();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-

indirect_iterator& operator--();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-
-
-

Example

-

This example prints an array of characters, using -indirect_iterator to access the array of characters through an -array of pointers. Next indirect_iterator is used with the -transform algorithm to copy the characters (incremented by one) to -another array. A constant indirect iterator is used for the source and -a mutable indirect iterator is used for the destination. The last part -of the example prints the original array of characters, but this time -using the make_indirect_iterator helper function.

-
-char characters[] = "abcdefg";
-const int N = sizeof(characters)/sizeof(char) - 1; // -1 since characters has a null char
-char* pointers_to_chars[N];                        // at the end.
-for (int i = 0; i < N; ++i)
-  pointers_to_chars[i] = &characters[i];
-
-// Example of using indirect_iterator
-
-boost::indirect_iterator<char**, char>
-  indirect_first(pointers_to_chars), indirect_last(pointers_to_chars + N);
-
-std::copy(indirect_first, indirect_last, std::ostream_iterator<char>(std::cout, ","));
-std::cout << std::endl;
-
-
-// Example of making mutable and constant indirect iterators
-
-char mutable_characters[N];
-char* pointers_to_mutable_chars[N];
-for (int j = 0; j < N; ++j)
-  pointers_to_mutable_chars[j] = &mutable_characters[j];
-
-boost::indirect_iterator<char* const*> mutable_indirect_first(pointers_to_mutable_chars),
-  mutable_indirect_last(pointers_to_mutable_chars + N);
-boost::indirect_iterator<char* const*, char const> const_indirect_first(pointers_to_chars),
-  const_indirect_last(pointers_to_chars + N);
-
-std::transform(const_indirect_first, const_indirect_last,
-               mutable_indirect_first, std::bind1st(std::plus<char>(), 1));
-
-std::copy(mutable_indirect_first, mutable_indirect_last,
-          std::ostream_iterator<char>(std::cout, ","));
-std::cout << std::endl;
-
-
-// Example of using make_indirect_iterator()
-
-std::copy(boost::make_indirect_iterator(pointers_to_chars), 
-          boost::make_indirect_iterator(pointers_to_chars + N),
-          std::ostream_iterator<char>(std::cout, ","));
-std::cout << std::endl;
-
-

The output is:

-
-a,b,c,d,e,f,g,
-b,c,d,e,f,g,h,
-a,b,c,d,e,f,g,
-
-

The source code for this example can be found here.

-
-
- - - - diff --git a/doc/indirect_iterator.pdf b/doc/indirect_iterator.pdf deleted file mode 100755 index ca69730..0000000 Binary files a/doc/indirect_iterator.pdf and /dev/null differ diff --git a/doc/indirect_iterator.rst b/doc/indirect_iterator.rst deleted file mode 100644 index c197251..0000000 --- a/doc/indirect_iterator.rst +++ /dev/null @@ -1,30 +0,0 @@ -+++++++++++++++++++ - Indirect Iterator -+++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - - .. include:: indirect_iterator_abstract.rst - -.. contents:: Table of Contents - -``indirect_iterator`` synopsis -.............................. - -.. include:: indirect_iterator_ref.rst -.. include:: indirect_iterator_eg.rst - -.. _iterator-category: iterator_facade.html#iterator-category -.. |iterator-category| replace:: *iterator-category* diff --git a/doc/indirect_iterator_abstract.rst b/doc/indirect_iterator_abstract.rst deleted file mode 100644 index 448b734..0000000 --- a/doc/indirect_iterator_abstract.rst +++ /dev/null @@ -1,11 +0,0 @@ -``indirect_iterator`` adapts an iterator by applying an -*extra* dereference inside of ``operator*()``. For example, this -iterator adaptor makes it possible to view a container of pointers -(e.g. ``list``) as if it were a container of the pointed-to type -(e.g. ``list``). ``indirect_iterator`` depends on two -auxiliary traits, ``pointee`` and ``indirect_reference``, to -provide support for underlying iterators whose ``value_type`` is -not an iterator. - - - diff --git a/doc/indirect_iterator_eg.rst b/doc/indirect_iterator_eg.rst deleted file mode 100644 index 356a2dd..0000000 --- a/doc/indirect_iterator_eg.rst +++ /dev/null @@ -1,69 +0,0 @@ -Example -....... - -This example prints an array of characters, using -``indirect_iterator`` to access the array of characters through an -array of pointers. Next ``indirect_iterator`` is used with the -``transform`` algorithm to copy the characters (incremented by one) to -another array. A constant indirect iterator is used for the source and -a mutable indirect iterator is used for the destination. The last part -of the example prints the original array of characters, but this time -using the ``make_indirect_iterator`` helper function. - - -:: - - char characters[] = "abcdefg"; - const int N = sizeof(characters)/sizeof(char) - 1; // -1 since characters has a null char - char* pointers_to_chars[N]; // at the end. - for (int i = 0; i < N; ++i) - pointers_to_chars[i] = &characters[i]; - - // Example of using indirect_iterator - - boost::indirect_iterator - indirect_first(pointers_to_chars), indirect_last(pointers_to_chars + N); - - std::copy(indirect_first, indirect_last, std::ostream_iterator(std::cout, ",")); - std::cout << std::endl; - - - // Example of making mutable and constant indirect iterators - - char mutable_characters[N]; - char* pointers_to_mutable_chars[N]; - for (int j = 0; j < N; ++j) - pointers_to_mutable_chars[j] = &mutable_characters[j]; - - boost::indirect_iterator mutable_indirect_first(pointers_to_mutable_chars), - mutable_indirect_last(pointers_to_mutable_chars + N); - boost::indirect_iterator const_indirect_first(pointers_to_chars), - const_indirect_last(pointers_to_chars + N); - - std::transform(const_indirect_first, const_indirect_last, - mutable_indirect_first, std::bind1st(std::plus(), 1)); - - std::copy(mutable_indirect_first, mutable_indirect_last, - std::ostream_iterator(std::cout, ",")); - std::cout << std::endl; - - - // Example of using make_indirect_iterator() - - std::copy(boost::make_indirect_iterator(pointers_to_chars), - boost::make_indirect_iterator(pointers_to_chars + N), - std::ostream_iterator(std::cout, ",")); - std::cout << std::endl; - - -The output is:: - - a,b,c,d,e,f,g, - b,c,d,e,f,g,h, - a,b,c,d,e,f,g, - - -The source code for this example can be found `here`__. - -__ ../example/indirect_iterator_example.cpp - diff --git a/doc/indirect_iterator_ref.diff b/doc/indirect_iterator_ref.diff deleted file mode 100644 index 0c1bf5c..0000000 --- a/doc/indirect_iterator_ref.diff +++ /dev/null @@ -1,245 +0,0 @@ -Index: indirect_iterator_ref.rst -=================================================================== -RCS file: /cvsroot/boost/boost/libs/iterator/doc/indirect_iterator_ref.rst,v -retrieving revision 1.2 -retrieving revision 1.21 -diff -w -d -u -b -r1.2 -r1.21 ---- indirect_iterator_ref.rst 22 Sep 2003 19:55:00 -0000 1.2 -+++ indirect_iterator_ref.rst 15 Jan 2004 00:01:33 -0000 1.21 - - - -@@ -3,82 +3,139 @@ - template < - class Iterator - , class Value = use_default - -Issue 9.15 - -- , unsigned Access = use_default_access -- , class Traversal = use_default -+ , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator - -Issue 9.37x - -- : public iterator_adaptor - { -- friend class iterator_core_access; - public: -+ typedef /* see below */ value_type; -+ typedef /* see below */ reference; -+ typedef /* see below */ pointer; -+ typedef /* see below */ difference_type; -+ typedef /* see below */ iterator_category; -+ - indirect_iterator(); - indirect_iterator(Iterator x); -+ - -Issue 9.15 - - template < -- class Iterator2, class Value2, unsigned Access2, class Traversal2 -+ class Iterator2, class Value2, class Category2 - , class Reference2, class Difference2 - > - indirect_iterator( - indirect_iterator< -- Iterator2, Value2, Access2, Traversal2, Reference2, Difference2 -+ Iterator2, Value2, Category2, Reference2, Difference2 - > const& y - , typename enable_if_convertible::type* = 0 // exposition - ); - -Issue 9.37x - -- private: // as-if specification -- typename indirect_iterator::reference dereference() const -- { -- return **this->base(); -- } -+ -+ Iterator const& base() const; -+ reference operator*() const; -+ indirect_iterator& operator++(); -+ indirect_iterator& operator--(); -+ private: -+ Iterator m_iterator; // exposition - }; - -+ -+The member types of ``indirect_iterator`` are defined according to -+the following pseudo-code, where ``V`` is -+``iterator_traits::value_type`` -+ -+.. parsed-literal:: -+ -+ if (Value is use_default) then -+ typedef remove_const::type>::type value_type; -+ else -+ typedef remove_const::type value_type; -+ -+ if (Reference is use_default) then -+ if (Value is use_default) then -+ typedef indirect_reference::type reference; -+ else -+ typedef Value& reference; -+ else -+ typedef Reference reference; -+ -+ if (Value is use_default) then -+ typedef pointee::type\* pointer; -+ else -+ typedef Value\* pointer; -+ -+ if (Difference is use_default) -+ typedef iterator_traits::difference_type difference_type; -+ else -+ typedef Difference difference_type; -+ -+ if (CategoryOrTraversal is use_default) -+ typedef |iterator-category|_\ ( -+ iterator_traversal::type,``reference``,``value_type`` -+ ) iterator_category; -+ else -+ typedef |iterator-category|_\ ( -+ CategoryOrTraversal,``reference``,``value_type`` -+ ) iterator_category; -+ -+ - - ``indirect_iterator`` requirements - .................................. - -Issue 9.40x - --The ``value_type`` of the ``Iterator`` template parameter should --itself be dereferenceable. The return type of the ``operator*`` for --the ``value_type`` must be the same type as the ``Reference`` template --parameter. The ``Value`` template parameter will be the ``value_type`` --for the ``indirect_iterator``, unless ``Value`` is const. If ``Value`` --is ``const X``, then ``value_type`` will be *non-* ``const X``. The --default for ``Value`` is -+The expression ``*v``, where ``v`` is an object of -+``iterator_traits::value_type``, shall be valid -+expression and convertible to ``reference``. ``Iterator`` shall -+model the traversal concept indicated by ``iterator_category``. -+``Value``, ``Reference``, and ``Difference`` shall be chosen so -+that ``value_type``, ``reference``, and ``difference_type`` meet -+the requirements indicated by ``iterator_category``. - --:: -+[Note: there are further requirements on the -+``iterator_traits::value_type`` if the ``Value`` -+parameter is not ``use_default``, as implied by the algorithm for -+deducing the default for the ``value_type`` member.] - -- iterator_traits< iterator_traits::value_type >::value_type - -Issue 9.37x - -+``indirect_iterator`` models -+............................ - --If the default is used for ``Value``, then there must be a valid --specialization of ``iterator_traits`` for the value type of the base --iterator. -+In addition to the concepts indicated by ``iterator_category`` -+and by ``iterator_traversal::type``, a -+specialization of ``indirect_iterator`` models the following -+concepts, Where ``v`` is an object of -+``iterator_traits::value_type``: - --The ``Reference`` parameter will be the ``reference`` type of the --``indirect_iterator``. The default is ``Value&``. -+ * Readable Iterator if ``reference(*v)`` is convertible to -+ ``value_type``. - --The ``Access`` and ``Traversal`` parameters are passed unchanged to --the corresponding parameters of the ``iterator_adaptor`` base --class, and the ``Iterator`` parameter is passed unchanged as the --``Base`` parameter to the ``iterator_adaptor`` base class. -+ * Writable Iterator if ``reference(*v) = t`` is a valid -+ expression (where ``t`` is an object of type -+ ``indirect_iterator::value_type``) - --The indirect iterator will model the most refined standard traversal --concept that is modeled by the ``Iterator`` type. The indirect --iterator will model the most refined standard access concept that is --modeled by the value type of ``Iterator``. -+ * Lvalue Iterator if ``reference`` is a reference type. -+ -+``indirect_iterator`` is interoperable with -+``indirect_iterator`` if and only if ``X`` is -+interoperable with ``Y``. - - - ``indirect_iterator`` operations - ................................ - -Issue 9.37x - -+In addition to the operations required by the concepts described -+above, specializations of ``indirect_iterator`` provide the -+following operations. -+ -+ - -Issue 9.28 and 9.37x - - ``indirect_iterator();`` - - :Requires: ``Iterator`` must be Default Constructible. - :Returns: An instance of ``indirect_iterator`` with -- a default constructed base object. -+ a default-constructed ``m_iterator``. - - -Issue 9.37x - - ``indirect_iterator(Iterator x);`` - - :Returns: An instance of ``indirect_iterator`` with -- the ``iterator_adaptor`` subobject copy constructed from ``x``. -+ ``m_iterator`` copy constructed from ``x``. - - :: - - -Issue 9.29 - -@@ -94,5 +151,27 @@ - ); - - :Requires: ``Iterator2`` is implicitly convertible to ``Iterator``. --:Returns: An instance of ``indirect_iterator`` that is a copy of ``y``. -+:Returns: An instance of ``indirect_iterator`` whose -+ ``m_iterator`` subobject is constructed from ``y.base()``. -+ - -Issue 9.37x - -+``Iterator const& base() const;`` - -+:Returns: ``m_iterator`` -+ -+ -+``reference operator*() const;`` -+ -+:Returns: ``**m_iterator`` -+ -+ -+``indirect_iterator& operator++();`` -+ -+:Effects: ``++m_iterator`` -+:Returns: ``*this`` -+ -+ -+``indirect_iterator& operator--();`` -+ -+:Effects: ``--m_iterator`` -+:Returns: ``*this`` diff --git a/doc/indirect_iterator_ref.html b/doc/indirect_iterator_ref.html deleted file mode 100755 index d69a8bc..0000000 --- a/doc/indirect_iterator_ref.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - -
-
-template <
-    class Iterator
-  , class Value = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator
-{
- public:
-    typedef /* see below */ value_type;
-    typedef /* see below */ reference;
-    typedef /* see below */ pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-    indirect_iterator();
-    indirect_iterator(Iterator x);
-
-    template <
-        class Iterator2, class Value2, class Category2
-      , class Reference2, class Difference2
-    >
-    indirect_iterator(
-        indirect_iterator<
-             Iterator2, Value2, Category2, Reference2, Difference2
-        > const& y
-      , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition
-    );
-
-    Iterator const& base() const;
-    reference operator*() const;
-    indirect_iterator& operator++();
-    indirect_iterator& operator--();
-private:
-   Iterator m_iterator; // exposition
-};
-
-

The member types of indirect_iterator are defined according to -the following pseudo-code, where V is -iterator_traits<Iterator>::value_type

-
-if (Value is use_default) then
-    typedef remove_const<pointee<V>::type>::type value_type;
-else
-    typedef remove_const<Value>::type value_type;
-
-if (Reference is use_default) then
-    if (Value is use_default) then
-        typedef indirect_reference<V>::type reference;
-    else
-        typedef Value& reference;
-else
-    typedef Reference reference;
-
-if (Value is use_default) then 
-    typedef pointee<V>::type* pointer;
-else 
-    typedef Value* pointer;
-
-if (Difference is use_default)
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-else
-    typedef Difference difference_type;
-
-if (CategoryOrTraversal is use_default)
-    typedef iterator-category (
-        iterator_traversal<Iterator>::type,``reference``,``value_type``
-    ) iterator_category;
-else
-    typedef iterator-category (
-        CategoryOrTraversal,``reference``,``value_type``
-    ) iterator_category;
-
-
-

indirect_iterator requirements

-

The expression *v, where v is an object of -iterator_traits<Iterator>::value_type, shall be valid -expression and convertible to reference. Iterator shall -model the traversal concept indicated by iterator_category. -Value, Reference, and Difference shall be chosen so -that value_type, reference, and difference_type meet -the requirements indicated by iterator_category.

-

[Note: there are further requirements on the -iterator_traits<Iterator>::value_type if the Value -parameter is not use_default, as implied by the algorithm for -deducing the default for the value_type member.]

-
-
-

indirect_iterator models

-

In addition to the concepts indicated by iterator_category -and by iterator_traversal<indirect_iterator>::type, a -specialization of indirect_iterator models the following -concepts, Where v is an object of -iterator_traits<Iterator>::value_type:

-
-
    -
  • Readable Iterator if reference(*v) is convertible to -value_type.
  • -
  • Writable Iterator if reference(*v) = t is a valid -expression (where t is an object of type -indirect_iterator::value_type)
  • -
  • Lvalue Iterator if reference is a reference type.
  • -
-
-

indirect_iterator<X,V1,C1,R1,D1> is interoperable with -indirect_iterator<Y,V2,C2,R2,D2> if and only if X is -interoperable with Y.

-
-
-

indirect_iterator operations

-

In addition to the operations required by the concepts described -above, specializations of indirect_iterator provide the -following operations.

-

indirect_iterator();

- --- - - - - - -
Requires:Iterator must be Default Constructible.
Effects:Constructs an instance of indirect_iterator with -a default-constructed m_iterator.
-

indirect_iterator(Iterator x);

- --- - - - -
Effects:Constructs an instance of indirect_iterator with -m_iterator copy constructed from x.
-
-template <
-    class Iterator2, class Value2, unsigned Access, class Traversal
-  , class Reference2, class Difference2
->
-indirect_iterator(
-    indirect_iterator<
-         Iterator2, Value2, Access, Traversal, Reference2, Difference2
-    > const& y
-  , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition
-);
-
- --- - - - - - -
Requires:Iterator2 is implicitly convertible to Iterator.
Effects:Constructs an instance of indirect_iterator whose -m_iterator subobject is constructed from y.base().
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:**m_iterator
-

indirect_iterator& operator++();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-

indirect_iterator& operator--();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-
-
- - - - diff --git a/doc/indirect_iterator_ref.rst b/doc/indirect_iterator_ref.rst deleted file mode 100644 index 1065659..0000000 --- a/doc/indirect_iterator_ref.rst +++ /dev/null @@ -1,177 +0,0 @@ -:: - - template < - class Iterator - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator - { - public: - typedef /* see below */ value_type; - typedef /* see below */ reference; - typedef /* see below */ pointer; - typedef /* see below */ difference_type; - typedef /* see below */ iterator_category; - - indirect_iterator(); - indirect_iterator(Iterator x); - - template < - class Iterator2, class Value2, class Category2 - , class Reference2, class Difference2 - > - indirect_iterator( - indirect_iterator< - Iterator2, Value2, Category2, Reference2, Difference2 - > const& y - , typename enable_if_convertible::type* = 0 // exposition - ); - - Iterator const& base() const; - reference operator*() const; - indirect_iterator& operator++(); - indirect_iterator& operator--(); - private: - Iterator m_iterator; // exposition - }; - - -The member types of ``indirect_iterator`` are defined according to -the following pseudo-code, where ``V`` is -``iterator_traits::value_type`` - -.. parsed-literal:: - - if (Value is use_default) then - typedef remove_const::type>::type value_type; - else - typedef remove_const::type value_type; - - if (Reference is use_default) then - if (Value is use_default) then - typedef indirect_reference::type reference; - else - typedef Value& reference; - else - typedef Reference reference; - - if (Value is use_default) then - typedef pointee::type\* pointer; - else - typedef Value\* pointer; - - if (Difference is use_default) - typedef iterator_traits::difference_type difference_type; - else - typedef Difference difference_type; - - if (CategoryOrTraversal is use_default) - typedef *iterator-category* ( - iterator_traversal::type,``reference``,``value_type`` - ) iterator_category; - else - typedef *iterator-category* ( - CategoryOrTraversal,``reference``,``value_type`` - ) iterator_category; - - -``indirect_iterator`` requirements -.................................. - -The expression ``*v``, where ``v`` is an object of -``iterator_traits::value_type``, shall be valid -expression and convertible to ``reference``. ``Iterator`` shall -model the traversal concept indicated by ``iterator_category``. -``Value``, ``Reference``, and ``Difference`` shall be chosen so -that ``value_type``, ``reference``, and ``difference_type`` meet -the requirements indicated by ``iterator_category``. - -[Note: there are further requirements on the -``iterator_traits::value_type`` if the ``Value`` -parameter is not ``use_default``, as implied by the algorithm for -deducing the default for the ``value_type`` member.] - -``indirect_iterator`` models -............................ - -In addition to the concepts indicated by ``iterator_category`` -and by ``iterator_traversal::type``, a -specialization of ``indirect_iterator`` models the following -concepts, Where ``v`` is an object of -``iterator_traits::value_type``: - - * Readable Iterator if ``reference(*v)`` is convertible to - ``value_type``. - - * Writable Iterator if ``reference(*v) = t`` is a valid - expression (where ``t`` is an object of type - ``indirect_iterator::value_type``) - - * Lvalue Iterator if ``reference`` is a reference type. - -``indirect_iterator`` is interoperable with -``indirect_iterator`` if and only if ``X`` is -interoperable with ``Y``. - - -``indirect_iterator`` operations -................................ - -In addition to the operations required by the concepts described -above, specializations of ``indirect_iterator`` provide the -following operations. - - -``indirect_iterator();`` - -:Requires: ``Iterator`` must be Default Constructible. -:Effects: Constructs an instance of ``indirect_iterator`` with - a default-constructed ``m_iterator``. - - -``indirect_iterator(Iterator x);`` - -:Effects: Constructs an instance of ``indirect_iterator`` with - ``m_iterator`` copy constructed from ``x``. - -:: - - template < - class Iterator2, class Value2, unsigned Access, class Traversal - , class Reference2, class Difference2 - > - indirect_iterator( - indirect_iterator< - Iterator2, Value2, Access, Traversal, Reference2, Difference2 - > const& y - , typename enable_if_convertible::type* = 0 // exposition - ); - -:Requires: ``Iterator2`` is implicitly convertible to ``Iterator``. -:Effects: Constructs an instance of ``indirect_iterator`` whose - ``m_iterator`` subobject is constructed from ``y.base()``. - - -``Iterator const& base() const;`` - -:Returns: ``m_iterator`` - - -``reference operator*() const;`` - -:Returns: ``**m_iterator`` - - -``indirect_iterator& operator++();`` - -:Effects: ``++m_iterator`` -:Returns: ``*this`` - - -``indirect_iterator& operator--();`` - -:Effects: ``--m_iterator`` -:Returns: ``*this`` diff --git a/doc/indirect_reference_ref.rst b/doc/indirect_reference_ref.rst deleted file mode 100755 index f222d7e..0000000 --- a/doc/indirect_reference_ref.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. Copyright David Abrahams 2004. Use, modification and distribution is -.. subject to the Boost Software License, Version 1.0. (See accompanying -.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -:: - - template - struct indirect_reference - { - typedef /* see below */ type; - }; - -:Requires: For an object ``x`` of type ``Dereferenceable``, ``*x`` - is well-formed. If ``++x`` is ill-formed it shall neither be - ambiguous nor shall it violate access control, and - ``pointee::type&`` shall be well-formed. - Otherwise ``iterator_traits::reference`` shall - be well formed. [Note: These requirements need not apply to - explicit or partial specializations of ``indirect_reference``] - -``type`` is determined according to the following algorithm, where -``x`` is an object of type ``Dereferenceable``:: - - if ( ++x is ill-formed ) - return ``pointee::type&`` - else - std::iterator_traits::reference - - \ No newline at end of file diff --git a/doc/interoperability-revisited.rst b/doc/interoperability-revisited.rst deleted file mode 100755 index e75a2c6..0000000 --- a/doc/interoperability-revisited.rst +++ /dev/null @@ -1,232 +0,0 @@ -++++++++++++++++++++++++++++ - Interoperability Revisited -++++++++++++++++++++++++++++ - -:date: $Date$ -:copyright: Copyright Thomas Witt 2004. - - -Problem -======= - -The current iterator_facade specification makes it unneccessarily tedious to -implement interoperable iterators. - -In the following text a simplified example of the current iterator_facade specification is used to -illustrate the problem. - -In the current specification binary operators are implemented in the following way: - -template -struct Facade -{ -}; - -template -struct is_interoperable : - or_< - is_convertible - , is_convertible - > -{}; - -template< - class Derived1 - , class Derived2 -> -enable_if, bool> operator==( - Derived1 const& lhs - , Derived2 const& rhs -) -{ - return static_cast(lhs).equal_to(static_cast -{ - bool equal_to(Mutable const&); -}; - -struct Constant : Facade -{ - Constant(); - Constant(Constant const&); - Constant(Mutable const&); - - ... - - bool equal_to(Constant const&); -}; - -Constant c; -Mutable m; - -c == m; // ok, dispatched to Constant::equal_to -m == c; // !! error, dispatched to Mutable::equal_to - -Instead the following "slightly" more complicated implementation is necessary - -struct Mutable : Facade -{ - template - enable_if || is_convertible, bool>::type equal_to(T const&); -}; - -struct Constant : Tag -{ - Constant(); - Constant(Constant const&); - Constant(Mutable const&); - - template - enable_if || is_convertible, bool>::type equal_to(T const&); -}; - -Beside the fact that the code is significantly more complex to understand and to teach there is -a major design problem lurking here. Note that in both types equal_to is a function template with -an unconstrained argument T. This is necessary so that further types can be made interoperable with -Mutable or Constant. Would Mutable be defined as - -struct Mutable : Facade -{ - bool equal_to(Mutable const&); - bool equal_to(Constant const&); -}; - -Constant and Mutable would still be interoperable but no further interoperable could be added -without changing Mutable. Even if this would be considered acceptable the current specification forces -a two way dependency between interoperable types. Note in the templated equal_to case this dependency -is implicitly created when specializing equal_to. - -Solution -======== - -The two way dependency can be avoided by enabling type conversion in the binary operator -implementation. Note that this is the usual way interoperability betwween types is achieved -for binary operators and one reason why binary operators are usually implemented as non-members. - -A simple implementation of this strategy would look like this - -template< - class T1 - , class T2 -> -struct interoperable_base : - if_< - is_convertible< - T2 - , T1 - > - , T1 - , T2> -{}; - - -template< - class Derived1 - , class Derived2 -> -enable_if, bool> operator==( - Derived1 const& lhs - , Derived2 const& rhs -) -{ - typedef interoperable_base< - Derived1 - , Derived2 - >::type Base; - - return static_cast(lhs).equal_to(static_cast -enable_if, bool> operator==( - Derived1 const& lhs - , Derived2 const& rhs -) -{ - return static_cast(lhs).equal_to(static_cast -enable_if, bool> operator==( - Derived1 const& lhs - , Derived2 const& rhs -) -{ - return static_cast(rhs).equal_to(static_cast -{ - Constant(); - Constant(Constant const&); - Constant(Mutable const&); - - ... - - bool equal_to(Constant const&); - bool equal_to(Mutable const&); -}; - -c == m; // ok, dispatched to Constant::equal_to(Mutable const&), no conversion -m == c; // ok, dispatched to Constant::equal_to(Mutable const&), no conversion - -This definition of operator== introduces a possible ambiguity when both types are convertible -to each other. I don't think this is a problem as this behaviour is the same with concrete types. -I.e. - -struct A {}; - -bool operator==(A, A); - -struct B { B(A); }; - -bool operator==(B, B); - -A a; -B b(a); - -a == b; // error, ambiguous overload - -Effect -====== - -Iterator implementations using iterator_facade look exactly as if they were -"hand-implemented" (I am working on better wording). - -a) Less burden for the user - -b) The definition (standardese) of specialized adpters might be easier - (This has to be proved yet) diff --git a/doc/issues.html b/doc/issues.html deleted file mode 100755 index 122a9c3..0000000 --- a/doc/issues.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Problem with is_writable and is_swappable in N1550 - - - -

Problem with is_writable and is_swappable in N1550

-
- --- - - - - - - - - - - - -
Author:David Abrahams and Jeremy Siek
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu
Organization:Boost Consulting, Indiana University Bloomington
date:$Date$
Copyright:Copyright David Abrahams, Jeremy Siek 2003. Use, modification and -distribution is subject to the Boost Software License, -Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -at http://www.boost.org/LICENSE_1_0.txt)
- -
-

Introduction

-

The is_writable and is_swappable traits classes in N1550 -provide a mechanism for determining at compile time if an iterator -type is a model of the new Writable Iterator and Swappable Iterator -concepts, analogous to iterator_traits<X>::iterator_category -for the old iterator concepts. For backward compatibility, -is_writable and is_swappable not only work with new -iterators, but they also are intended to work for old -iterators (iterators that meet the requirements for one of the -iterator concepts in the current standard). In the case of old -iterators, the writability and swapability is deduced based on the -iterator_category and also the reference type. The -specification for this deduction gives false positives for forward -iterators that have non-assignable value types.

-

To review, the part of the is_writable trait definition which -applies to old iterators is:

-
-if (cat is convertible to output_iterator_tag)
-    return true;
-else if (cat is convertible to forward_iterator_tag
-         and iterator_traits<Iterator>::reference is a 
-             mutable reference)
-    return true;
-else
-    return false;
-
-

Suppose the value_type of the iterator It has a private -assignment operator:

-
-class B {
-public:
-  ...
-private:
-  B& operator=(const B&);
-};
-
-

and suppose the reference type of the iterator is B&. In -that case, is_writable<It>::value will be true when in fact -attempting to write into B will cause an error.

-

The same problem applies to is_swappable.

-
-
-

Proposed Resolution

-
    -
  1. Remove the is_writable and is_swappable traits, and remove the -requirements in the Writable Iterator and Swappable Iterator concepts -that require their models to support these traits.

    -
  2. -
  3. Change the is_readable specification to be: -is_readable<X>::type is true_type if the -result type of X::operator* is convertible to -iterator_traits<X>::value_type and is false_type -otherwise. Also, is_readable is required to satisfy -the requirements for the UnaryTypeTrait concept -(defined in the type traits proposal).

    -

    Remove the requirement for support of the is_readable trait from -the Readable Iterator concept.

    -
  4. -
  5. Remove the iterator_tag class.

    -
  6. -
  7. Change the specification of traversal_category to:

    -
    -traversal-category(Iterator) =
    -    let cat = iterator_traits<Iterator>::iterator_category
    -    if (cat is convertible to incrementable_iterator_tag)
    -      return cat; // Iterator is a new iterator
    -    else if (cat is convertible to random_access_iterator_tag)
    -        return random_access_traversal_tag;
    -    else if (cat is convertible to bidirectional_iterator_tag)
    -        return bidirectional_traversal_tag;
    -    else if (cat is convertible to forward_iterator_tag)
    -        return forward_traversal_tag;
    -    else if (cat is convertible to input_iterator_tag)
    -        return single_pass_iterator_tag;
    -    else if (cat is convertible to output_iterator_tag)
    -        return incrementable_iterator_tag;
    -    else
    -        return null_category_tag;
    -
    -
  8. -
-
-
-

Rationale

-
    -
  1. There are two reasons for removing is_writable -and is_swappable. The first is that we do not know of -a way to fix the specification so that it gives the correct -answer for all iterators. Second, there was only a weak -motivation for having is_writable and is_swappable -there in the first place. The main motivation was simply -uniformity: we have tags for the old iterator categories -so we should have tags for the new iterator categories. -While having tags and the capability to dispatch based -on the traversal categories is often used, we see -less of a need for dispatching based on writability -and swappability, since typically algorithms -that need these capabilities have no alternative if -they are not provided.
  2. -
  3. We discovered that the is_readable trait can be implemented -using only the iterator type itself and its value_type. -Therefore we remove the requirement for is_readable from the -Readable Iterator concept, and change the definition of -is_readable so that it works for any iterator type.
  4. -
  5. The purpose of the iterator_tag class was to -bundle the traversal and access category tags -into the iterator_category typedef. -With is_writable and is_swappable gone, and -is_readable no longer in need of special hints, -there is no reason for iterators to provide -information about the access capabilities of an iterator. -Thus there is no need for the iterator_tag. The -traversal tag can be directly used for the -iterator_category. If a new iterator is intended to be backward -compatible with old iterator concepts, a tag type -that is convertible to both one of the new traversal tags -and also to an old iterator tag can be created and use -for the iterator_category.
  6. -
  7. The changes to the specification of traversal_category are a -direct result of the removal of iterator_tag.
  8. -
-
-
- - - - diff --git a/doc/issues.rst b/doc/issues.rst deleted file mode 100755 index 5ddb61f..0000000 --- a/doc/issues.rst +++ /dev/null @@ -1,152 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Problem with ``is_writable`` and ``is_swappable`` in N1550_ -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -.. _N1550: http://www.boost-consulting.com/writing/n1550.html -.. _N1530: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1530.html - -:Author: David Abrahams and Jeremy Siek -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu -:Organization: `Boost Consulting`_, Indiana University Bloomington -:date: $Date$ -:Copyright: Copyright David Abrahams, Jeremy Siek 2003. Use, modification and - distribution is subject to the Boost Software License, - Version 1.0. (See accompanying file LICENSE_1_0.txt or copy - at http://www.boost.org/LICENSE_1_0.txt) - -.. _`Boost Consulting`: http://www.boost-consulting.com - -.. contents:: Table of Contents - -============== - Introduction -============== - -The ``is_writable`` and ``is_swappable`` traits classes in N1550_ -provide a mechanism for determining at compile time if an iterator -type is a model of the new Writable Iterator and Swappable Iterator -concepts, analogous to ``iterator_traits::iterator_category`` -for the old iterator concepts. For backward compatibility, -``is_writable`` and ``is_swappable`` not only work with new -iterators, but they also are intended to work for old -iterators (iterators that meet the requirements for one of the -iterator concepts in the current standard). In the case of old -iterators, the writability and swapability is deduced based on the -``iterator_category`` and also the ``reference`` type. The -specification for this deduction gives false positives for forward -iterators that have non-assignable value types. - -To review, the part of the ``is_writable`` trait definition which -applies to old iterators is:: - - if (cat is convertible to output_iterator_tag) - return true; - else if (cat is convertible to forward_iterator_tag - and iterator_traits::reference is a - mutable reference) - return true; - else - return false; - -Suppose the ``value_type`` of the iterator ``It`` has a private -assignment operator:: - - class B { - public: - ... - private: - B& operator=(const B&); - }; - -and suppose the ``reference`` type of the iterator is ``B&``. In -that case, ``is_writable::value`` will be true when in fact -attempting to write into ``B`` will cause an error. - -The same problem applies to ``is_swappable``. - - -==================== - Proposed Resolution -==================== - -1. Remove the ``is_writable`` and ``is_swappable`` traits, and remove the - requirements in the Writable Iterator and Swappable Iterator concepts - that require their models to support these traits. - -2. Change the ``is_readable`` specification to be: - ``is_readable::type`` is ``true_type`` if the - result type of ``X::operator*`` is convertible to - ``iterator_traits::value_type`` and is ``false_type`` - otherwise. Also, ``is_readable`` is required to satisfy - the requirements for the UnaryTypeTrait concept - (defined in the type traits proposal). - - Remove the requirement for support of the ``is_readable`` trait from - the Readable Iterator concept. - - -3. Remove the ``iterator_tag`` class. - -4. Change the specification of ``traversal_category`` to:: - - traversal-category(Iterator) = - let cat = iterator_traits::iterator_category - if (cat is convertible to incrementable_iterator_tag) - return cat; // Iterator is a new iterator - else if (cat is convertible to random_access_iterator_tag) - return random_access_traversal_tag; - else if (cat is convertible to bidirectional_iterator_tag) - return bidirectional_traversal_tag; - else if (cat is convertible to forward_iterator_tag) - return forward_traversal_tag; - else if (cat is convertible to input_iterator_tag) - return single_pass_iterator_tag; - else if (cat is convertible to output_iterator_tag) - return incrementable_iterator_tag; - else - return null_category_tag; - - -========== - Rationale -========== - -1. There are two reasons for removing ``is_writable`` - and ``is_swappable``. The first is that we do not know of - a way to fix the specification so that it gives the correct - answer for all iterators. Second, there was only a weak - motivation for having ``is_writable`` and ``is_swappable`` - there in the first place. The main motivation was simply - uniformity: we have tags for the old iterator categories - so we should have tags for the new iterator categories. - While having tags and the capability to dispatch based - on the traversal categories is often used, we see - less of a need for dispatching based on writability - and swappability, since typically algorithms - that need these capabilities have no alternative if - they are not provided. - -2. We discovered that the ``is_readable`` trait can be implemented - using only the iterator type itself and its ``value_type``. - Therefore we remove the requirement for ``is_readable`` from the - Readable Iterator concept, and change the definition of - ``is_readable`` so that it works for any iterator type. - -3. The purpose of the ``iterator_tag`` class was to - bundle the traversal and access category tags - into the ``iterator_category`` typedef. - With ``is_writable`` and ``is_swappable`` gone, and - ``is_readable`` no longer in need of special hints, - there is no reason for iterators to provide - information about the access capabilities of an iterator. - Thus there is no need for the ``iterator_tag``. The - traversal tag can be directly used for the - ``iterator_category``. If a new iterator is intended to be backward - compatible with old iterator concepts, a tag type - that is convertible to both one of the new traversal tags - and also to an old iterator tag can be created and use - for the ``iterator_category``. - -4. The changes to the specification of ``traversal_category`` are a - direct result of the removal of ``iterator_tag``. - diff --git a/doc/iter-issue-list.html b/doc/iter-issue-list.html deleted file mode 100755 index abe7c7a..0000000 --- a/doc/iter-issue-list.html +++ /dev/null @@ -1,5268 +0,0 @@ - - - - - - -Iterator concept and adapter issues - - - - -

Iterator concept and adapter issues

- --- - - - -
Date:2004-01-27
-
-
-

Index

- -
-
-

Issues from Matt's TR issues list

-
-

9.1 iterator_access overspecified?

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The proposal includes:

-
-enum iterator_access { 
-   readable_iterator = 1, writable_iterator = 2,
-   swappable_iterator = 4, lvalue_iterator = 8
-}; 
-
-

In general, the standard specifies thing like this as a bitmask -type with a list of defined names, and specifies neither the exact -type nor the specific values. Is there a reason for iterator_access -to be more specific?

- --- - - - - -
Proposed resolution:
 The iterator_access enum will be removed, -so this is no longer an issue. See the resolution to 9.15.
-
-
-

9.2 operators of iterator_facade overspecified

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

In general, we've provided operational semantics for things like -operator++. That is, we've said that ++iter must work, without -requiring either a member function or a non-member function. -iterator_facade specifies most operators as member -functions. There's no inherent reason for these to be members, so -we should remove this requirement. Similarly, some operations are -specified as non-member functions but could be implemented as -members. Again, the standard doesn't make either of these choices, -and TR1 shouldn't, either. So: operator*(), operator++(), -operator++(int), operator--(), operator--(int), -operator+=, operator-=, operator-(difference_type), -operator-(iterator_facade instance), and operator+ should -be specified with operational semantics and not explicitly required -to be members or non-members.

- --- - - - - - - -
Proposed resolution:
 Not a defect.
Rationale:The standard uses valid expressions such as ++iter -in requirements tables, such as for input iterator. However, for -classes, such as reverse_iterator, the standard uses function -prototypes, as we have done here for -iterator_facade. Further, the prototype specification does -not prevent the implementor from using members or non-members, -since nothing the user can do in a conforming program can detect -how the function is implemented.
-
-
-

9.3 enable_if_interoperable needs standardese

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The only discussion of what this means is in a note, so is -non-normative. Further, the note seems to be incorrect. It says -that enable_if_interoperable only works for types that "are -interoperable, by which we mean they are convertible to each -other." This requirement is too strong: it should be that one of -the types is convertible to the other. N1541 48

- --- - - - - -
Proposed resolution:
 

Add normative text. Relax requirements in the -proposed way.

-

Change:

-
-[Note: The enable_if_interoperable template used above is -for exposition purposes. The member operators should be only be -in an overload set provided the derived types Dr1 and -Dr2 are interoperable, by which we mean they are -convertible to each other. The enable_if_interoperable -approach uses SFINAE to take the operators out of the overload -set when the types are not interoperable.]
-

To:

-
-

The enable_if_interoperable template used above is for -exposition purposes. The member operators should only be in an -overload set provided the derived types Dr1 and Dr2 are -interoperable, meaning that at least one of the types is -convertible to the other. The enable_if_interoperable -approach uses SFINAE to take the operators out of the overload -set when the types are not interoperable. The operators should -behave as-if enable_if_interoperable were defined to be:

-
-template <bool, typename> enable_if_interoperable_impl
-{};
-
-template <typename T> enable_if_interoperable_impl<true,T>
-{ typedef T type; };
-
-template<typename Dr1, typename Dr2, typename T>
-struct enable_if_interoperable
-  : enable_if_interoperable_impl<
-        is_convertible<Dr1,Dr2>::value || is_convertible<Dr2,Dr1>::value
-      , T
-    >
-{};
-
-
-
-
-
-

9.4 enable_if_convertible unspecified, conflicts with requires

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

In every place where enable_if_convertible is used it's used like -this (simplified):

-
-template<class T>
-struct C
-{
-  template<class T1>
-  C(T1, enable_if_convertible<T1, T>::type* = 0);
-};
-
-

The idea being that this constructor won't compile if T1 isn't -convertible to T. As a result, the constructor won't be considered -as a possible overload when constructing from an object x where the -type of x isn't convertible to T. In addition, however, each of -these constructors has a requires clause that requires -convertibility, so the behavior of a program that attempts such a -construction is undefined. Seems like the enable_if_convertible -part is irrelevant, and should be removed. There are two -problems. First, enable_if_convertible is never specified, so we -don't know what this is supposed to do. Second: we could reasonably -say that this overload should be disabled in certain cases or we -could reasonably say that behavior is undefined, but we can't say -both.

-

Thomas Witt writes that the goal of putting in -enable_if_convertible here is to make sure that a specific overload -doesn't interfere with the generic case except when that overload -makes sense. He agrees that what we currently have is deficient. -Dave Abrahams writes that there is no conflict with the requires -cause because the requires clause only takes effect when the -function is actually called. The presence of the constructor -signature can/will be detected by is_convertible without violating -the requires clause, and thus it makes a difference to disable -those constructor instantiations that would be disabled by -enable_if_convertible even if calling them invokes undefined -behavior. There was more discussion on the reflector: -c++std-lib-12312, c++std-lib-12325, c++std-lib- 12330, -c++std-lib-12334, c++std-lib-12335, c++std-lib-12336, -c++std-lib-12338, c++std-lib- 12362.

- --- - - - - -
Proposed resolution:
 

Change:

-
-[Note: The enable_if_convertible<X,Y>::type expression -used in this section is for exposition purposes. The converting -constructors for specialized adaptors should be only be in an -overload set provided that an object of type X is -implicitly convertible to an object of type Y. The -enable_if_convertible approach uses SFINAE to take the -constructor out of the overload set when the types are not -implicitly convertible.]
-

To:

-
-

The enable_if_convertible<X,Y>::type expression used in -this section is for exposition purposes. The converting -constructors for specialized adaptors should be only be in an -overload set provided that an object of type X is -implicitly convertible to an object of type Y. The -signatures involving enable_if_convertible should behave -as-if enable_if_convertible were defined to be:

-
-template <bool> enable_if_convertible_impl
-{};
-
-template <> enable_if_convertible_impl<true>
-{ struct type; };
-
-template<typename From, typename To>
-struct enable_if_convertible
-  : enable_if_convertible_impl<is_convertible<From,To>::value>
-{};
-
-

If an expression other than the default argument is used to -supply the value of a function parameter whose type is written -in terms of enable_if_convertible, the program is -ill-formed, no diagnostic required.

-

[Note: The enable_if_convertible approach uses SFINAE to -take the constructor out of the overload set when the types are -not implicitly convertible. ]

-
-
-
-
-

9.5 iterator_adaptor has an extraneous 'bool' at the start of the template definition

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The title says it all; this is probably just a typo.

- --- - - - - -
Proposed resolution:
 Remove the 'bool'.
-
-
-

9.6 Name of private member shouldn't be normative

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

iterator_adaptor has a private member named m_iterator. Presumably -this is for exposition only, since it's an implementation -detail. It needs to be marked as such.

- --- - - - - -
Proposed resolution:
 
-
Mark the member m_iterator as exposition
-
only. Note/DWA: I think this is NAD because the user can't -detect it, though I'm happy to mark it exposition only.
-
-

In [lib.iterator.adaptor]

-

Change:

-
-Base m_iterator;
-
-

to:

-
-Base m_iterator; // exposition only
-
-
-
-
-

9.7 iterator_adaptor operations specifications are a bit inconsistent

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

iterator_adpator() has a Requires clause, that Base must be default -constructible. iterator_adaptor(Base) has no Requires clause, -although the Returns clause says that the Base member is copy -construced from the argument (this may actually be an oversight in -N1550, which doesn't require iterators to be copy constructible or -assignable).

- --- - - - - -
Proposed resolution:
 

Add a requirements section for the template -parameters of iterator_adaptor, and state that Base must be Copy -Constructible and Assignable.

-

N1550 does in fact include requirements for copy constructible -and assignable in the requirements tables. To clarify, we've also -added the requirements to the text.

-
-
-
-

9.8 Specialized adaptors text should be normative

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

similar to 9.3, "Specialized Adaptors" has a note describing -enable_if_convertible. This should be normative text.

- --- - - - - -
Proposed resolution:
 Changed it to normative -text. See the resolution of 9.4
-
-
-

9.9 Reverse_iterator text is too informal

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

reverse iterator "flips the direction of the base iterator's -motion". This needs to be more formal, as in the current -standard. Something like: "iterates through the controlled sequence -in the opposite direction"

- --- - - - - -
Proposed resolution:
 

Change:

-
-The reverse iterator adaptor flips the direction of a base -iterator's motion. Invoking operator++() moves the base -iterator backward and invoking operator--() moves the base -iterator forward.
-

to:

-
-The reverse iterator adaptor iterates through the adapted iterator -range in the opposite direction.
-
-
-
-

9.10 'prior' is undefined

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

reverse_iterator::dereference is specified as calling a function -named 'prior' which has no specification.

- --- - - - - - - -
Proposed resolution:
 

Change the specification to avoid using prior as follows.

-

Remove:

-
-typename reverse_iterator::reference dereference() const { return *prior(this->base()); }
-
-

And at the end of the operations section add:

-
-

reference operator*() const;

- --- - - - -
Effects:
-
-Iterator tmp = m_iterator;
-return *--tmp;
-
-
-
Rationale:The style of specification has changed because of issue 9.37x.
-
-
-

9.11 "In other words" is bad wording

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

Transform iterator has a two-part specification: it does this, in -other words, it does that. "In other words" always means "I didn't -say it right, so I'll try again." We need to say it once.

- --- - - - - -
Proposed resolution:
 

Change:

-
-The transform iterator adapts an iterator by applying some function -object to the result of dereferencing the iterator. In other words, -the operator* of the transform iterator first dereferences the -base iterator, passes the result of this to the function object, and -then returns the result.
-

to:

-
-The transform iterator adapts an iterator by modifying the -operator* to apply a function object to the result of -dereferencing the iterator and returning the result.
-
-
-
-

9.12 Transform_iterator shouldn't mandate private member

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

transform_iterator has a private member named 'm_f' which should be -marked "exposition only."

- --- - - - - -
Proposed resolution:
 

Mark the member m_f as exposition -only. Note/DWA: I think this is NAD because the user can't -detect it, though I'm happy to mark it exposition only.

-

Change:

-
-UnaryFunction m_f;
-
-

to:

-
-UnaryFunction m_f;   // exposition only
-
-
-
-
-

9.13 Unclear description of counting iterator

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The description of Counting iterator is unclear. "The counting -iterator adaptor implements dereference by returning a reference to -the base object. The other operations are implemented by the base -m_iterator, as per the inheritance from iterator_adaptor."

- --- - - - - -
Proposed resolution:
 

Change:

-
-The counting iterator adaptor implements dereference by -returning a reference to the base object. The other operations -are implemented by the base m_iterator, as per the -inheritance from iterator_adaptor.
-

to:

-
-counting_iterator adapts an object by adding an -operator* that returns the current value of the object. All -other iterator operations are forwarded to the adapted object.
-
-
-
-

9.14 Counting_iterator's difference type

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

Counting iterator has the following note:

-
-[Note: implementers are encouraged to provide an implementation -of distance_to and a difference_type that avoids overflows in the -cases when the Incrementable type is a numeric type.]
-

I'm not sure what this means. The user provides a template argument -named Difference, but there's no difference_type. I assume this is -just a glitch in the wording. But if implementors are encouraged to -ignore this argument if it won't work right, why is it there?

- --- - - - - -
Proposed resolution:
 The difference_type was inherited from -iterator_adaptor. However, we've removed the explicit -inheritance, so explicit typedefs have been added. See the -resolution of 9.37x.
-
-
-

9.15 How to detect lvalueness?

- --- - - - - - -
Submitter:Dave Abrahams
Status:New
-

Shortly after N1550 was accepted, we discovered that an iterator's -lvalueness can be determined knowing only its value_type. This -predicate can be calculated even for old-style iterators (on whose -reference type the standard places few requirements). A trait in -the Boost iterator library does it by relying on the compiler's -unwillingness to bind an rvalue to a T& function template -parameter. Similarly, it is possible to detect an iterator's -readability knowing only its value_type. Thus, any interface which -asks the user to explicitly describe an iterator's lvalue-ness or -readability seems to introduce needless complexity.

- --- - - - - -
Proposed resolution:
 
    -
  1. Remove the is_writable and is_swappable traits, and -remove the requirements in the Writable Iterator and Swappable -Iterator concepts that require their models to support these -traits.
  2. -
  3. Change the is_readable specification. Remove the -requirement for support of the is_readable trait from the -Readable Iterator concept.
  4. -
  5. Remove the iterator_tag class and transplant the logic for -choosing an iterator category into iterator_facade.
  6. -
  7. Change the specification of traversal_category.
  8. -
  9. Remove Access parameters from N1530
  10. -
-

In N1550:

-

Remove:

-
-

Since the access concepts are not related via refinement, but -instead cover orthogonal issues, we do not use tags for the -access concepts, but instead use the equivalent of a bit field.

-

We provide an access mechanism for mapping iterator types to -the new traversal tags and access bit field. Our design reuses -iterator_traits<Iter>::iterator_category as the access -mechanism. To that end, the access and traversal information is -bundled into a single type using the following iterator_tag -class.

-
-enum iterator_access { readable_iterator = 1, writable_iterator = 2, 
-    swappable_iterator = 4, lvalue_iterator = 8 };
-
-template <unsigned int access_bits, class TraversalTag>
-struct iterator_tag : /* appropriate old category or categories */ {
-  static const iterator_access access =
-    (iterator_access)access_bits & 
-      (readable_iterator | writable_iterator | swappable_iterator);
-  typedef TraversalTag traversal;
-};
-
-

The access_bits argument is declared to be unsigned int -instead of the enum iterator_access for convenience of -use. For example, the expression (readable_iterator | -writable_iterator) produces an unsigned int, not an -iterator_access. The purpose of the lvalue_iterator -part of the iterator_access enum is to communicate to -iterator_tag whether the reference type is an lvalue so -that the appropriate old category can be chosen for the base -class. The lvalue_iterator bit is not recorded in the -iterator_tag::access data member.

-

The iterator_tag class template is derived from the -appropriate iterator tag or tags from the old requirements -based on the access bits and traversal tag passed as template -parameters. The algorithm for determining the old tag or tags -picks the least refined old concepts that include all of the -requirements of the access and traversal concepts (that is, the -closest fit), if any such category exists. For example, the -category tag for a Readable Single Pass Iterator will always be -derived from input_iterator_tag, while the category tag for -a Single Pass Iterator that is both Readable and Writable will -be derived from both input_iterator_tag and -output_iterator_tag.

-

We also provide several helper classes that make it convenient -to obtain the access and traversal characteristics of an -iterator. These helper classes work both for iterators whose -iterator_category is iterator_tag and also for -iterators using the original iterator categories.

-
-template <class Iterator> struct is_readable  { typedef ... type; };
-template <class Iterator> struct is_writable { typedef ... type; };
-template <class Iterator> struct is_swappable { typedef ... type; };
-template <class Iterator> struct traversal_category { typedef ... type; };
-
-
-

After:

-
-Like the old iterator requirements, we provide tags for -purposes of dispatching based on the traversal concepts. The -tags are related via inheritance so that a tag is convertible -to another tag if the concept associated with the first tag is -a refinement of the second tag.
-

Add:

-
-

Our design reuses iterator_traits<Iter>::iterator_category -to indicate an iterator's traversal capability. To specify -capabilities not captured by any old-style iterator category, -an iterator designer can use an iterator_category type that -is convertible to both the the most-derived old iterator -category tag which fits, and the appropriate new iterator -traversal tag.

-

We do not provide tags for the purposes of dispatching based on -the access concepts, in part because we could not find a way to -automatically infer the right access tags for old-style -iterators. An iterator's writability may be dependent on the -assignability of its value_type and there's no known way to -detect whether an arbitrary type is assignable. Fortunately, -the need for dispatching based on access capability is not as -great as the need for dispatching based on traversal -capability.

-
-

From the Readable Iterator Requirements table, remove:

-
- ----- - - - - - - -
is_readable<X>::typetrue_type 
-
-

From the Writable Iterator Requirements table, remove:

-
- ----- - - - - - - -
is_writable<X>::typetrue_type 
-
-

From the Swappable Iterator Requirements table, remove:

-
- ----- - - - - - - -
is_swappable<X>::typetrue_type 
-
-

From [lib.iterator.synopsis] replace:

-
-template <class Iterator> struct is_readable;
-template <class Iterator> struct is_writable;
-template <class Iterator> struct is_swappable;
-template <class Iterator> struct traversal_category;
-
-enum iterator_access { readable_iterator = 1, writable_iterator = 2, 
-    swappable_iterator = 4, lvalue_iterator = 8 };
-
-template <unsigned int access_bits, class TraversalTag>
-struct iterator_tag : /* appropriate old category or categories */ {
-  static const iterator_access access =
-    (iterator_access)access_bits & 
-      (readable_iterator | writable_iterator | swappable_iterator);
-  typedef TraversalTag traversal;
-};
-
-

with:

-
-template <class Iterator> struct is_readable_iterator;
-template <class Iterator> struct iterator_traversal;
-
-

In [lib.iterator.traits], remove:

-
-

The iterator_tag class template is an iterator category tag -that encodes the access enum and traversal tag in addition to -being compatible with the original iterator tags. The -iterator_tag class inherits from one of the original -iterator tags according to the following pseudo-code.

-
-inherit-category(access, traversal-tag) =
-     if ((access & readable_iterator) && (access & lvalue_iterator)) {
-         if (traversal-tag is convertible to random_access_traversal_tag)
-             return random_access_iterator_tag;
-         else if (traversal-tag is convertible to bidirectional_traversal_tag)
-             return bidirectional_iterator_tag;
-         else if (traversal-tag is convertible to forward_traversal_tag)
-             return forward_iterator_tag;
-         else if (traversal-tag is convertible to single_pass_traversal_tag)
-             if (access-tag is convertible to writable_iterator_tag)
-                 return input_output_iterator_tag;
-             else
-                 return input_iterator_tag;
-         else
-             return null_category_tag;
-     } else if ((access & readable_iterator) and (access & writable_iterator)
-                and traversal-tag is convertible to single_pass_iterator_tag)
-         return input_output_iterator_tag;
-     else if (access & readable_iterator
-              and traversal-tag is convertible to single_pass_iterator_tag)
-         return input_iterator_tag;
-     else if (access & writable_iterator
-              and traversal-tag is convertible to incrementable_iterator_tag)
-         return output_iterator_tag;
-     else
-         return null_category_tag;
-
-

If the argument for TraversalTag is not convertible to -incrementable_iterator_tag then the program is ill-formed.

-
-

Change:

-
-

The is_readable, is_writable, is_swappable, and -traversal_category class templates are traits classes. For -iterators whose iterator_traits<Iter>::iterator_category -type is iterator_tag, these traits obtain the access -enum and traversal member type from within -iterator_tag. For iterators whose -iterator_traits<Iter>::iterator_category type is not -iterator_tag and instead is a tag convertible to one of the -original tags, the appropriate traversal tag and access bits -are deduced. The following pseudo-code describes the -algorithm.

-
-is-readable(Iterator) = 
-    cat = iterator_traits<Iterator>::iterator_category;
-    if (cat == iterator_tag<Access,Traversal>)
-        return Access & readable_iterator;
-    else if (cat is convertible to input_iterator_tag)
-        return true;
-    else
-        return false;
-
-is-writable(Iterator) =
-    cat = iterator_traits<Iterator>::iterator_category;
-    if (cat == iterator_tag<Access,Traversal>)
-        return Access & writable_iterator;
-    else if (cat is convertible to output_iterator_tag)
-         return true;
-    else if (
-         cat is convertible to forward_iterator_tag
-         and iterator_traits<Iterator>::reference is a 
-             mutable reference)
-        return true;
-    else
-        return false;
-
-is-swappable(Iterator) =
-    cat = iterator_traits<Iterator>::iterator_category;
-    if (cat == iterator_tag<Access,Traversal>)
-        return Access & swappable_iterator;
-    else if (cat is convertible to forward_iterator_tag) {
-        if (iterator_traits<Iterator>::reference is a const reference)
-            return false;
-        else
-            return true;
-    } else 
-        return false;
-
-traversal-category(Iterator) =
-    cat = iterator_traits<Iterator>::iterator_category;
-    if (cat == iterator_tag<Access,Traversal>)
-        return Traversal;
-    else if (cat is convertible to random_access_iterator_tag)
-        return random_access_traversal_tag;
-    else if (cat is convertible to bidirectional_iterator_tag)
-        return bidirectional_traversal_tag;
-    else if (cat is convertible to forward_iterator_tag)
-        return forward_traversal_tag;
-    else if (cat is convertible to input_iterator_tag)
-        return single_pass_iterator_tag;
-    else if (cat is convertible to output_iterator_tag)
-        return incrementable_iterator_tag;
-    else
-        return null_category_tag;
-
-

The following specializations provide the access and traversal -category tags for pointer types.

-
-template <typename T>
-struct is_readable<const T*> { typedef true_type type; };
-template <typename T>
-struct is_writable<const T*> { typedef false_type type; };
-template <typename T>
-struct is_swappable<const T*> { typedef false_type type; };
-
-template <typename T>
-struct is_readable<T*> { typedef true_type type; };
-template <typename T>
-struct is_writable<T*> { typedef true_type type; };
-template <typename T>
-struct is_swappable<T*> { typedef true_type type; };
-
-template <typename T>
-struct traversal_category<T*>
-{
-  typedef random_access_traversal_tag type;
-};
-
-
-

to:

-
-

The is_readable_iterator class template satisfies the -UnaryTypeTrait requirements.

-

Given an iterator type X, -is_readable_iterator<X>::value yields true if, for an -object a of type X, *a is convertible to -iterator_traits<X>::value_type, and false otherwise.

-

iterator_traversal<X>::type is

-
-category-to-traversal(iterator_traits<X>::iterator_category) 
-
-

where category-to-traversal is defined as follows

-
-category-to-traversal(C) =
-    if (C is convertible to incrementable_traversal_tag)
-        return C;
-    else if (C is convertible to random_access_iterator_tag)
-        return random_access_traversal_tag;
-    else if (C is convertible to bidirectional_iterator_tag)
-        return bidirectional_traversal_tag;
-    else if (C is convertible to forward_iterator_tag)
-        return forward_traversal_tag;
-    else if (C is convertible to input_iterator_tag)
-        return single_pass_traversal_tag;
-    else if (C is convertible to output_iterator_tag)
-        return incrementable_traversal_tag;
-    else
-        the program is ill-formed
-
-
-

In N1530:

-

In [lib.iterator.helper.synopsis]:

-

Change:

-
-const unsigned use_default_access = -1;
-
-struct iterator_core_access { /* implementation detail */ };
-
-template <
-    class Derived
-  , class Value
-  , unsigned AccessCategory
-  , class TraversalCategory
-  , class Reference  = Value&
-  , class Difference = ptrdiff_t
->
-class iterator_facade;
-
-template <
-    class Derived
-  , class Base
-  , class Value      = use_default
-  , unsigned Access  = use_default_access
-  , class Traversal  = use_default
-  , class Reference  = use_default
-  , class Difference = use_default
->
-class iterator_adaptor;
-
-template <
-    class Iterator
-  , class Value = use_default
-  , unsigned Access  = use_default_access
-  , class Traversal  = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator;
-
-

To:

-
-struct iterator_core_access { /* implementation detail */ };
-
-template <
-    class Derived
-  , class Value
-  , class CategoryOrTraversal
-  , class Reference  = Value&
-  , class Difference = ptrdiff_t
->
-class iterator_facade;
-
-template <
-    class Derived
-  , class Base
-  , class Value      = use_default
-  , class CategoryOrTraversal  = use_default
-  , class Reference  = use_default
-  , class Difference = use_default
->
-class iterator_adaptor;
-
-template <
-    class Iterator
-  , class Value = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator;
-
-

Change:

-
-template <
-    class Incrementable
-  , unsigned Access  = use_default_access
-  , class Traversal  = use_default
-  , class Difference = use_default
->
-class counting_iterator
-
-

To:

-
-template <
-    class Incrementable
-  , class CategoryOrTraversal  = use_default
-  , class Difference = use_default
->
-class counting_iterator;
-
-

In [lib.iterator.facade]:

-

Change:

-
-template <
-    class Derived
-  , class Value
-  , unsigned AccessCategory
-  , class TraversalCategory
-  , class Reference  = /* see below */
-  , class Difference = ptrdiff_t
->
-class iterator_facade {
-
-

to:

-
-template <
-    class Derived
-  , class Value
-  , class CategoryOrTraversal
-  , class Reference  = Value&
-  , class Difference = ptrdiff_t
->
-class iterator_facade {
-
-

Change:

-
-typedef iterator_tag<AccessCategory, TraversalCategory> iterator_category;
-
-

to:

-
-typedef /* see below */ iterator_category;
-
-

Change:

-
-// Comparison operators
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type // exposition
-operator ==(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-            iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator !=(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-            iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator <(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-           iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator <=(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-            iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator >(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-           iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator >=(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-            iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator >=(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-            iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-// Iterator difference
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1,
-          class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator -(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs,
-           iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs);
-
-// Iterator addition
-template <class Derived, class V, class AC, class TC, class R, class D>
-Derived operator+ (iterator_facade<Derived, V, AC, TC, R, D> const&,
-                   typename Derived::difference_type n)
-
-

to:

-
-// Comparison operators
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type // exposition
-operator ==(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator !=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-// Iterator difference
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-/* see below */
-operator-(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-          iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-// Iterator addition
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (iterator_facade<Dr,V,TC,R,D> const&,
-                   typename Derived::difference_type n);
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (typename Derived::difference_type n,
-                   iterator_facade<Dr,V,TC,R,D> const&);
-
-

After the iterator_facade synopsis, add:

-

The iterator_category member of iterator_facade is

-
-iterator-category(CategoryOrTraversal, value_type, reference)
-
-

where iterator-category is defined as follows:

-
-iterator-category(C,R,V) :=
-   if (C is convertible to std::input_iterator_tag
-       || C is convertible to std::output_iterator_tag
-   )
-       return C
-
-   else if (C is not convertible to incrementable_traversal_tag)
-       the program is ill-formed
-
-   else return a type X satisfying the following two constraints:
-
-      1. X is convertible to X1, and not to any more-derived
-         type, where X1 is defined by:
-
-           if (R is a reference type
-               && C is convertible to forward_traversal_tag)
-           {
-               if (C is convertible to random_access_traversal_tag)
-                   X1 = random_access_iterator_tag
-               else if (C is convertible to bidirectional_traversal_tag)
-                   X1 = bidirectional_iterator_tag
-               else
-                   X1 = forward_iterator_tag
-           }
-           else
-           {
-               if (C is convertible to single_pass_traversal_tag
-                   && R is convertible to V)
-                   X1 = input_iterator_tag
-               else
-                   X1 = C
-           }
-
-      2. category-to-traversal(X) is convertible to the most
-         derived traversal tag type to which X is also
-         convertible, and not to any more-derived traversal tag
-         type.
-
-
-
-

In [lib.iterator.facade] iterator_facade requirements:

-

Remove:

-
-AccessCategory must be an unsigned value which uses no more -bits than the greatest value of iterator_access.
-

In the Iterator Adaptor section, change:

-
-Several of the template parameters of iterator_adaptor default -to use_default (or use_default_access).
-

to:

-
-Several of the template parameters of iterator_adaptor default -to use_default.
-

In [lib.iterator.special.adaptors]:

-

Change:

-
-template <
-    class Iterator
-  , class Value = use_default
-  , unsigned Access  = use_default_access
-  , class Traversal  = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator
-
-

to:

-
-template <
-    class Iterator
-  , class Value = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference = use_default
-  , class Difference = use_default
->
-class indirect_iterator
-
-

Change:

-
-template <
-    class Iterator2, class Value2, unsigned Access2, class Traversal2
-  , class Reference2, class Difference2
->
-indirect_iterator(
-
-

to:

-
-template <
-    class Iterator2, class Value2, class Category2
-  , class Reference2, class Difference2
->
-indirect_iterator(
-
-

Change:

-
-template <
-    class Incrementable
-  , unsigned Access = use_default_access
-  , class Traversal = use_default
-  , class Difference = use_default
->
-class counting_iterator
-
-

to:

-
-template <
-    class Incrementable
-  , class CategoryOrTraversal = use_default
-  , class Difference = use_default
->
-class counting_iterator
-
-

Change:

-
-typedef iterator_tag<
-      writable_iterator
-    , incrementable_traversal_tag
-> iterator_category;
-
-

to:

-
-typedef std::output_iterator_tag iterator_category;
-

In [lib.iterator.adaptor]

-

Change:

-
-template <
-    class Derived
-  , class Base
-  , class Value      = use_default
-  , unsigned Access  = use_default_access
-  , class Traversal  = use_default
-  , class Reference  = use_default
-  , class Difference = use_default
->
-class iterator_adaptor 
-
-

To:

-
-template <
-    class Derived
-  , class Base
-  , class Value               = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference           = use_default
-  , class Difference = use_default
->
-class iterator_adaptor 
-
-
- --- - - - -
Rationale:
-
    -
  1. There are two reasons for removing is_writable -and is_swappable. The first is that we do not know of -a way to fix the specification so that it gives the correct -answer for all iterators. Second, there was only a weak -motivation for having is_writable and is_swappable -there in the first place. The main motivation was simply -uniformity: we have tags for the old iterator categories -so we should have tags for the new iterator categories. -While having tags and the capability to dispatch based -on the traversal categories is often used, we see -less of a need for dispatching based on writability -and swappability, since typically algorithms -that need these capabilities have no alternative if -they are not provided.
  2. -
  3. We discovered that the is_readable trait can be implemented -using only the iterator type itself and its value_type. -Therefore we remove the requirement for is_readable from the -Readable Iterator concept, and change the definition of -is_readable so that it works for any iterator type.
  4. -
  5. The purpose of the iterator_tag class was to bundle the -traversal and access category tags into the -iterator_category typedef. With is_writable and -is_swappable gone, and is_readable no longer in need of -special hints, there is no reason for iterators to provide -information about the access capabilities of an iterator. Thus -there is no need for the iterator_tag. The traversal tag can -be directly used for the iterator_category. If a new -iterator is intended to be backward compatible with old iterator -concepts, a tag type that is convertible to both one of the new -traversal tags and also to an old iterator tag can be created -and use for the iterator_category.
  6. -
  7. The changes to the specification of traversal_category are a -direct result of the removal of iterator_tag.
  8. -
-
-
-

9.16 is_writable_iterator returns false positives

- --- - - - - - -
Submitter:Dave Abrahams
Status:New
-

is_writable_iterator returns false positives for forward iterators -whose value_type has a private assignment operator, or whose -reference type is not a reference (currently legal).

- --- - - - - -
Proposed Resolution:
 See the resolution to 9.15.
-
-
-

9.17 is_swappable_iterator returns false positives

- --- - - - - - -
Submitter:Dave Abrahams
Status:New
-

is_swappable_iterator has the same problems as -is_writable_iterator. In addition, if we allow users to write their -own iter_swap functions it's easy to imagine old-style iterators -for which is_swappable returns false negatives.

- --- - - - - -
Proposed Resolution:
 See the resolution to 9.15.
-
-
-

9.18 Are is_readable, is_writable, and is_swappable useful?

- --- - - - - - -
Submitter:Dave Abrahams
Status:New
-

I am concerned that there is little use for any of is_readable, -is_writable, or is_swappable, and that not only do they unduly -constrain iterator implementors but they add overhead to -iterator_facade and iterator_adaptor in the form of a template -parameter which would otherwise be unneeded. Since we can't -implement two of them accurately for old-style iterators, I am -having a hard time justifying their impact on the rest of the -proposal(s).

- --- - - - - -
Proposed Resolution:
 See the resolution to 9.15.
-
-
-

9.19 Non-Uniformity of the "lvalue_iterator Bit"

- --- - - - - - -
Submitter:Dave Abrahams
Status:New
-

The proposed iterator_tag class template accepts an "access bits" -parameter which includes a bit to indicate the iterator's -lvalueness (whether its dereference operator returns a reference to -its value_type. The relevant part of N1550 says:

-
-The purpose of the lvalue_iterator part of the iterator_access -enum is to communicate to iterator_tagwhether the reference type -is an lvalue so that the appropriate old category can be chosen -for the base class. The lvalue_iterator bit is not recorded in -the iterator_tag::access data member.
-

The lvalue_iterator bit is not recorded because N1550 aims to -improve orthogonality of the iterator concepts, and a new-style -iterator's lvalueness is detectable by examining its reference -type. This inside/outside difference is awkward and confusing.

- --- - - - - -
Proposed Resolution:
 The iterator_tag class will be removed, so this is no longer an issue. -See the resolution to 9.15.
-
-
-

9.20 Traversal Concepts and Tags

- --- - - - - - -
Submitter:Dave Abrahams
Status:New
-

Howard Hinnant pointed out some inconsistencies with the naming of -these tag types:

-
-incrementable_iterator_tag // ++r, r++ 
-single_pass_iterator_tag // adds a == b, a != b 
-forward_traversal_iterator_tag // adds multi-pass 
-bidirectional_traversal_iterator_tag // adds --r, r--
-random_access_traversal_iterator_tag // adds r+n,n+r,etc. 
-
-

Howard thought that it might be better if all tag names contained -the word "traversal". It's not clear that would result in the best -possible names, though. For example, incrementable iterators can -only make a single pass over their input. What really distinguishes -single pass iterators from incrementable iterators is not that they -can make a single pass, but that they are equality -comparable. Forward traversal iterators really distinguish -themselves by introducing multi-pass capability. Without entering -a "Parkinson's Bicycle Shed" type of discussion, it might be worth -giving the names of these tags (and the associated concepts) some -extra attention.

- --- - - - - -
Proposed resolution:
 

Change the names of the traversal tags to the -following names:

-
-incrementable_traversal_tag
-single_pass_traversal_tag
-forward_traversal_tag
-bidirectional_traversal_tag
-random_access_traversal_tag
-
-

In [lib.iterator.traversal]:

-

Change:

-
- ----- - - - - - - -
traversal_category<X>::typeConvertible to -incrementable_iterator_tag 
-
-

to:

-
- ----- - - - - - - -
iterator_traversal<X>::typeConvertible to -incrementable_traversal_tag 
-
-

Change:

-
- ----- - - - - - - -
traversal_category<X>::typeConvertible to -single_pass_iterator_tag 
-
-

to:

-
- ----- - - - - - - -
iterator_traversal<X>::typeConvertible to -single_pass_traversal_tag 
-
-

Change:

-
- ----- - - - - - - -
traversal_category<X>::typeConvertible to -forward_traversal_iterator_tag 
-
-

to:

-
- ----- - - - - - - -
iterator_traversal<X>::typeConvertible to -forward_traversal_tag 
-
-

Change:

-
- ----- - - - - - - -
traversal_category<X>::typeConvertible to -bidirectional_traversal_iterator_tag 
-
-

to:

-
- ----- - - - - - - -
iterator_traversal<X>::typeConvertible to -bidirectional_traversal_tag 
-
-

Change:

-
- ------ - - - - - - - -
traversal_category<X>::typeConvertible to -random_access_traversal_iterator_tag  
-
-

to:

-
- ------ - - - - - - - -
iterator_traversal<X>::typeConvertible to -random_access_traversal_tag  
-
-

In [lib.iterator.synopsis], change:

-
-struct incrementable_iterator_tag { };
-struct single_pass_iterator_tag : incrementable_iterator_tag { };
-struct forward_traversal_tag : single_pass_iterator_tag { };
-
-

to:

-
-struct incrementable_traversal_tag { };
-struct single_pass_traversal_tag : incrementable_traversal_tag { };
-struct forward_traversal_tag : single_pass_traversal_tag { };
-
-

Remove:

-
-struct null_category_tag { };
-struct input_output_iterator_tag : input_iterator_tag, output_iterator_tag {};
-
-
-
-
-

9.21 iterator_facade Derived template argument underspecified

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The first template argument to iterator_facade is named Derived, -and the proposal says:

-
-The Derived template parameter must be a class derived from -iterator_facade.
-

First, iterator_facade is a template, so cannot be derived -from. Rather, the class must be derived from a specialization of -iterator_facade. More important, isn't Derived required to be the -class that is being defined? That is, if I understand it right, the -definition of D here this is not valid:

-
-class C : public iterator_facade<C, ... > { ... }; 
-class D : public iterator_facade<C, ...> { ... }; 
-
-

In the definition of D, the Derived argument to iterator_facade is -a class derived from a specialization of iterator_facade, so the -requirement is met. Shouldn't the requirement be more like "when -using iterator_facade to define an iterator class Iter, the class -Iter must be derived from a specialization of iterator_facade whose -first template argument is Iter." That's a bit awkward, but at the -moment I don't see a better way of phrasing it.

- --- - - - - -
Proposed resolution:
 

In [lib.iterator.facade]

-

Remove:

-
-The Derived template parameter must be a class derived from -iterator_facade.
-

Change:

-
-The following table describes the other requirements on the -Derived parameter. Depending on the resulting iterator's -iterator_category, a subset of the expressions listed in the table -are required to be valid. The operations in the first column must be -accessible to member functions of class iterator_core_access.
-

to:

-
-The following table describes the typical valid expressions on -iterator_facade's Derived parameter, depending on the -iterator concept(s) it will model. The operations in the first -column must be made accessible to member functions of class -iterator_core_access. In addition, -static_cast<Derived*>(iterator_facade*) shall be well-formed.
-

In [lib.iterator.adaptor]

-

Change:

-
-The iterator_adaptor is a base class template derived from -an instantiation of iterator_facade.
-

to:

-
-Each specialization of the iterator_adaptor class template -is derived from a specialization of iterator_facade.
-

Change:

-
-The Derived template parameter must be a derived class of -iterator_adaptor.
-

To:

-
-static_cast<Derived*>(iterator_adaptor*) shall be well-formed.
-
-

[Note: The proposed resolution to Issue 9.37 contains related -changes]

-
-
-

9.22 return type of Iterator difference for iterator facade

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The proposal says:

-
-template <class Dr1, class V1, class AC1, class TC1, class R1, class D1, 
-class Dr2, class V2, class AC2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1, Dr2, bool>::type
-operator -(iterator_facade<Dr1, V1, AC1, TC1, R1, D1> const& lhs, 
-iterator_facade<Dr2, V2, AC2, TC2, R2, D2> const& rhs); 
-
-

Shouldn't the return type be one of the two iterator types? Which -one? The idea is that if one of the iterator types can be converted -to the other type, then the subtraction is okay. Seems like the -return type should then be the type that was converted to. Is that -right?

- --- - - - - -
Proposed resolution:
 See resolution to 9.34.
-
-
-

9.23 Iterator_facade: minor wording Issue

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

In the table that lists the required (sort of) member functions of -iterator types that are based on iterator_facade, the entry for -c.equal(y) says:

-
-true iff c and y refer to the same position. Implements c == y -and c != y. The second sentence is inside out. c.equal(y) does -not implement either of these operations. It is used to implement -them. Same thing in the description of c.distance_to(z).
- --- - - - - -
Proposed resolution:
 remove "implements" descriptions from -table. See resolution to 9.34
-
-
-

9.24 Use of undefined name in iterator_facade table

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

Several of the descriptions use the name X without defining -it. This seems to be a carryover from the table immediately above -this section, but the text preceding that table says "In the table -below, X is the derived iterator type." Looks like the X:: -qualifiers aren't really needed; X::reference can simply be -reference, since that's defined by the iterator_facade -specialization itself.

- --- - - - - -
Proposed resolution:
 

Remove references to X.

-

In [lib.iterator.facade] operations operator->() const;:

-
-

Change:

-
- --- - - - -
Returns:

If X::reference is a reference type, an object -of type X::pointer equal to:

-
-&static_cast<Derived const*>(this)->dereference()
-
-

Otherwise returns an object of unspecified type such that, -given an object a of type X, a->m is equivalent -to (w = *a, w.m) for some temporary object w of type -X::value_type.

-

The type X::pointer is Value* if -is_writable_iterator<X>::value is true, and -Value const* otherwise.

-
-
-

to:

-
- --- - - - -
Returns:

If reference is a reference type, an object -of type pointer equal to:

-
-&static_cast<Derived const*>(this)->dereference()
-
-

Otherwise returns an object of unspecified type such that, -(*static_cast<Derived const*>(this))->m is equivalent -to (w = **static_cast<Derived const*>(this), w.m) for -some temporary object w of type value_type.

-
-
-

Further changes are covered by issue 9.26.

-
-
-
-
-

9.25 Iterator_facade: wrong return type

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

Several of the member functions return a Derived object or a -Derived&. Their Effects clauses end with:

-
-return *this;
-
-

This should be

-
-return *static_cast<Derived*>(this);
-
- --- - - - - -
Proposed resolution:
 

In [lib.iterator.facade], in the effects clause -of the following operations:

-
-Derived& operator++()
-Derived& operator--()
-Derived& operator+=(difference_type n)
-Derived& operator-=(difference_type n)
-
-
-
Change:
-
return *this
-
to:
-
return *static_cast<Derived*>(this);
-
-
-
-
-

9.26 Iterator_facade: unclear returns clause for operator[]

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The returns clause for operator[](difference_type n) const -says:

-
-Returns: an object convertible to X::reference and holding a copy -p of a+n such that, for a constant object v of type -X::value_type, X::reference(a[n] = v) is equivalent to p = v. -This needs to define 'a', but assuming it's supposed to be -*this (or maybe *(Derived*)this), it still isn't clear -what this says. Presumably, the idea is that you can index off of -an iterator and assign to the result. But why the requirement -that it hold a copy of a+n? Granted, that's probably how it's -implemented, but it seems over-constrained. And the last phrase -seems wrong. p is an iterator; there's no requirement that you -can assign a value_type object to it. Should that be *p = v? -But why the cast in reference(a[n] = v)?
- --- - - - - -
Proposed resolution:
 

In section operator[]:

-
-

Change:

-
-Writable iterators built with iterator_facade implement -the semantics required by the preferred resolution to issue -299 and adopted by proposal n1477: the result of p[n] -is a proxy object containing a copy of p+n, and p[n] = -x is equivalent to *(p + n) = x. This approach will -work properly for any random-access iterator regardless of -the other details of its implementation. A user who knows -more about the implementation of her iterator is free to -implement an operator[] which returns an lvalue in the -derived iterator class; it will hide the one supplied by -iterator_facade from clients of her iterator.
-

to:

-
-Writable iterators built with iterator_facade implement -the semantics required by the preferred resolution to issue -299 and adopted by proposal n1550: the result of p[n] -is an object convertible to the iterator's value_type, -and p[n] = x is equivalent to *(p + n) = x (Note: -This result object may be implemented as a proxy containing a -copy of p+n). This approach will work properly for any -random-access iterator regardless of the other details of its -implementation. A user who knows more about the -implementation of her iterator is free to implement an -operator[] that returns an lvalue in the derived iterator -class; it will hide the one supplied by iterator_facade -from clients of her iterator.
-
-

In [lib.iterator.facade] operations:

-
-

Change:

-
- --- - - - -
Returns:an object convertible to X::reference and -holding a copy p of a+n such that, for a constant -object v of type X::value_type, X::reference(a[n] -= v) is equivalent to p = v.
-
-

to:

-
- --- - - - -
Returns:an object convertible to value_type. For -constant objects v of type value_type, and n of -type difference_type, (*this)[n] = v is equivalent -to *(*this + n) = v, and static_cast<value_type -const&>((*this)[n]) is equivalent to -static_cast<value_type const&>(*(*this + n))
-
-
-
-
-
-

9.27 Iterator_facade: redundant clause

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

operator- has both an effects clause and a returns -clause. Looks like the returns clause should be removed.

- --- - - - - -
Proposed resolution:
 

Remove the returns clause.

-

In [lib.iterator.facade] operations:

-
-
Remove:
-
--- - - - -
Returns:static_cast<Derived const*>(this)->advance(-n);
-
-
-
-
-
-

9.28 indirect_iterator: incorrect specification of default constructor

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The default constructor returns "An instance of indirect_iterator -with a default constructed base object", but the constructor that -takes an Iterator object returns "An instance of indirect_iterator -with the iterator_adaptor subobject copy constructed from x." The -latter is the correct form, since it does not reach inside the base -class for its semantics. So the default constructor shoudl return -"An instance of indirect_iterator with a default-constructed -iterator_adaptor subobject."

- --- - - - - - - -
Proposed resolution:
 
-
Change:
-
--- - - - -
Returns:An instance of indirect_iterator with -a default constructed base object.
-
-
to:
-
--- - - - -
Returns:An instance of indirect_iterator with -a default-constructed m_iterator.
-
-
-
Rationale:Inheritance from iterator_adaptor has been removed, so we instead -give the semantics in terms of the (exposition only) member -m_iterator.
-
-
-

9.29 indirect_iterator: unclear specification of template constructor

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The templated constructor that takes an indirect_iterator with a -different set of template arguments says that it returns "An -instance of indirect_iterator that is a copy of [the argument]". -But the type of the argument is different from the type of the -object being constructed, and there is no description of what -a "copy" means. The Iterator template parameter for the argument -must be convertible to the Iterator template parameter for the type -being constructed, which suggests that the argument's contained -Iterator object should be converted to the target type's Iterator -type. Is that what's meant here? -(Pete later writes: In fact, this problem is present in all of the -specialized adaptors that have a constructor like this: the -constructor returns "a copy" of the argument without saying what a -copy is.)

- --- - - - - - - -
Proposed resolution:
 
-
Change:
-
--- - - - -
Returns:An instance of indirect_iterator that is a copy of y.
-
-
to:
-
--- - - - -
Returns:An instance of indirect_iterator whose -m_iterator subobject is constructed from y.base().
-
-
-
Rationale:Inheritance from iterator_adaptor has been removed, so we -instead give the semantics in terms of the member m_iterator.
-
-
-

9.30 transform_iterator argument irregularity

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

The specialized adaptors that take both a Value and a Reference -template argument all take them in that order, i.e. Value precedes -Reference in the template argument list, with the exception of -transform_iterator, where Reference precedes Value. This seems like -a possible source of confusion. Is there a reason why this order is -preferable?

- --- - - - - - - -
Proposed resolution:
 NAD
Rationale:defaults for Value depend on Reference. A sensible -Value can almost always be computed from Reference. The first -parameter is UnaryFunction, so the argument order is already -different from the other adapters.
-
-
-

9.31 function_output_iterator overconstrained

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

function_output_iterator requirements says: "The UnaryFunction must -be Assignable, Copy Constructible, and the expression f(x) must be -valid, where f is an object of type UnaryFunction and x is an -object of a type accepted by f."

-

Everything starting with "and," somewhat reworded, is actually a -constraint on output_proxy::operator=. All that's needed to create -a function_output_iterator object is that the UnaryFunction type be -Assignable and CopyConstructible. That's also sufficient to -dereference and to increment such an object. It's only when you try -to assign through a dereferenced iterator that f(x) has to work, -and then only for the particular function object that the iterator -holds and for the particular value that is being assigned.

-
-
Addition from Jeremy:
-
The constructor for function_output_iterator is also -slightly overconstrained because it requires -the UnaryFunction to have a default constructor -even when the default constructor of function_output_iterator -is not used.
-
- --- - - - - -
Proposed resolution:
 
-
Change:
-
output_proxy operator*();
-
to:
-
/* see below */ operator*();
-
-

After function_output_iterator& operator++(int); add:

-
-private:
-  UnaryFunction m_f;     // exposition only
-
-
-
Change:
-
The UnaryFunction must be Assignable, Copy Constructible, -and the expression f(x) must be valid, where f is an -object of type UnaryFunction and x is an object of a -type accepted by f. The resulting -function_output_iterator is a model of the Writable and -Incrementable Iterator concepts.
-
to:
-
UnaryFunction must be Assignable and Copy Constructible.
-
-

After the requirements section, add:

-
-
-

function_output_iterator models

-
-function_output_iterator is a model of the Writable and -Incrementable Iterator concepts.
-
-
Change:
-
--- - - - -
Returns:An instance of function_output_iterator with -f stored as a data member.
-
-
to:
-
--- - - - -
Effects:Constructs an instance of function_output_iterator -with m_f constructed from f.
-
-
Change:
-

output_proxy operator*();

- --- - - - -
Returns:An instance of output_proxy constructed with -a copy of the unary function f.
-
-
to:
-

operator*();

- --- - - - -
Returns:An object r of unspecified type such that r = t -is equivalent to m_f(t) for all t.
-
-
Remove:
-

function_output_iterator::output_proxy operations

-

output_proxy(UnaryFunction& f);

- --- - - - -
Returns:An instance of output_proxy with f stored as -a data member.
-

template <class T> output_proxy& operator=(const T& value);

- --- - - - -
Effects:
-m_f(value); 
-return *this; 
-
-
-
-
-

Change:

-
-explicit function_output_iterator(const UnaryFunction& f = UnaryFunction());
-
-

to:

-
-explicit function_output_iterator();
-
-explicit function_output_iterator(const UnaryFunction& f);
-
-
-
-
-

9.32 Should output_proxy really be a named type?

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

This means someone can store an output_proxy object for later use, -whatever that means. It also constrains output_proxy to hold a copy -of the function object, rather than a pointer to the iterator -object. Is all this mechanism really necessary?

- --- - - - - -
Proposed resolution:
 See issue 9.31.
-
-
-

9.33 istreambuf_iterator isn't a Readable Iterator

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

c++std-lib-12333:

-
-N1550 requires that for a Readable Iterator a of type X, *a -returns an object of type -iterator_traits<X>::reference. istreambuf_iterator::operator* -returns charT, but istreambuf_iterator::reference is -charT&. So am I overlooking something, or is -istreambuf_iterator not Readable.
- --- - - - - - - -
Proposed resolution:
 

Remove all constraints on -iterator_traits<X>::reference in Readable Iterator and Lvalue -Iterator. Change Lvalue Iterator to refer to T& instead of -iterator_traits<X>::reference.

-
-
Change:
-
A class or built-in type X models the Readable Iterator -concept for the value type T if the following expressions -are valid and respect the stated semantics. U is the type -of any specified member of type T.
-
to:
-
A class or built-in type X models the Readable Iterator -concept for value type T if, in addition to X being -Assignable and Copy Constructible, the following expressions -are valid and respect the stated semantics. U is the type -of any specified member of type T.
-
-

From the Input Iterator Requirements table, remove:

-
- ----- - - - - - - -
iterator_traits<X>::referenceConvertible to -iterator_traits<X>::value_type 
-
-

Change:

-
- ----- - - - - - - -
*aiterator_traits<X>::referencepre: a is -dereferenceable. If a -== b then *a is -equivalent to *b
-
-

to:

-
- ----- - - - - - - -
*aConvertible to T
-
pre: a is dereferenceable. If a == b then *a
-
is equivalent to *b.
-
-
-
-
-
Change:
-
The Lvalue Iterator concept adds the requirement that the -reference type be a reference to the value type of the -iterator.
-
to:
-
The Lvalue Iterator concept adds the requirement that the -return type of operator* type be a reference to the value -type of the iterator.
-
-

Change:

-
- ----- - - - - - - - - - - - - - - -
Lvalue Iterator Requirements
ExpressionReturn TypeAssertion
iterator_traits<X>::referenceT&T is cv -iterator_traits<X>::value_type -where cv is an optional -cv-qualification
-
-

to:

-
- ----- - - - - - - - - - - - - - - -
Lvalue Iterator Requirements
ExpressionReturn TypeNote/Assertion
*aT&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.
-
-

At the end of the section reverse_iterator models, add: -The type iterator_traits<Iterator>::reference must be the type of -*i, where i is an object of type Iterator.

-
Rationale:

Ideally there should be requirements on the reference -type, however, since Readable Iterator is suppose to correspond -to the current standard iterator requirements (which do not place -requirements on the reference type) we will leave them off for -now. There is a DR in process with respect to the reference type -in the stadard iterator requirements. Once that is resolved we -will revisit this issue for Readable Iterator and Lvalue -Iterator.

-

We added Assignable to the requirements for Readable -Iterator. This is needed to have Readable Iterator coincide with -the capabilities of Input Iterator.

-
-
-
-

9.34 iterator_facade free functions unspecified

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

c++std-lib-12562:

-
-The template functions operator==, operator!=, -operator<, operator<=, operator>, operator>=, and -operator- that take two arguments that are specializations of -iterator_facade have no specification. The template function -operator+ that takes an argument that is a specialization of -iterator_facade and an argument of type difference_type has no -specification.
- --- - - - - -
Proposed resolution:
 

Add the missing specifications.

-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (iterator_facade<Dr,V,TC,R,D> const&,
-                   typename Derived::difference_type n);
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (typename Derived::difference_type n,
-                   iterator_facade<Dr,V,TC,R,D> const&);
-
- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-return tmp += n;
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator ==(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:if is_convertible<Dr2,Dr1>::value, then -lhs.equal(rhs). Otherwise, rhs.equal(lhs).
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator !=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:if is_convertible<Dr2,Dr1>::value, then -!lhs.equal(rhs). Otherwise, !rhs.equal(lhs).
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:if is_convertible<Dr2,Dr1>::value, then -lhs.distance_to(rhs) < 0. Otherwise, rhs.distance_to(lhs) > -0.
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:if is_convertible<Dr2,Dr1>::value, then -lhs.distance_to(rhs) <= 0. Otherwise, rhs.distance_to(lhs) ->= 0.
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:if is_convertible<Dr2,Dr1>::value, then -lhs.distance_to(rhs) > 0. Otherwise, -rhs.distance_to(lhs) < 0.
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:if is_convertible<Dr2,Dr1>::value, then -lhs.distance_to(rhs) >= 0. Otherwise, -rhs.distance_to(lhs) <= 0.
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,difference>::type
-operator -(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - - - -
Return Type:if is_convertible<Dr2,Dr1>::value, then -difference shall be -iterator_traits<Dr1>::difference_type. Otherwise, -difference shall be -iterator_traits<Dr2>::difference_type.
Returns:if is_convertible<Dr2,Dr1>::value, then --lhs.distance_to(rhs). Otherwise, -rhs.distance_to(lhs).
-
-
-
-

9.35 iterator_facade: too many equals?

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

c++std-lib-12563:

-
-

The table listing the functions required for types derived from -iterator_facade has two functions named equal and two named -distance_to:

-
-c.equal(b)
-c.equal(y)
-c.distance_to(b)
-c.distance_to(z)
-
-

where b and c are const objects of the derived type, y and z are -constant objects of certain iterator types that are interoperable -with the derived type. Seems like the 'b' versions are -redundant: in both cases, the other version will take a 'b'. In -fact, iterator_adaptor is specified to use iterator_facade, but -does not provide the 'b' versions of these functions.

-

Are the 'b' versions needed?

-
- --- - - - - -
Proposed resolution:
 

Remove the 'b' versions.

-

In iterator_facade requirements, remove:

-
- ------ - - - - - - - -
c.equal(b)convertible to booltrue iff b and c are -equivalent.Single Pass Iterator
-
-

and remove:

-
- ------ - - - - - - - -
c.distance_to(b)convertible to -X::difference_typeequivalent to distance(c, b)Random Access Traversal -Iterator
-
-
-
-
-

9.36 iterator_facade function requirements

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

c++std-lib-12636:

-
-

The table that lists required functions for the derived type X -passed to iterator_facade lists, among others:

-

for a single pass iterator:

-
-c.equal(b)
-c.equal(y)
-
-

where b and c are const X objects, and y is a const object of a -single pass iterator that is interoperable with X. Since X is -interoperable with itself, c.equal(b) is redundant. There is a -difference in their descriptions, but its meaning isn't -clear. The first is "true iff b and c are equivalent", and the -second is "true iff c and y refer to the same position." Is there -a difference between the undefined term "equivalent" and "refer -to the same position"?

-

Similarly, for a random access traversal iterator:

-
-c.distance_to(b)
-c.distance_to(z)
-
-

where z is a constant object of a random access traversal -iterator that is interoperable with X. Again, X is interoperable -with itself, so c.distance_to(b) is redundant. Also, the -specification for c.distance_to(z) isn't valid. It's written -as "equivalent to distance(c, z)". The template function distance -takes two arguments of the same type, so distance(c, z) isn't -valid if c and z are different types. Should it be -distance(c, (X)z)?

-
- --- - - - - -
Proposed resolution:
 

Removed the 'b' versions (see 9.35) and added the cast.

-

Change:

-
- ------ - - - - - - - -
c.distance_to(z)convertible to -X::difference_typeequivalent to distance(c, z). -Implements c - z, c < z, c -<= z, c > z, and c >= c.Random Access Traversal -Iterator
-
-

to:

-
- ------ - - - - - - - -
c.distance_to(z)convertible to -F::difference_typeequivalent to -distance(c, X(z)).Random Access Traversal -Iterator
-
-
-
-
-
-

More Issues (not from Matt's list)

-
-

9.37x Inheritance in iterator_adaptor and other adaptors is an overspecification

- --- - - - - - -
Submitter:Pete Becker
Status:New
-

c++std-lib-12696: -The paper requires that iterator_adaptor be derived from an -appropriate instance of iterator_facade, and that most of the specific -forms of adaptors be derived from appropriate instances of -iterator_adaptor. That seems like overspecification, and we ought to -look at specifying these things in terms of what the various templates -provide rather than how they're implemented.

- --- - - - - -
Proposed resolution:
 

Remove the specfication of inheritance, and add explicit -specification of all the functionality that was inherited from the -specialized iterators.

-

In iterator_adaptor, inheritance is retained, sorry NAD. Also, -the Interoperable Iterators concept is added to the new iterator -concepts, and this concept is used in the specification of the -iterator adaptors.

-

In n1550, after [lib.random.access.traversal.iterators], add:

-
-

Interoperable Iterators [lib.interoperable.iterators]

-

A class or built-in type X that models Single Pass Iterator -is interoperable with a class or built-in type Y that -also models Single Pass Iterator if the following expressions -are valid and respect the stated semantics. In the tables -below, x is an object of type X, y is an object of -type Y, Distance is -iterator_traits<Y>::difference_type, and n represents a -constant object of type Distance.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeAssertion/Precondition/Postcondition
y = xYpost: y == x
Y(x)Ypost: Y(x) == x
x == yconvertible to bool== is an equivalence relation over its domain.
y == xconvertible to bool== is an equivalence relation over its domain.
x != yconvertible to boolbool(a==b) != bool(a!=b) over its domain.
y != xconvertible to boolbool(a==b) != bool(a!=b) over its domain.
-

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

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeOperational SemanticsAssertion/ Precondition
x < yconvertible to booly - x > 0< is a total ordering relation
y < xconvertible to boolx - y > 0< is a total ordering relation
x > yconvertible to booly < x> is a total ordering relation
y > xconvertible to boolx < y> is a total ordering relation
x >= yconvertible to bool!(x < y) 
y >= xconvertible to bool!(y < x) 
x <= yconvertible to bool!(x > y) 
y <= xconvertible to bool!(y > x) 
y - xDistancedistance(Y(x),y)pre: there exists a value n of -Distance such that x + n == y. -y == x + (y - x).
x - yDistancedistance(y,Y(x))pre: there exists a value n of -Distance such that y + n == x. -x == y + (x - y).
-
-

In N1530:

-
-

In [lib.iterator.adaptor]

-

Change:

-
-class iterator_adaptor 
-  : public iterator_facade<Derived, /* see details ...*/>
-
-

To:

-
-class iterator_adaptor 
-  : public iterator_facade<Derived, *V'*, *C'*, *R'*, *D'*> // see details
-
-
-
Change the text from:
-
The Base type must implement the expressions involving -m_iterator in the specifications...
-
until the end of the iterator_adaptor requirements section, to:
-
The Base argument shall be Assignable and Copy Constructible.
-
-

Add:

-
-
-
-

iterator_adaptor base class parameters

-
-

The V', C', R', and D' parameters of the iterator_facade -used as a base class in the summary of iterator_adaptor -above are defined as follows:

-
-V' = if (Value is use_default)
-          return iterator_traits<Base>::value_type
-      else
-          return Value
-
-C' = if (CategoryOrTraversal is use_default)
-          return iterator_traversal<Base>::type
-      else
-          return CategoryOrTraversal
-
-R' = if (Reference is use_default)
-          if (Value is use_default)
-              return iterator_traits<Base>::reference
-          else
-              return Value&
-      else
-          return Reference
-
-D' = if (Difference is use_default)
-          return iterator_traits<Base>::difference_type
-      else
-          return Difference
-
-
-

In [lib.iterator.special.adaptors]

-

Change:

-
-class indirect_iterator
-  : public iterator_adaptor</* see discussion */>
-{
-    friend class iterator_core_access;
-
-

to:

-
-class indirect_iterator
-{
- public:
-    typedef /* see below */ value_type;
-    typedef /* see below */ reference;
-    typedef /* see below */ pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-

Change:

-
-private: // as-if specification
-    typename indirect_iterator::reference dereference() const
-    {
-        return **this->base();
-    }
-
-

to:

-
-    Iterator const& base() const;
-    reference operator*() const;
-    indirect_iterator& operator++();
-    indirect_iterator& operator--();
-private:
-   Iterator m_iterator; // exposition
-
-

After the synopsis add:

-
-

The member types of indirect_iterator are defined -according to the following pseudo-code, where V is -iterator_traits<Iterator>::value_type

-
-if (Value is use_default) then
-    typedef remove_const<pointee<V>::type>::type value_type;
-else
-    typedef remove_const<Value>::type value_type;
-
-if (Reference is use_default) then
-    if (Value is use_default) then
-        typedef indirect_reference<V>::type reference;
-    else
-        typedef Value& reference;
-else
-    typedef Reference reference;
-
-if (Value is use_default) then 
-    typedef pointee<V>::type* pointer;
-else 
-    typedef Value* pointer;
-
-if (Difference is use_default)
-    typedef iterator_traits<Iterator>::difference_type difference_type;
-else
-    typedef Difference difference_type;
-
-if (CategoryOrTraversal is use_default)
-    typedef iterator-category(
-        iterator_traversal<Iterator>::type,``reference``,``value_type``
-    ) iterator_category;
-else
-    typedef iterator-category(
-        CategoryOrTraversal,``reference``,``value_type``
-    ) iterator_category;
-
-
-

[Note: See resolution to 9.44y for a description of pointee and -indirect_reference]

-

After the requirements section, add:

-
-
-

indirect_iterator models

-
-

In addition to the concepts indicated by iterator_category -and by iterator_traversal<indirect_iterator>::type, a -specialization of indirect_iterator models the following -concepts, Where v is an object of -iterator_traits<Iterator>::value_type:

-
-
    -
  • Readable Iterator if reference(*v) is convertible to -value_type.
  • -
  • Writable Iterator if reference(*v) = t is a valid -expression (where t is an object of type -indirect_iterator::value_type)
  • -
  • Lvalue Iterator if reference is a reference type.
  • -
-
-

indirect_iterator<X,V1,C1,R1,D1> is interoperable with -indirect_iterator<Y,V2,C2,R2,D2> if and only if X is -interoperable with Y.

-
-

Before indirect_iterator(); add:

-
-In addition to the operations required by the concepts described -above, specializations of indirect_iterator provide the -following operations.
-
-
Change:
-
--- - - - -
Returns:An instance of indirect_iterator with -the iterator_adaptor subobject copy constructed from x.
-
-
to:
-
--- - - - -
Returns:An instance of indirect_iterator with -m_iterator copy constructed from x.
-
-
-

At the end of the indirect_iterator operations add:

-
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:**m_iterator
-

indirect_iterator& operator++();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-

indirect_iterator& operator--();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-
-

Change:

-
-template <class Iterator>
-class reverse_iterator :
-  public iterator_adaptor< reverse_iterator<Iterator>, Iterator >
-{
-  friend class iterator_core_access;
-
-

to:

-
-template <class Iterator>
-class reverse_iterator
-{
-public:
-  typedef iterator_traits<Iterator>::value_type value_type;
-  typedef iterator_traits<Iterator>::reference reference;
-  typedef iterator_traits<Iterator>::pointer pointer;
-  typedef iterator_traits<Iterator>::difference_type difference_type;
-  typedef /* see below */ iterator_category;
-
-

Change:

-
-private: // as-if specification
-  typename reverse_iterator::reference dereference() const { return *prior(this->base()); }
-
-  void increment() { --this->base_reference(); }
-  void decrement() { ++this->base_reference(); }
-
-  void advance(typename reverse_iterator::difference_type n)
-  {
-      this->base_reference() += -n;
-  }
-
-  template <class OtherIterator>
-  typename reverse_iterator::difference_type
-  distance_to(reverse_iterator<OtherIterator> const& y) const
-  {
-      return this->base_reference() - y.base();
-  }
-
-

to:

-
-  Iterator const& base() const;
-  reference operator*() const;
-  reverse_iterator& operator++();
-  reverse_iterator& operator--();
-private:
-  Iterator m_iterator; // exposition
-
-
-
After the synopsis for reverse_iterator, add:
-
If Iterator models Random Access Traversal Iterator and Readable -Lvalue Iterator, then iterator_category is convertible to -random_access_iterator_tag. Otherwise, if -Iterator models Bidirectional Traversal Iterator and Readable -Lvalue Iterator, then iterator_category is convertible to -bidirectional_iterator_tag. Otherwise, iterator_category is -convertible to input_iterator_tag.
-
Change:
-

reverse_iterator requirements

-

The base Iterator must be a model of Bidirectional Traversal -Iterator. The resulting reverse_iterator will be a model of the -most refined standard traversal and access concepts that are modeled -by Iterator.

-
-
to:
-

reverse_iterator requirements

-

Iterator must be a model of Bidirectional Traversal Iterator.

-
-
-
-
-

reverse_iterator models

-
-

A specialization of reverse_iterator models the same iterator -traversal and iterator access concepts modeled by its Iterator -argument. In addition, it may model old iterator concepts -specified in the following table:

- ---- - - - - - - - - - - - - - - - - - - - -
If I modelsthen reverse_iterator<I> models
Readable Lvalue Iterator, -Bidirectional Traversal IteratorBidirectional Iterator
Writable Lvalue Iterator, -Bidirectional Traversal IteratorMutable Bidirectional Iterator
Readable Lvalue Iterator, -Random Access Traversal IteratorRandom Access Iterator
Writable Lvalue Iterator, -Random Access Traversal IteratorMutable Random Access Iterator
-

reverse_iterator<X> is interoperable with -reverse_iterator<Y> if and only if X is interoperable with -Y.

-
-
-
Change:
-
--- - - - -
Returns:An instance of reverse_iterator with a -default constructed base object.
-
-
to:
-
--- - - - -
Effects:Constructs an instance of reverse_iterator with m_iterator -default constructed.
-
-
Change:
-
--- - - - -
Effects:Constructs an instance of reverse_iterator with a -base object copy constructed from x.
-
-
to:
-
--- - - - -
Effects:Constructs an instance of reverse_iterator with a -m_iterator constructed from x.
-
-
Change:
-
--- - - - -
Returns:An instance of reverse_iterator that is a copy of r.
-
-
to:
-
--- - - - -
Effects:Constructs instance of reverse_iterator whose -m_iterator subobject is constructed from y.base().
-
-
At the end of the operations for reverse_iterator, add:
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Effects:
-
-Iterator tmp = m_iterator;
-return *--tmp;
-
-

reverse_iterator& operator++();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-

reverse_iterator& operator--();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-
-
-

Change:

-
-class transform_iterator
-  : public iterator_adaptor</* see discussion */>
-{
-  friend class iterator_core_access;
-
-

to:

-
-class transform_iterator
-{
-public:
-  typedef /* see below */ value_type;
-  typedef /* see below */ reference;
-  typedef /* see below */ pointer;
-  typedef iterator_traits<Iterator>::difference_type difference_type;
-  typedef /* see below */ iterator_category;
-
-

After UnaryFunction functor() const; add:

-
-Iterator const& base() const;
-reference operator*() const;
-transform_iterator& operator++();
-transform_iterator& operator--();
-
-

Change:

-
-private:
-  typename transform_iterator::value_type dereference() const;
-  UnaryFunction m_f;
-};
-
-

to:

-
-private:
-  Iterator m_iterator; // exposition only
-  UnaryFunction m_f;   // exposition only
-};
-
-
-
After the synopsis, add:
-
If Iterator models Readable Lvalue Iterator and if Iterator -models Random Access Traversal Iterator, then iterator_category is -convertible to random_access_iterator_tag. Otherwise, if -Iterator models Bidirectional Traversal Iterator, then -iterator_category is convertible to -bidirectional_iterator_tag. Otherwise iterator_category is -convertible to forward_iterator_tag. If Iterator does not -model Readable Lvalue Iterator then iterator_category is -convertible to input_iterator_tag.
-
In the requirements section, change:
-

The type Iterator must at least model Readable Iterator. The -resulting transform_iterator models the most refined of the -following that is also modeled by Iterator.

-
-
    -
  • Writable Lvalue Iterator if -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type -is a non-const reference.
  • -
  • Readable Lvalue Iterator if -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type -is a const reference.
  • -
  • Readable Iterator otherwise.
  • -
-
-

The transform_iterator models the most refined standard traversal -concept that is modeled by Iterator.

-

The reference type of transform_iterator is -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type. -The value_type is remove_cv<remove_reference<reference> >::type.

-
-
to:
-
The argument Iterator shall model Readable Iterator.
-
-

After the requirements section, add:

-
-
-

transform_iterator models

-
-

The resulting transform_iterator models the most refined of the -following options that is also modeled by Iterator.

-
-
    -
  • Writable Lvalue Iterator if -transform_iterator::reference is a non-const -reference.
  • -
  • Readable Lvalue Iterator if -transform_iterator::reference is a const reference.
  • -
  • Readable Iterator otherwise.
  • -
-
-

The transform_iterator models the most refined standard traversal -concept that is modeled by the Iterator argument.

-

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.

- ---- - - - - - - - - - - - - - - - - - - - -
If Iterator modelsthen transform_iterator models
Single Pass IteratorInput Iterator
Forward Traversal IteratorForward Iterator
Bidirectional Traversal IteratorBidirectional Iterator
Random Access Traversal IteratorRandom Access Iterator
-

If transform_iterator models Writable Lvalue Iterator then it is a -mutable iterator (as defined in the old iterator requirements).

-

transform_iterator<F1, X, R1, V1> is interoperable with -transform_iterator<F2, Y, R2, V2> if and only if X is -interoperable with Y.

-
-

Remove the private operations section heading and remove:

-
-``typename transform_iterator::value_type dereference() const;``
-
-:Returns: ``m_f(transform_iterator::dereference());``
-
-

After the entry for functor(), add:

-
-``Iterator const& base() const;``
-
-:Returns: ``m_iterator``
-
-
-``reference operator*() const;``
-
-:Returns: ``m_f(*m_iterator)``
-
-
-``transform_iterator& operator++();``
-
-:Effects: ``++m_iterator``
-:Returns: ``*this``
-
-
-``transform_iterator& operator--();``
-
-:Effects: ``--m_iterator``
-:Returns: ``*this``
-
-

Change:

-
-template <class Predicate, class Iterator>
-class filter_iterator
-   : public iterator_adaptor<
-         filter_iterator<Predicate, Iterator>, Iterator
-       , use_default
-       , /* see details */
-     >
-{
- public:
-
-

to:

-
-template <class Predicate, class Iterator>
-class filter_iterator
-{
- public:
-   typedef iterator_traits<Iterator>::value_type value_type;
-   typedef iterator_traits<Iterator>::reference reference;
-   typedef iterator_traits<Iterator>::pointer pointer;
-   typedef iterator_traits<Iterator>::difference_type difference_type;
-   typedef /* see below */ iterator_category;
-
-

Change:

-
-private: // as-if specification
-   void increment()
-   {
-       ++(this->base_reference());
-       satisfy_predicate();
-   }
-
-   void satisfy_predicate()
-   {
-       while (this->base() != this->m_end && !this->m_predicate(*this->base()))
-           ++(this->base_reference());
-   }
-
-   Predicate m_predicate;
-   Iterator m_end;
-
-

to:

-
-    Iterator const& base() const;
-    reference operator*() const;
-    filter_iterator& operator++();
-private:
-    Predicate m_pred; // exposition only
-    Iterator m_iter;  // exposition only
-    Iterator m_end;   // exposition only
-
-
-
Change:
-
The base Iterator parameter must be a model of Readable -Iterator and Single Pass Iterator. The resulting -filter_iterator will be a model of Forward Traversal Iterator -if Iterator is, otherwise the filter_iterator will be a -model of Single Pass Iterator. The access category of the -filter_iterator will be the same as the access category of -Iterator.
-
to:
-
The Iterator argument shall meet the requirements of Readable -Iterator and Single Pass Iterator or it shall meet the requirements of -Input Iterator.
-
-

After the requirements section, add:

-
-
-

filter_iterator models

-
-

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

- ---- - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Single Pass IteratorSingle Pass Iterator
Forward Traversal IteratorForward Traversal Iterator
- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable IteratorReadable Iterator
Writable IteratorWritable Iterator
Lvalue IteratorLvalue Iterator
- ---- - - - - - - - - - - - - - - - - -
If Iterator modelsthen filter_iterator models
Readable Iterator, Single Pass IteratorInput Iterator
Readable Lvalue Iterator, Forward Traversal IteratorForward Iterator
Writable Lvalue Iterator, Forward Traversal IteratorMutable Forward Iterator
-

filter_iterator<P1, X> is interoperable with filter_iterator<P2, Y> -if and only if X is interoperable with Y.

-
-
-
Change:
-
--- - - - -
Returns:a filter_iterator whose -predicate is a default constructed Predicate and -whose end is a default constructed Iterator.
-
-
to:
-
--- - - - -
Effects:Constructs a filter_iterator whose``m_pred``, m_iter, and m_end -members are a default constructed.
-
-
Change:
-
--- - - - -
Returns:A filter_iterator at position x that filters according -to predicate f and that will not increment past end.
-
-
to:
-
--- - - - -
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that f(*m_iter) == true -or else``m_iter == end``. The member m_pred is constructed from -f and m_end from end.
-
-
Change:
-
--- - - - -
Returns:A filter_iterator at position x that filters -according to a default constructed Predicate -and that will not increment past end.
-
-
to:
-
--- - - - -
Effects:Constructs a filter_iterator where m_iter is either -the first position in the range [x,end) such that m_pred(*m_iter) == true -or else``m_iter == end``. The member m_pred is default constructed.
-
-
Change:
-
--- - - - -
Returns:A copy of iterator t.
-
-
to:
-
--- - - - -
Effects:Constructs a filter iterator whose members are copied from t.
-
-
Change:
-
--- - - - -
Returns:A copy of the predicate object used to construct *this.
-
-
to:
-
--- - - - -
Returns:m_pred
-
-
Change:
-
--- - - - -
Returns:The object end used to construct *this.
-
-
to:
-
--- - - - -
Returns:m_end
-
-
-

At the end of the operations section, add:

-
-

reference operator*() const;

- --- - - - -
Returns:*m_iter
-

filter_iterator& operator++();

- --- - - - - - -
Effects:Increments m_iter and then continues to -increment m_iter until either m_iter == m_end -or m_pred(*m_iter) == true.
Returns:*this
-
-

Change:

-
-class counting_iterator
-  : public iterator_adaptor<
-        counting_iterator<Incrementable, Access, Traversal, Difference>
-      , Incrementable
-      , Incrementable
-      , Access
-      , /* see details for traversal category */
-      , Incrementable const&
-      , Incrementable const*
-      , /* distance = Difference or a signed integral type */>
-{
-    friend class iterator_core_access;
- public:
-
-

to:

-
-class counting_iterator
-{
- public:
-    typedef Incrementable value_type;
-    typedef const Incrementable& reference;
-    typedef const Incrementable* pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-
-

Change:

-
-private:
-    typename counting_iterator::reference dereference() const
-    {
-        return this->base_reference();
-    }
-
-

to:

-
-    Incrementable const& base() const;
-    reference operator*() const;
-    counting_iterator& operator++();
-    counting_iterator& operator--();
-private:
-    Incrementable m_inc; // exposition
-
-

After the synopsis, add:

-
-

If the Difference argument is use_default then -difference_type is an unspecified signed integral -type. Otherwise difference_type is Difference.

-

iterator_category is determined according to the following -algorithm:

-
-if (CategoryOrTraversal is not use_default)
-    return CategoryOrTraversal
-else if (numeric_limits<Incrementable>::is_specialized)
-    return iterator-category(
-        random_access_traversal_tag, Incrementable, const Incrementable&)
-else
-    return iterator-category(
-         iterator_traversal<Incrementable>::type, 
-         Incrementable, const Incrementable&)
-
-
-
-
Change:
-
-
[Note: implementers are encouraged to provide an implementation of
-
distance_to and a difference_type that avoids overflows in -the cases when the Incrementable type is a numeric type.]
-
-
-
to:
-
-
[Note: implementers are encouraged to provide an implementation of
-
operator- and a difference_type that avoid overflows in -the cases where std::numeric_limits<Incrementable>::is_specialized -is true.]
-
-
-
Change:
-

The Incrementable type must be Default Constructible, Copy -Constructible, and Assignable. The default distance is -an implementation defined signed integegral type.

-

The resulting counting_iterator models Readable Lvalue Iterator.

-
-
to:
-
The Incrementable argument shall be Copy Constructible and Assignable.
-
Change:
-
Furthermore, if you wish to create a counting iterator that is a Forward -Traversal Iterator, then the following expressions must be valid:
-
to:
-
If iterator_category is convertible to forward_iterator_tag -or forward_traversal_tag, the following must be well-formed:
-
Change:
-
If you wish to create a counting iterator that is a -Bidirectional Traversal Iterator, then pre-decrement is also required:
-
to:
-
If iterator_category is convertible to -bidirectional_iterator_tag or bidirectional_traversal_tag, -the following expression must also be well-formed:
-
Change:
-
If you wish to create a counting iterator that is a Random Access -Traversal Iterator, then these additional expressions are also -required:
-
to:
-
If iterator_category is convertible to -random_access_iterator_tag or random_access_traversal_tag, -the following must must also be valid:
-
-

After the requirements section, add:

-
-
-

counting_iterator models

-
-

Specializations of counting_iterator model Readable Lvalue -Iterator. In addition, they model the concepts corresponding to the -iterator tags to which their iterator_category is convertible. -Also, if CategoryOrTraversal is not use_default then -counting_iterator models the concept corresponding to the iterator -tag CategoryOrTraversal. Otherwise, if -numeric_limits<Incrementable>::is_specialized, then -counting_iterator models Random Access Traversal Iterator. -Otherwise, counting_iterator models the same iterator traversal -concepts modeled by Incrementable.

-

counting_iterator<X,C1,D1> is interoperable with -counting_iterator<Y,C2,D2> if and only if X is -interoperable with Y.

-
-

At the begining of the operations section, add:

-
-In addition to the operations required by the concepts modeled by -counting_iterator, counting_iterator provides the following -operations.
-
-
Change:
-
--- - - - -
Returns:A default constructed instance of counting_iterator.
-
-
to:
-
--- - - - - - -
Requires:Incrementable is Default Constructible.
Effects:Default construct the member m_inc.
-
-
Change:
-
--- - - - -
Returns:An instance of counting_iterator that is a copy of rhs.
-
-
to:
-
--- - - - -
Effects:Construct member m_inc from rhs.m_inc.
-
-
Change:
-
--- - - - -
Returns:An instance of counting_iterator with its base -object copy constructed from x.
-
-
to:
-
--- - - - -
Effects:Construct member m_inc from x.
-
-
-

At the end of the operations section, add:

-
-

reference operator*() const;

- --- - - - -
Returns:m_inc
-

counting_iterator& operator++();

- --- - - - - - -
Effects:++m_inc
Returns:*this
-

counting_iterator& operator--();

- --- - - - - - -
Effects:--m_inc
Returns:*this
-

Incrementable const& base() const;

- --- - - - -
Returns:m_inc
-
-
-
-
-

9.38x Problem with specification of a->m in Readable Iterator

- --- - - - - - -
Submitter:Howard Hinnant
Status:New
-

c++std-lib-12585:

-

Readable Iterator Requirements says:

-
- ----- - - - - - - -
a->mU&pre: (*a).m is well-defined. Equivalent to (*a).m
-
-

Do we mean to outlaw iterators with proxy references from meeting -the readable requirements?

-

Would it be better for the requirements to read static_cast<T>(*a).m -instead of (*a).m ?

- --- - - - - - - -
Proposed resolution:
 NAD.
Rationale:

We think you're misreading "pre:". -If (*a).m is not well defined, then the iterator is not -required to provide a->m. So a proxy iterator is not -required to provide a->m.

-

As an aside, it is possible for proxy iterators to -support ->, so changing the requirements to -read static_cast<T>(*a).m is interesting. -However, such a change to Readable Iterator would -mean that it no longer corresponds to the -input iterator requirements. So old iterators would not -necessarily conform to new iterator requirements.

-
-
-
-

9.39x counting_iterator Traversal argument unspecified

- --- - - - -
Submitter:Pete Becker
-

c++std-lib-12635:

-

counting_iterator takes an argument for its Traversal type, with a -default value of use_default. It is derived from an instance of -iterator_adaptor, where the argument passed for the Traversal type -is described as "/* see details for traversal category -*/". The details for counting_iterator describe constraints on -the Incrementable type imposed by various traversal -categories. There is no description of what the argument to -iterator_adaptor should be.

- --- - - - - -
Proposed resolution:
 We no longer inherit from iterator_adaptor. So instead, -we specify the iterator_category in terms of the Traversal type -(which is now called CategoryOrTraversal). Also the -requirements and models section was reorganized to -match these changes and to make more sense.
-
-
-

9.40x indirect_iterator requirements muddled

- --- - - - -
Submitter:Pete Becker
-

c++std-lib-12640:

-
-
-The value_type of the Iterator template parameter should itself -be dereferenceable. The return type of the operator* for -the value_type must be the same type as the Reference template -parameter.
-

I'd say this a bit differently, to emphasize what's required: -iterator_traits<Iterator>::value_type must be dereferenceable. -The Reference template parameter must be the same type as -*iterator_traits<Iterator>::value_type().

-
-The Value template parameter will be the value_type for the -indirect_iterator, unless Value is const. If Value is const X, then -value_type will be non- const X.
-

Also non-volatile, right? In other words, if Value isn't use_default, it -just gets passed as the Value argument for iterator_adaptor.

-
-

The default for Value is:

-
-iterator_traits< iterator_traits<Iterator>::value_type >::value_type
-
-

If the default is used for Value, then there must be a valid -specialization of iterator_traits for the value type of the -base iterator.

-
-

The earlier requirement is that -iterator_traits<Iterator>::value_type must be -dereferenceable. Now it's being treated as an iterator. Is this -just a pun, or is iterator_traits<Iterator>::value_type -required to be some form of iterator? If it's the former we need -to find a different way to say it. If it's the latter we need to -say so.

-
- --- - - - - - - -
Proposed resolution:
 

Change:

-
-

The value_type of the Iterator template parameter -should itself be dereferenceable. The return type of the -operator* for the value_type must be the same type as -the Reference template parameter. The Value template -parameter will be the value_type for the -indirect_iterator, unless Value is const. If Value -is const X, then value_type will be non- const X. -The default for Value is:

-
-iterator_traits< iterator_traits<Iterator>::value_type >::value_type
-
-

If the default is used for Value, then there must be a -valid specialization of iterator_traits for the value type -of the base iterator.

-

The Reference parameter will be the reference type of the -indirect_iterator. The default is Value&.

-

The Access and Traversal parameters are passed -unchanged to the corresponding parameters of the -iterator_adaptor base class, and the Iterator parameter -is passed unchanged as the Base parameter to the -iterator_adaptor base class.

-
-

to:

-
-
-The expression *v, where v is an object of -iterator_traits<Iterator>::value_type, shall be valid -expression and convertible to reference. Iterator -shall model the traversal concept indicated by -iterator_category. Value, Reference, and -Difference shall be chosen so that value_type, -reference, and difference_type meet the requirements -indicated by iterator_category.
-

[Note: there are further requirements on the -iterator_traits<Iterator>::value_type if the Value -parameter is not use_default, as implied by the algorithm -for deducing the default for the value_type member.]

-
-
Rationale:Not included above is the specification of the -value_type, reference, etc., members, which is handled by -the changes in 9.37x.
-
-
-

9.41x Problem with transform_iterator requirements

- --- - - - -
Submitter:Pete Becker
-

c++std-lib-12641:

-
-The reference type of transform_iterator is result_of< -UnaryFunction(iterator_traits<Iterator>::reference) ->::type. The value_type is -remove_cv<remove_reference<reference> >::type.
-

These are the defaults, right? If the user supplies their own types -that's what gets passed to iterator_adaptor. And again, the -specification should be in terms of the specialization of -iterator_adaptor, and not in terms of the result:

-

Reference argument to iterator_adaptor:

-
-if (Reference != use_default)
-    Reference
-else
-    result_of<
-        UnaryFunction(iterator_traits<Iterator>::reference)
-    >::type
-
-

Value argument to iterator_adaptor:

-
-if (Value != use_default)
-    Value
-else if (Reference != use_default)
-    remove_reference<reference>::type
-else
-    remove_reference<
-        result_of<
-            UnaryFunction(iterator_traits<Iterator>::reference)
-        >::type
-    >::type
-
-

There's probably a better way to specify that last alternative, but -I've been at this too long, and it's all turning into a maze of -twisty passages, all alike.

- --- - - - - -
Proposed resolution:
 

Replace:

-
-The reference type of transform_iterator is result_of< -UnaryFunction(iterator_traits<Iterator>::reference) ->::type. The value_type is -remove_cv<remove_reference<reference> >::type.
-

with:

-
-

If Reference is use_default then the reference -member of transform_iterator is result_of< -UnaryFunction(iterator_traits<Iterator>::reference) ->::type. Otherwise, reference is Reference.

-

If Value is use_default then the value_type -member is remove_cv<remove_reference<reference> >::type. -Otherwise, value_type is Value.

-
-
-
-
-

9.42x filter_iterator details unspecified

- --- - - - -
Submitter:Pete Becker
-

c++std-lib-12642:

-

The paper says:

-
-template<class Predicate, class Iterator>
-class filter_iterator
-     : public iterator_adaptor<
-         filter_iterator<Predicate, Iterator>,
-         Iterator,
-         use_default,
-         /* see details */ >
-
-

That comment covers the Access, Traversal, Reference, and Difference -arguments. The only specification for any of these in the details is:

-
-The access category of the filter_iterator will be the same as -the access category of Iterator.
-

Needs more.

- --- - - - - -
Proposed resolution:
 

Add to the synopsis:

-
-typedef iterator_traits<Iterator>::value_type value_type;
-typedef iterator_traits<Iterator>::reference reference;
-typedef iterator_traits<Iterator>::pointer pointer;
-typedef iterator_traits<Iterator>::difference_type difference_type;
-typedef /* see below */ iterator_category;
-
-

and add just after the synopsis:

-
-If Iterator models Readable Lvalue Iterator and Forward -Traversal Iterator then iterator_category is convertible -to std::forward_iterator_tag. Otherwise -iterator_category is convertible to -std::input_iterator_tag.
-
-
-
-

9.43x transform_iterator interoperability too restrictive

- --- - - - -
Submitter:Jeremy Siek
-

We do not need to require that the function objects have the same -type, just that they be convertible.

- --- - - - - -
Proposed resolution:
 

Change:

-
-template<class OtherIterator, class R2, class V2>
-transform_iterator(
-      transform_iterator<UnaryFunction, OtherIterator, R2, V2> const& t
-    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-);
-
-

to:

-
-template<class F2, class I2, class R2, class V2>
-transform_iterator(
-      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
-);
-
-
-
-
-

9.44y indirect_iterator and smart pointers

- --- - - - -
Submitter:Dave Abrahams
-

indirect_iterator should be able to iterate over containers of -smart pointers, but the mechanism that allows it was left out of -the specification, even though it's present in the Boost -specification

- --- - - - - -
Proposed resolution:
 

Add pointee and indirect_reference -to deal with this capability.

-

In [lib.iterator.helper.synopsis], add:

-
-template <class Dereferenceable>
-struct pointee;
-
-template <class Dereferenceable>
-struct indirect_reference;
-
-

After indirect_iterator's abstract, add:

-
-
-

Class template pointee

- - - -
-template <class Dereferenceable>
-struct pointee
-{
-    typedef /* see below */ type;
-};
-
- --- - - - -
Requires:For an object x of type Dereferenceable, *x -is well-formed. If ++x is ill-formed it shall neither be -ambiguous nor shall it violate access control, and -Dereferenceable::element_type shall be an accessible type. -Otherwise iterator_traits<Dereferenceable>::value_type shall -be well formed. [Note: These requirements need not apply to -explicit or partial specializations of pointee]
-

type is determined according to the following algorithm, where -x is an object of type Dereferenceable:

-
-if ( ++x is ill-formed )
-{
-    return ``Dereferenceable::element_type``
-}
-else if (``*x`` is a mutable reference to
-         std::iterator_traits<Dereferenceable>::value_type)
-{
-    return iterator_traits<Dereferenceable>::value_type
-}
-else
-{
-    return iterator_traits<Dereferenceable>::value_type const
-}
-
-
-
-

Class template indirect_reference

- - - -
-template <class Dereferenceable>
-struct indirect_reference
-{
-    typedef /* see below */ type;
-};
-
- --- - - - -
Requires:For an object x of type Dereferenceable, *x -is well-formed. If ++x is ill-formed it shall neither be -ambiguous nor shall it violate access control, and -pointee<Dereferenceable>::type& shall be well-formed. -Otherwise iterator_traits<Dereferenceable>::reference shall -be well formed. [Note: These requirements need not apply to -explicit or partial specializations of indirect_reference]
-

type is determined according to the following algorithm, where -x is an object of type Dereferenceable:

-
-if ( ++x is ill-formed )
-    return ``pointee<Dereferenceable>::type&``
-else
-    std::iterator_traits<Dereferenceable>::reference
-
-
-

See proposed resolution to Issue 9.37x for more changes related to -this issue.

-
-
-

9.45y N1530: Typos and editorial changes in proposal text (not standardese)

- --- - - - -
Submitter:Dave Abrahams
-
    -
  1. "because specification helps to highlight that the Reference -template parameter may not always be identical to the iterator's -reference type, and will keep users making mistakes based on -that assumption."

    - --- - - - - -
    Proposed resolution:
     

    add "from" before "making"

    -
    -
  2. -
  3. mention of obsolete projection_iterator

    -
  4. -
-
- --- - - - - - - -
Proposed Resolution:
 

From n1530, in the Specialized Adaptors section, remove:

-
-projection_iterator, which is similar to transform_iterator -except that when dereferenced it returns a reference instead of -a value.
-
Rationale:This iterator was in the original boost library, but the new -iterator concepts allowed this iterator to be -folded into transform_iterator.
-
-
-
-

9.46y N1530: base() return-by-value is costly

- --- - - - -
Submitter:Dave Abrahams
-

We've had some real-life reports that iterators that use -iterator_adaptor's base() function can be inefficient -when the Base iterator is expensive to copy. Iterators, of -all things, should be efficient.

- --- - - - - -
Proposed resolution:
 

In [lib.iterator.adaptor]

-

Change:

-
-Base base() const;
-
-

to:

-
-Base const& base() const;
-
-

twice (once in the synopsis and once in the public -operations section).

-
-
-
-

9.47x Forgot default constructible in Forward Traversal Iterator

- --- - - - -
Submitter:Jeremy Siek
-

We want Forward Traversal Iterator plus Readable Lvalue Iterator to -match the old Foward Iterator requirements, so we need Forward -Traversal Iterator to include Default Constructible.

- --- - - - - -
Proposed resolution:
 

Change:

-
-

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

- ----- - - - - -
Forward Traversal Iterator Requirements (in addition to Single Pass Iterator)
-
-

to:

-
-

A class or built-in type X models the Forward Traversal Iterator -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.

- ----- - - - - -
Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator)
-
-
-
-
-

9.48x Editorial changes (non-normative text)

-
-
Change:
-
Iterator facade uses the Curiously Recurring Template Pattern (CRTP) -[Cop95] so that the user can specify the behavior of -iterator_facade in a derived class. Former designs used policy -objects to specify the behavior. iterator_facade does not use policy -objects for several reasons:
-
to:
-
Iterator facade uses the Curiously Recurring Template -Pattern (CRTP) [Cop95] so that the user can specify the behavior -of iterator_facade in a derived class. Former designs used -policy objects to specify the behavior, but that approach was -discarded for several reasons:
-
Change:
-
iterator's operator++ returns the iterator type itself means -that all iterators generated by iterator_facade would be -instantiations of iterator_facade. Cumbersome type generator
-
to:
-
iterator's operator++ returns the iterator type itself -would mean that all iterators built with the library would -have to be specializations of iterator_facade<...>, rather -than something more descriptive like -indirect_iterator<T*>. Cumbersome type generator
-
Change:
-
The return type for operator-> and operator[] is not -explicitly specified. Instead it requires each iterator_facade -instantiation to meet the requirements of its iterator_category.
-
To:
-
The return types for iterator_facade's operator-> and -operator[] are not explicitly specified. Instead, those types -are described in terms of a set of requirements, which must be -satisfied by the iterator_facade implementation.
-
-
-
-

9.49x Clarification of iterator_facade requirements and type members

-

A general cleanup and simplification of the requirements and -description of type members for iterator_facade.

-

The user is only allowed to add const as a qualifier.

-
-
Change:
-
typedef remove_cv<Value>::type value_type;
-
to:
-
typedef remove_const<Value>::type value_type;
-
-

We use to have an unspecified type for pointer, to match the -return type of operator->, but there's no real reason to make them -match, so we just use the simpler Value* for pointer.

-

Change:

-
-typedef /* see description of operator-> */ pointer;
-
-
To:
-
typedef Value* pointer;
-
Remove:
-
Some of the constraints on template parameters to -iterator_facade are expressed in terms of resulting nested -types and should be viewed in the context of their impact on -iterator_traits<Derived>.
-
Change:
-
The Derived template parameter must be a class derived from -iterator_facade.
-
and:
-
The following table describes the other requirements on the -Derived parameter. Depending on the resulting iterator's -iterator_category, a subset of the expressions listed in the table -are required to be valid. The operations in the first column must be -accessible to member functions of class iterator_core_access.
-
to:
-
The following table describes the typical valid expressions on -iterator_facade's Derived parameter, depending on the -iterator concept(s) it will model. The operations in the first -column must be made accessible to member functions of class -iterator_core_access. In addition, -static_cast<Derived*>(iterator_facade*) shall be well-formed.
-
Remove:
-

The nested ::value_type type will be the same as -remove_cv<Value>::type, so the Value parameter must be -an (optionally const-qualified) non-reference type.

-

The nested ::reference will be the same as the Reference -parameter; it must be a suitable reference type for the resulting -iterator. The default for the Reference parameter is -Value&.

-
-
-

Change:

-
-

In the table below, X is the derived iterator type, a is an -object of type X, b and c are objects of type const X, -n is an object of X::difference_type, y is a constant -object of a single pass iterator type interoperable with X, and z -is a constant object of a random access traversal iterator type -interoperable with X.

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeAssertion/NoteRequired to implement -Iterator Concept(s)
c.dereference()X::reference Readable Iterator, Writable -Iterator
c.equal(b)convertible to booltrue iff b and c are -equivalent.Single Pass Iterator
c.equal(y)convertible to booltrue iff c and y refer to the -same position. Implements c == y -and c != y.Single Pass Iterator
a.advance(n)unused Random Access Traversal -Iterator
a.increment()unused Incrementable Iterator
a.decrement()unused Bidirectional Traversal -Iterator
c.distance_to(b)convertible to -X::difference_typeequivalent to distance(c, b)Random Access Traversal -Iterator
c.distance_to(z)convertible to -X::difference_typeequivalent to distance(c, z). -Implements c - z, c < z, c -<= z, c > z, and c >= c.Random Access Traversal -Iterator
-
-

to:

-
-

In the table below, F is iterator_facade<X,V,C,R,D>, a is an -object of type X, b and c are objects of type const X, -n is an object of F::difference_type, y is a constant -object of a single pass iterator type interoperable with X, and z -is a constant object of a random access traversal iterator type -interoperable with X.

-

iterator_facade Core Operations

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeAssertion/NoteUsed to implement Iterator -Concept(s)
c.dereference()F::reference Readable Iterator, Writable -Iterator
c.equal(y)convertible to booltrue iff c and y -refer to the same -position.Single Pass Iterator
a.increment()unused Incrementable Iterator
a.decrement()unused Bidirectional Traversal -Iterator
a.advance(n)unused Random Access Traversal -Iterator
c.distance_to(z)convertible to -F::difference_typeequivalent to -distance(c, X(z)).Random Access Traversal -Iterator
-
-
-
-
- - - - diff --git a/doc/iter-issue-list.rst b/doc/iter-issue-list.rst deleted file mode 100644 index 6e1064d..0000000 --- a/doc/iter-issue-list.rst +++ /dev/null @@ -1,3841 +0,0 @@ -+++++++++++++++++++++++++++++++++++++ - Iterator concept and adapter issues -+++++++++++++++++++++++++++++++++++++ - -:date: $Date$ - -.. contents:: Index - -=================================== - Issues from Matt's TR issues list -=================================== - - -9.1 iterator_access overspecified? -================================== - -:Submitter: Pete Becker -:Status: New - -The proposal includes:: - - enum iterator_access { - readable_iterator = 1, writable_iterator = 2, - swappable_iterator = 4, lvalue_iterator = 8 - }; - -In general, the standard specifies thing like this as a bitmask -type with a list of defined names, and specifies neither the exact -type nor the specific values. Is there a reason for iterator_access -to be more specific? - -:Proposed resolution: The ``iterator_access`` enum will be removed, - so this is no longer an issue. See the resolution to 9.15. - - -9.2 operators of iterator_facade overspecified -============================================== - -:Submitter: Pete Becker -:Status: New - -In general, we've provided operational semantics for things like -operator++. That is, we've said that ++iter must work, without -requiring either a member function or a non-member function. -iterator_facade specifies most operators as member -functions. There's no inherent reason for these to be members, so -we should remove this requirement. Similarly, some operations are -specified as non-member functions but could be implemented as -members. Again, the standard doesn't make either of these choices, -and TR1 shouldn't, either. So: ``operator*()``, ``operator++()``, -``operator++(int)``, ``operator--()``, ``operator--(int)``, -``operator+=``, ``operator-=``, ``operator-(difference_type)``, -``operator-(iterator_facade instance)``, and ``operator+`` should -be specified with operational semantics and not explicitly required -to be members or non-members. - -:Proposed resolution: Not a defect. - -:Rationale: The standard uses valid expressions such as ``++iter`` - in requirements tables, such as for input iterator. However, for - classes, such as ``reverse_iterator``, the standard uses function - prototypes, as we have done here for - ``iterator_facade``. Further, the prototype specification does - not prevent the implementor from using members or non-members, - since nothing the user can do in a conforming program can detect - how the function is implemented. - - -9.3 enable_if_interoperable needs standardese -============================================= - -:Submitter: Pete Becker -:Status: New - -The only discussion of what this means is in a note, so is -non-normative. Further, the note seems to be incorrect. It says -that enable_if_interoperable only works for types that "are -interoperable, by which we mean they are convertible to each -other." This requirement is too strong: it should be that one of -the types is convertible to the other. N1541 48 - -:Proposed resolution: Add normative text. Relax requirements in the - proposed way. - - Change: - - [*Note:* The ``enable_if_interoperable`` template used above is - for exposition purposes. The member operators should be only be - in an overload set provided the derived types ``Dr1`` and - ``Dr2`` are interoperable, by which we mean they are - convertible to each other. The ``enable_if_interoperable`` - approach uses SFINAE to take the operators out of the overload - set when the types are not interoperable.] - - To: - - The ``enable_if_interoperable`` template used above is for - exposition purposes. The member operators should only be in an - overload set provided the derived types ``Dr1`` and ``Dr2`` are - interoperable, meaning that at least one of the types is - convertible to the other. The ``enable_if_interoperable`` - approach uses SFINAE to take the operators out of the overload - set when the types are not interoperable. The operators should - behave *as-if* ``enable_if_interoperable`` were defined to be:: - - template enable_if_interoperable_impl - {}; - - template enable_if_interoperable_impl - { typedef T type; }; - - template - struct enable_if_interoperable - : enable_if_interoperable_impl< - is_convertible::value || is_convertible::value - , T - > - {}; - -9.4 enable_if_convertible unspecified, conflicts with requires -============================================================== - -:Submitter: Pete Becker -:Status: New - -In every place where enable_if_convertible is used it's used like -this (simplified):: - - template - struct C - { - template - C(T1, enable_if_convertible::type* = 0); - }; - -The idea being that this constructor won't compile if T1 isn't -convertible to T. As a result, the constructor won't be considered -as a possible overload when constructing from an object x where the -type of x isn't convertible to T. In addition, however, each of -these constructors has a requires clause that requires -convertibility, so the behavior of a program that attempts such a -construction is undefined. Seems like the enable_if_convertible -part is irrelevant, and should be removed. There are two -problems. First, enable_if_convertible is never specified, so we -don't know what this is supposed to do. Second: we could reasonably -say that this overload should be disabled in certain cases or we -could reasonably say that behavior is undefined, but we can't say -both. - -Thomas Witt writes that the goal of putting in -enable_if_convertible here is to make sure that a specific overload -doesn't interfere with the generic case except when that overload -makes sense. He agrees that what we currently have is deficient. -Dave Abrahams writes that there is no conflict with the requires -cause because the requires clause only takes effect when the -function is actually called. The presence of the constructor -signature can/will be detected by is_convertible without violating -the requires clause, and thus it makes a difference to disable -those constructor instantiations that would be disabled by -enable_if_convertible even if calling them invokes undefined -behavior. There was more discussion on the reflector: -c++std-lib-12312, c++std-lib-12325, c++std-lib- 12330, -c++std-lib-12334, c++std-lib-12335, c++std-lib-12336, -c++std-lib-12338, c++std-lib- 12362. - -:Proposed resolution: - Change: - - [*Note:* The ``enable_if_convertible::type`` expression - used in this section is for exposition purposes. The converting - constructors for specialized adaptors should be only be in an - overload set provided that an object of type ``X`` is - implicitly convertible to an object of type ``Y``. The - ``enable_if_convertible`` approach uses SFINAE to take the - constructor out of the overload set when the types are not - implicitly convertible.] - - To: - - The ``enable_if_convertible::type`` expression used in - this section is for exposition purposes. The converting - constructors for specialized adaptors should be only be in an - overload set provided that an object of type ``X`` is - implicitly convertible to an object of type ``Y``. The - signatures involving ``enable_if_convertible`` should behave - *as-if* ``enable_if_convertible`` were defined to be:: - - template enable_if_convertible_impl - {}; - - template <> enable_if_convertible_impl - { struct type; }; - - template - struct enable_if_convertible - : enable_if_convertible_impl::value> - {}; - - If an expression other than the default argument is used to - supply the value of a function parameter whose type is written - in terms of ``enable_if_convertible``, the program is - ill-formed, no diagnostic required. - - [*Note:* The ``enable_if_convertible`` approach uses SFINAE to - take the constructor out of the overload set when the types are - not implicitly convertible. ] - -9.5 iterator_adaptor has an extraneous 'bool' at the start of the template definition -===================================================================================== - -:Submitter: Pete Becker -:Status: New - -The title says it all; this is probably just a typo. - -:Proposed resolution: Remove the 'bool'. - -9.6 Name of private member shouldn't be normative -================================================= - -:Submitter: Pete Becker -:Status: New - -iterator_adaptor has a private member named m_iterator. Presumably -this is for exposition only, since it's an implementation -detail. It needs to be marked as such. - -:Proposed resolution: Mark the member ``m_iterator`` as exposition - only. Note/DWA: I think this is NAD because the user can't - detect it, though I'm happy to mark it exposition only. - - In [lib.iterator.adaptor] - - Change:: - - Base m_iterator; - - to:: - - Base m_iterator; // exposition only - - -9.7 iterator_adaptor operations specifications are a bit inconsistent -===================================================================== - -:Submitter: Pete Becker -:Status: New - -iterator_adpator() has a Requires clause, that Base must be default -constructible. iterator_adaptor(Base) has no Requires clause, -although the Returns clause says that the Base member is copy -construced from the argument (this may actually be an oversight in -N1550, which doesn't require iterators to be copy constructible or -assignable). - -:Proposed resolution: Add a requirements section for the template - parameters of iterator_adaptor, and state that Base must be Copy - Constructible and Assignable. - - N1550 does in fact include requirements for copy constructible - and assignable in the requirements tables. To clarify, we've also - added the requirements to the text. - - -9.8 Specialized adaptors text should be normative -================================================= - -:Submitter: Pete Becker -:Status: New - -similar to 9.3, "Specialized Adaptors" has a note describing -enable_if_convertible. This should be normative text. - -:Proposed resolution: Changed it to normative - text. See the resolution of 9.4 - -9.9 Reverse_iterator text is too informal -========================================= - -:Submitter: Pete Becker -:Status: New - -reverse iterator "flips the direction of the base iterator's -motion". This needs to be more formal, as in the current -standard. Something like: "iterates through the controlled sequence -in the opposite direction" - -:Proposed resolution: - - Change: - - The reverse iterator adaptor flips the direction of a base - iterator's motion. Invoking ``operator++()`` moves the base - iterator backward and invoking ``operator--()`` moves the base - iterator forward. - - to: - - The reverse iterator adaptor iterates through the adapted iterator - range in the opposite direction. - - -9.10 'prior' is undefined -========================= - -:Submitter: Pete Becker -:Status: New - -reverse_iterator::dereference is specified as calling a function -named 'prior' which has no specification. - -:Proposed resolution: - Change the specification to avoid using ``prior`` as follows. - - Remove:: - - typename reverse_iterator::reference dereference() const { return *prior(this->base()); } - - And at the end of the operations section add: - - ``reference operator*() const;`` - - :Effects: - - :: - - Iterator tmp = m_iterator; - return *--tmp; - -:Rationale: - The style of specification has changed because of issue 9.37x. - - - -9.11 "In other words" is bad wording -==================================== - -:Submitter: Pete Becker -:Status: New - -Transform iterator has a two-part specification: it does this, in -other words, it does that. "In other words" always means "I didn't -say it right, so I'll try again." We need to say it once. - -:Proposed resolution: - Change: - - The transform iterator adapts an iterator by applying some function - object to the result of dereferencing the iterator. In other words, - the ``operator*`` of the transform iterator first dereferences the - base iterator, passes the result of this to the function object, and - then returns the result. - - to: - - The transform iterator adapts an iterator by modifying the - ``operator*`` to apply a function object to the result of - dereferencing the iterator and returning the result. - - -9.12 Transform_iterator shouldn't mandate private member -======================================================== - -:Submitter: Pete Becker -:Status: New - -transform_iterator has a private member named 'm_f' which should be -marked "exposition only." - -:Proposed resolution: Mark the member ``m_f`` as exposition - only. Note/DWA: I think this is NAD because the user can't - detect it, though I'm happy to mark it exposition only. - - Change:: - - UnaryFunction m_f; - - to:: - - UnaryFunction m_f; // exposition only - - - -9.13 Unclear description of counting iterator -============================================= - -:Submitter: Pete Becker -:Status: New - -The description of Counting iterator is unclear. "The counting -iterator adaptor implements dereference by returning a reference to -the base object. The other operations are implemented by the base -m_iterator, as per the inheritance from iterator_adaptor." - -:Proposed resolution: - Change: - - The counting iterator adaptor implements dereference by - returning a reference to the base object. The other operations - are implemented by the base ``m_iterator``, as per the - inheritance from ``iterator_adaptor``. - - to: - - ``counting_iterator`` adapts an object by adding an - ``operator*`` that returns the current value of the object. All - other iterator operations are forwarded to the adapted object. - - - -9.14 Counting_iterator's difference type -======================================== - -:Submitter: Pete Becker -:Status: New - -Counting iterator has the following note: - - [Note: implementers are encouraged to provide an implementation - of distance_to and a difference_type that avoids overflows in the - cases when the Incrementable type is a numeric type.] - -I'm not sure what this means. The user provides a template argument -named Difference, but there's no difference_type. I assume this is -just a glitch in the wording. But if implementors are encouraged to -ignore this argument if it won't work right, why is it there? - -:Proposed resolution: The ``difference_type`` was inherited from - ``iterator_adaptor``. However, we've removed the explicit - inheritance, so explicit typedefs have been added. See the - resolution of 9.37x. - - - -9.15 How to detect lvalueness? -============================== - -:Submitter: Dave Abrahams -:Status: New - -Shortly after N1550 was accepted, we discovered that an iterator's -lvalueness can be determined knowing only its value_type. This -predicate can be calculated even for old-style iterators (on whose -reference type the standard places few requirements). A trait in -the Boost iterator library does it by relying on the compiler's -unwillingness to bind an rvalue to a T& function template -parameter. Similarly, it is possible to detect an iterator's -readability knowing only its value_type. Thus, any interface which -asks the user to explicitly describe an iterator's lvalue-ness or -readability seems to introduce needless complexity. - - -:Proposed resolution: - - 1. Remove the ``is_writable`` and ``is_swappable`` traits, and - remove the requirements in the Writable Iterator and Swappable - Iterator concepts that require their models to support these - traits. - - 2. Change the ``is_readable`` specification. Remove the - requirement for support of the ``is_readable`` trait from the - Readable Iterator concept. - - 3. Remove the ``iterator_tag`` class and transplant the logic for - choosing an iterator category into ``iterator_facade``. - - 4. Change the specification of ``traversal_category``. - - 5. Remove Access parameters from N1530 - - In N1550: - - Remove: - - Since the access concepts are not related via refinement, but - instead cover orthogonal issues, we do not use tags for the - access concepts, but instead use the equivalent of a bit field. - - We provide an access mechanism for mapping iterator types to - the new traversal tags and access bit field. Our design reuses - ``iterator_traits::iterator_category`` as the access - mechanism. To that end, the access and traversal information is - bundled into a single type using the following `iterator_tag` - class. - - :: - - enum iterator_access { readable_iterator = 1, writable_iterator = 2, - swappable_iterator = 4, lvalue_iterator = 8 }; - - template - struct iterator_tag : /* appropriate old category or categories */ { - static const iterator_access access = - (iterator_access)access_bits & - (readable_iterator | writable_iterator | swappable_iterator); - typedef TraversalTag traversal; - }; - - The ``access_bits`` argument is declared to be ``unsigned int`` - instead of the enum ``iterator_access`` for convenience of - use. For example, the expression ``(readable_iterator | - writable_iterator)`` produces an unsigned int, not an - ``iterator_access``. The purpose of the ``lvalue_iterator`` - part of the ``iterator_access`` enum is to communicate to - ``iterator_tag`` whether the reference type is an lvalue so - that the appropriate old category can be chosen for the base - class. The ``lvalue_iterator`` bit is not recorded in the - ``iterator_tag::access`` data member. - - The ``iterator_tag`` class template is derived from the - appropriate iterator tag or tags from the old requirements - based on the access bits and traversal tag passed as template - parameters. The algorithm for determining the old tag or tags - picks the least refined old concepts that include all of the - requirements of the access and traversal concepts (that is, the - closest fit), if any such category exists. For example, the - category tag for a Readable Single Pass Iterator will always be - derived from ``input_iterator_tag``, while the category tag for - a Single Pass Iterator that is both Readable and Writable will - be derived from both ``input_iterator_tag`` and - ``output_iterator_tag``. - - We also provide several helper classes that make it convenient - to obtain the access and traversal characteristics of an - iterator. These helper classes work both for iterators whose - ``iterator_category`` is ``iterator_tag`` and also for - iterators using the original iterator categories. - - :: - - template struct is_readable { typedef ... type; }; - template struct is_writable { typedef ... type; }; - template struct is_swappable { typedef ... type; }; - template struct traversal_category { typedef ... type; }; - - - After: - - Like the old iterator requirements, we provide tags for - purposes of dispatching based on the traversal concepts. The - tags are related via inheritance so that a tag is convertible - to another tag if the concept associated with the first tag is - a refinement of the second tag. - - Add: - - Our design reuses ``iterator_traits::iterator_category`` - to indicate an iterator's traversal capability. To specify - capabilities not captured by any old-style iterator category, - an iterator designer can use an ``iterator_category`` type that - is convertible to both the the most-derived old iterator - category tag which fits, and the appropriate new iterator - traversal tag. - - We do not provide tags for the purposes of dispatching based on - the access concepts, in part because we could not find a way to - automatically infer the right access tags for old-style - iterators. An iterator's writability may be dependent on the - assignability of its ``value_type`` and there's no known way to - detect whether an arbitrary type is assignable. Fortunately, - the need for dispatching based on access capability is not as - great as the need for dispatching based on traversal - capability. - - - From the Readable Iterator Requirements table, remove: - - +-----------------------------------+-----------------------------------+-------------------------+ - |``is_readable::type`` |``true_type`` | | - +-----------------------------------+-----------------------------------+-------------------------+ - - From the Writable Iterator Requirements table, remove: - - +-------------------------+--------------+----------------------------+ - |``is_writable::type`` |``true_type`` | | - +-------------------------+--------------+----------------------------+ - - From the Swappable Iterator Requirements table, remove: - - +-------------------------+-------------+-----------------------------+ - |``is_swappable::type``|``true_type``| | - +-------------------------+-------------+-----------------------------+ - - - From [lib.iterator.synopsis] replace:: - - template struct is_readable; - template struct is_writable; - template struct is_swappable; - template struct traversal_category; - - enum iterator_access { readable_iterator = 1, writable_iterator = 2, - swappable_iterator = 4, lvalue_iterator = 8 }; - - template - struct iterator_tag : /* appropriate old category or categories */ { - static const iterator_access access = - (iterator_access)access_bits & - (readable_iterator | writable_iterator | swappable_iterator); - typedef TraversalTag traversal; - }; - - with:: - - template struct is_readable_iterator; - template struct iterator_traversal; - - - In [lib.iterator.traits], remove: - - The ``iterator_tag`` class template is an iterator category tag - that encodes the access enum and traversal tag in addition to - being compatible with the original iterator tags. The - ``iterator_tag`` class inherits from one of the original - iterator tags according to the following pseudo-code. - - :: - - inherit-category(access, traversal-tag) = - if ((access & readable_iterator) && (access & lvalue_iterator)) { - if (traversal-tag is convertible to random_access_traversal_tag) - return random_access_iterator_tag; - else if (traversal-tag is convertible to bidirectional_traversal_tag) - return bidirectional_iterator_tag; - else if (traversal-tag is convertible to forward_traversal_tag) - return forward_iterator_tag; - else if (traversal-tag is convertible to single_pass_traversal_tag) - if (access-tag is convertible to writable_iterator_tag) - return input_output_iterator_tag; - else - return input_iterator_tag; - else - return null_category_tag; - } else if ((access & readable_iterator) and (access & writable_iterator) - and traversal-tag is convertible to single_pass_iterator_tag) - return input_output_iterator_tag; - else if (access & readable_iterator - and traversal-tag is convertible to single_pass_iterator_tag) - return input_iterator_tag; - else if (access & writable_iterator - and traversal-tag is convertible to incrementable_iterator_tag) - return output_iterator_tag; - else - return null_category_tag; - - If the argument for ``TraversalTag`` is not convertible to - ``incrementable_iterator_tag`` then the program is ill-formed. - - Change: - - The ``is_readable``, ``is_writable``, ``is_swappable``, and - ``traversal_category`` class templates are traits classes. For - iterators whose ``iterator_traits::iterator_category`` - type is ``iterator_tag``, these traits obtain the ``access`` - enum and ``traversal`` member type from within - ``iterator_tag``. For iterators whose - ``iterator_traits::iterator_category`` type is not - ``iterator_tag`` and instead is a tag convertible to one of the - original tags, the appropriate traversal tag and access bits - are deduced. The following pseudo-code describes the - algorithm. - - :: - - is-readable(Iterator) = - cat = iterator_traits::iterator_category; - if (cat == iterator_tag) - return Access & readable_iterator; - else if (cat is convertible to input_iterator_tag) - return true; - else - return false; - - is-writable(Iterator) = - cat = iterator_traits::iterator_category; - if (cat == iterator_tag) - return Access & writable_iterator; - else if (cat is convertible to output_iterator_tag) - return true; - else if ( - cat is convertible to forward_iterator_tag - and iterator_traits::reference is a - mutable reference) - return true; - else - return false; - - is-swappable(Iterator) = - cat = iterator_traits::iterator_category; - if (cat == iterator_tag) - return Access & swappable_iterator; - else if (cat is convertible to forward_iterator_tag) { - if (iterator_traits::reference is a const reference) - return false; - else - return true; - } else - return false; - - traversal-category(Iterator) = - cat = iterator_traits::iterator_category; - if (cat == iterator_tag) - return Traversal; - else if (cat is convertible to random_access_iterator_tag) - return random_access_traversal_tag; - else if (cat is convertible to bidirectional_iterator_tag) - return bidirectional_traversal_tag; - else if (cat is convertible to forward_iterator_tag) - return forward_traversal_tag; - else if (cat is convertible to input_iterator_tag) - return single_pass_iterator_tag; - else if (cat is convertible to output_iterator_tag) - return incrementable_iterator_tag; - else - return null_category_tag; - - - The following specializations provide the access and traversal - category tags for pointer types. - - :: - - template - struct is_readable { typedef true_type type; }; - template - struct is_writable { typedef false_type type; }; - template - struct is_swappable { typedef false_type type; }; - - template - struct is_readable { typedef true_type type; }; - template - struct is_writable { typedef true_type type; }; - template - struct is_swappable { typedef true_type type; }; - - template - struct traversal_category - { - typedef random_access_traversal_tag type; - }; - - to: - - The ``is_readable_iterator`` class template satisfies the - UnaryTypeTrait requirements. - - Given an iterator type ``X``, - ``is_readable_iterator::value`` yields ``true`` if, for an - object ``a`` of type ``X``, ``*a`` is convertible to - ``iterator_traits::value_type``, and ``false`` otherwise. - - .. _`category-to-traversal`: - - ``iterator_traversal::type`` is - - .. parsed-literal:: - - *category-to-traversal*\ (iterator_traits::iterator_category) - - where *category-to-traversal* is defined as follows - - .. parsed-literal:: - - *category-to-traversal*\ (C) = - if (C is convertible to incrementable_traversal_tag) - return C; - else if (C is convertible to random_access_iterator_tag) - return random_access_traversal_tag; - else if (C is convertible to bidirectional_iterator_tag) - return bidirectional_traversal_tag; - else if (C is convertible to forward_iterator_tag) - return forward_traversal_tag; - else if (C is convertible to input_iterator_tag) - return single_pass_traversal_tag; - else if (C is convertible to output_iterator_tag) - return incrementable_traversal_tag; - else - *the program is ill-formed* - - In N1530: - - In [lib.iterator.helper.synopsis]: - - Change:: - - const unsigned use_default_access = -1; - - struct iterator_core_access { /* implementation detail */ }; - - template < - class Derived - , class Value - , unsigned AccessCategory - , class TraversalCategory - , class Reference = Value& - , class Difference = ptrdiff_t - > - class iterator_facade; - - template < - class Derived - , class Base - , class Value = use_default - , unsigned Access = use_default_access - , class Traversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class iterator_adaptor; - - template < - class Iterator - , class Value = use_default - , unsigned Access = use_default_access - , class Traversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator; - - To:: - - struct iterator_core_access { /* implementation detail */ }; - - template < - class Derived - , class Value - , class CategoryOrTraversal - , class Reference = Value& - , class Difference = ptrdiff_t - > - class iterator_facade; - - template < - class Derived - , class Base - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class iterator_adaptor; - - template < - class Iterator - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator; - - Change:: - - template < - class Incrementable - , unsigned Access = use_default_access - , class Traversal = use_default - , class Difference = use_default - > - class counting_iterator - - To:: - - template < - class Incrementable - , class CategoryOrTraversal = use_default - , class Difference = use_default - > - class counting_iterator; - - In [lib.iterator.facade]: - - Change:: - - template < - class Derived - , class Value - , unsigned AccessCategory - , class TraversalCategory - , class Reference = /* see below */ - , class Difference = ptrdiff_t - > - class iterator_facade { - - to:: - - template < - class Derived - , class Value - , class CategoryOrTraversal - , class Reference = Value& - , class Difference = ptrdiff_t - > - class iterator_facade { - - - Change:: - - typedef iterator_tag iterator_category; - - to:: - - typedef /* see below */ iterator_category; - - - Change:: - - // Comparison operators - template - typename enable_if_interoperable::type // exposition - operator ==(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator !=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator <(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator <=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); - - // Iterator difference - template - typename enable_if_interoperable::type - operator -(iterator_facade const& lhs, - iterator_facade const& rhs); - - // Iterator addition - template - Derived operator+ (iterator_facade const&, - typename Derived::difference_type n) - - to:: - - // Comparison operators - template - typename enable_if_interoperable::type // exposition - operator ==(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator !=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator <(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator <=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); - - // Iterator difference - template - /* see below */ - operator-(iterator_facade const& lhs, - iterator_facade const& rhs); - - // Iterator addition - template - Derived operator+ (iterator_facade const&, - typename Derived::difference_type n); - - template - Derived operator+ (typename Derived::difference_type n, - iterator_facade const&); - - - After the ``iterator_facade`` synopsis, add: - - The ``iterator_category`` member of ``iterator_facade`` is - - .. parsed-literal:: - - *iterator-category*\ (CategoryOrTraversal, value_type, reference) - - where *iterator-category* is defined as follows: - - .. parsed-literal:: - - *iterator-category*\ (C,R,V) := - if (C is convertible to std::input_iterator_tag - || C is convertible to std::output_iterator_tag - ) - return C - - else if (C is not convertible to incrementable_traversal_tag) - *the program is ill-formed* - - else return a type X satisfying the following two constraints: - - 1. X is convertible to X1, and not to any more-derived - type, where X1 is defined by: - - if (R is a reference type - && C is convertible to forward_traversal_tag) - { - if (C is convertible to random_access_traversal_tag) - X1 = random_access_iterator_tag - else if (C is convertible to bidirectional_traversal_tag) - X1 = bidirectional_iterator_tag - else - X1 = forward_iterator_tag - } - else - { - if (C is convertible to single_pass_traversal_tag - && R is convertible to V) - X1 = input_iterator_tag - else - X1 = C - } - - 2. |category-to-traversal|_\ (X) is convertible to the most - derived traversal tag type to which X is also - convertible, and not to any more-derived traversal tag - type. - -.. |category-to-traversal| replace:: *category-to-traversal* - -.. |iterator-category| replace:: *iterator-category* -.. _iterator-category: - - In [lib.iterator.facade] ``iterator_facade`` requirements: - - Remove: - - ``AccessCategory`` must be an unsigned value which uses no more - bits than the greatest value of ``iterator_access``. - - In the **Iterator Adaptor** section, change: - - Several of the template parameters of ``iterator_adaptor`` default - to ``use_default`` (or ``use_default_access``). - - to: - - Several of the template parameters of ``iterator_adaptor`` default - to ``use_default``. - - In [lib.iterator.special.adaptors]: - - Change:: - - template < - class Iterator - , class Value = use_default - , unsigned Access = use_default_access - , class Traversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator - - to:: - - template < - class Iterator - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class indirect_iterator - - Change:: - - template < - class Iterator2, class Value2, unsigned Access2, class Traversal2 - , class Reference2, class Difference2 - > - indirect_iterator( - - to:: - - template < - class Iterator2, class Value2, class Category2 - , class Reference2, class Difference2 - > - indirect_iterator( - - Change:: - - template < - class Incrementable - , unsigned Access = use_default_access - , class Traversal = use_default - , class Difference = use_default - > - class counting_iterator - - to:: - - template < - class Incrementable - , class CategoryOrTraversal = use_default - , class Difference = use_default - > - class counting_iterator - - - Change:: - - typedef iterator_tag< - writable_iterator - , incrementable_traversal_tag - > iterator_category; - - to: - - typedef std::output_iterator_tag iterator_category; - - In [lib.iterator.adaptor] - - Change:: - - template < - class Derived - , class Base - , class Value = use_default - , unsigned Access = use_default_access - , class Traversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class iterator_adaptor - - To:: - - template < - class Derived - , class Base - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class iterator_adaptor - -:Rationale: - -1. There are two reasons for removing ``is_writable`` - and ``is_swappable``. The first is that we do not know of - a way to fix the specification so that it gives the correct - answer for all iterators. Second, there was only a weak - motivation for having ``is_writable`` and ``is_swappable`` - there in the first place. The main motivation was simply - uniformity: we have tags for the old iterator categories - so we should have tags for the new iterator categories. - While having tags and the capability to dispatch based - on the traversal categories is often used, we see - less of a need for dispatching based on writability - and swappability, since typically algorithms - that need these capabilities have no alternative if - they are not provided. - -2. We discovered that the ``is_readable`` trait can be implemented - using only the iterator type itself and its ``value_type``. - Therefore we remove the requirement for ``is_readable`` from the - Readable Iterator concept, and change the definition of - ``is_readable`` so that it works for any iterator type. - -3. The purpose of the ``iterator_tag`` class was to bundle the - traversal and access category tags into the - ``iterator_category`` typedef. With ``is_writable`` and - ``is_swappable`` gone, and ``is_readable`` no longer in need of - special hints, there is no reason for iterators to provide - information about the access capabilities of an iterator. Thus - there is no need for the ``iterator_tag``. The traversal tag can - be directly used for the ``iterator_category``. If a new - iterator is intended to be backward compatible with old iterator - concepts, a tag type that is convertible to both one of the new - traversal tags and also to an old iterator tag can be created - and use for the ``iterator_category``. - -4. The changes to the specification of ``traversal_category`` are a - direct result of the removal of ``iterator_tag``. - - - -9.16 is_writable_iterator returns false positives -================================================= - -:Submitter: Dave Abrahams -:Status: New - -is_writable_iterator returns false positives for forward iterators -whose value_type has a private assignment operator, or whose -reference type is not a reference (currently legal). - -:Proposed Resolution: See the resolution to 9.15. - - -9.17 is_swappable_iterator returns false positives -================================================== - -:Submitter: Dave Abrahams -:Status: New - -is_swappable_iterator has the same problems as -is_writable_iterator. In addition, if we allow users to write their -own iter_swap functions it's easy to imagine old-style iterators -for which is_swappable returns false negatives. - -:Proposed Resolution: See the resolution to 9.15. - - -9.18 Are is_readable, is_writable, and is_swappable useful? -=========================================================== - -:Submitter: Dave Abrahams -:Status: New - -I am concerned that there is little use for any of is_readable, -is_writable, or is_swappable, and that not only do they unduly -constrain iterator implementors but they add overhead to -iterator_facade and iterator_adaptor in the form of a template -parameter which would otherwise be unneeded. Since we can't -implement two of them accurately for old-style iterators, I am -having a hard time justifying their impact on the rest of the -proposal(s). - -:Proposed Resolution: See the resolution to 9.15. - -9.19 Non-Uniformity of the "lvalue_iterator Bit" -================================================ - -:Submitter: Dave Abrahams -:Status: New - -The proposed iterator_tag class template accepts an "access bits" -parameter which includes a bit to indicate the iterator's -lvalueness (whether its dereference operator returns a reference to -its value_type. The relevant part of N1550 says: - - The purpose of the lvalue_iterator part of the iterator_access - enum is to communicate to iterator_tagwhether the reference type - is an lvalue so that the appropriate old category can be chosen - for the base class. The lvalue_iterator bit is not recorded in - the iterator_tag::access data member. - -The lvalue_iterator bit is not recorded because N1550 aims to -improve orthogonality of the iterator concepts, and a new-style -iterator's lvalueness is detectable by examining its reference -type. This inside/outside difference is awkward and confusing. - -:Proposed Resolution: The iterator_tag class will be removed, so this is no longer an issue. - See the resolution to 9.15. - - -9.20 Traversal Concepts and Tags -================================ - -:Submitter: Dave Abrahams -:Status: New - -Howard Hinnant pointed out some inconsistencies with the naming of -these tag types:: - - incrementable_iterator_tag // ++r, r++ - single_pass_iterator_tag // adds a == b, a != b - forward_traversal_iterator_tag // adds multi-pass - bidirectional_traversal_iterator_tag // adds --r, r-- - random_access_traversal_iterator_tag // adds r+n,n+r,etc. - -Howard thought that it might be better if all tag names contained -the word "traversal". It's not clear that would result in the best -possible names, though. For example, incrementable iterators can -only make a single pass over their input. What really distinguishes -single pass iterators from incrementable iterators is not that they -can make a single pass, but that they are equality -comparable. Forward traversal iterators really distinguish -themselves by introducing multi-pass capability. Without entering -a "Parkinson's Bicycle Shed" type of discussion, it might be worth -giving the names of these tags (and the associated concepts) some -extra attention. - -:Proposed resolution: Change the names of the traversal tags to the - following names:: - - incrementable_traversal_tag - single_pass_traversal_tag - forward_traversal_tag - bidirectional_traversal_tag - random_access_traversal_tag - - - In [lib.iterator.traversal]: - - - Change: - - +--------------------------------+-------------------------------+--------------------+ - |``traversal_category::type`` |Convertible to | | - | |``incrementable_iterator_tag`` | | - +--------------------------------+-------------------------------+--------------------+ - - to: - - +--------------------------------+-------------------------------+--------------------+ - |``iterator_traversal::type`` |Convertible to | | - | |``incrementable_traversal_tag``| | - +--------------------------------+-------------------------------+--------------------+ - - Change: - - +--------------------------------+-----------------------------+---------------------------+ - |``traversal_category::type`` |Convertible to | | - | |``single_pass_iterator_tag`` | | - +--------------------------------+-----------------------------+---------------------------+ - - to: - - +--------------------------------+-----------------------------+---------------------------+ - |``iterator_traversal::type`` |Convertible to | | - | |``single_pass_traversal_tag``| | - +--------------------------------+-----------------------------+---------------------------+ - - Change: - - +---------------------------------------+-----------------------------------+---------------+ - |``traversal_category::type`` |Convertible to | | - | |``forward_traversal_iterator_tag`` | | - +---------------------------------------+-----------------------------------+---------------+ - - to: - - +---------------------------------------+-----------------------------------+----------------------------+ - |``iterator_traversal::type`` |Convertible to | | - | |``forward_traversal_tag`` | | - +---------------------------------------+-----------------------------------+----------------------------+ - - Change: - - +------------------------------------+---------------------------------------------+---------------------+ - |``traversal_category::type`` |Convertible to | | - | |``bidirectional_traversal_iterator_tag`` | | - +------------------------------------+---------------------------------------------+---------------------+ - - to: - - +--------------------------------+-------------------------------+---------------------+ - |``iterator_traversal::type`` |Convertible to | | - | |``bidirectional_traversal_tag``| | - +--------------------------------+-------------------------------+---------------------+ - - Change: - - +-------------------------------------------+-------------------------------------------------+-------------------------+----------------------+ - |``traversal_category::type`` |Convertible to | | | - | |``random_access_traversal_iterator_tag`` | | | - +-------------------------------------------+-------------------------------------------------+-------------------------+----------------------+ - - to: - - +-------------------------------+---------------------------------+-------------------------+----------------------+ - |``iterator_traversal::type``|Convertible to | | | - | |``random_access_traversal_tag`` | | | - +-------------------------------+---------------------------------+-------------------------+----------------------+ - - - In [lib.iterator.synopsis], change:: - - struct incrementable_iterator_tag { }; - struct single_pass_iterator_tag : incrementable_iterator_tag { }; - struct forward_traversal_tag : single_pass_iterator_tag { }; - - to:: - - struct incrementable_traversal_tag { }; - struct single_pass_traversal_tag : incrementable_traversal_tag { }; - struct forward_traversal_tag : single_pass_traversal_tag { }; - - Remove:: - - struct null_category_tag { }; - struct input_output_iterator_tag : input_iterator_tag, output_iterator_tag {}; - - -9.21 iterator_facade Derived template argument underspecified -============================================================= - -:Submitter: Pete Becker -:Status: New - -The first template argument to iterator_facade is named Derived, -and the proposal says: - - The Derived template parameter must be a class derived from - iterator_facade. - -First, iterator_facade is a template, so cannot be derived -from. Rather, the class must be derived from a specialization of -iterator_facade. More important, isn't Derived required to be the -class that is being defined? That is, if I understand it right, the -definition of D here this is not valid:: - - class C : public iterator_facade { ... }; - class D : public iterator_facade { ... }; - -In the definition of D, the Derived argument to iterator_facade is -a class derived from a specialization of iterator_facade, so the -requirement is met. Shouldn't the requirement be more like "when -using iterator_facade to define an iterator class Iter, the class -Iter must be derived from a specialization of iterator_facade whose -first template argument is Iter." That's a bit awkward, but at the -moment I don't see a better way of phrasing it. - -:Proposed resolution: - - In [lib.iterator.facade] - - Remove: - - The ``Derived`` template parameter must be a class derived from - ``iterator_facade``. - - Change: - - The following table describes the other requirements on the - ``Derived`` parameter. Depending on the resulting iterator's - ``iterator_category``, a subset of the expressions listed in the table - are required to be valid. The operations in the first column must be - accessible to member functions of class ``iterator_core_access``. - - to: - - The following table describes the typical valid expressions on - ``iterator_facade``\ 's ``Derived`` parameter, depending on the - iterator concept(s) it will model. The operations in the first - column must be made accessible to member functions of class - ``iterator_core_access``. In addition, - ``static_cast(iterator_facade*)`` shall be well-formed. - - In [lib.iterator.adaptor] - - Change: - - The ``iterator_adaptor`` is a base class template derived from - an instantiation of ``iterator_facade``. - - to: - - Each specialization of the ``iterator_adaptor`` class template - is derived from a specialization of ``iterator_facade``. - - Change: - - The ``Derived`` template parameter must be a derived class of - ``iterator_adaptor``. - - To: - - ``static_cast(iterator_adaptor*)`` shall be well-formed. - -[Note: The proposed resolution to Issue 9.37 contains related -changes] - -9.22 return type of Iterator difference for iterator facade -=========================================================== - -:Submitter: Pete Becker -:Status: New - -The proposal says:: - - template - typename enable_if_interoperable::type - operator -(iterator_facade const& lhs, - iterator_facade const& rhs); - -Shouldn't the return type be one of the two iterator types? Which -one? The idea is that if one of the iterator types can be converted -to the other type, then the subtraction is okay. Seems like the -return type should then be the type that was converted to. Is that -right? - -:Proposed resolution: - - See resolution to 9.34. - -9.23 Iterator_facade: minor wording Issue -========================================= - -:Submitter: Pete Becker -:Status: New - -In the table that lists the required (sort of) member functions of -iterator types that are based on iterator_facade, the entry for -c.equal(y) says: - - true iff c and y refer to the same position. Implements c == y - and c != y. The second sentence is inside out. c.equal(y) does - not implement either of these operations. It is used to implement - them. Same thing in the description of c.distance_to(z). - -:Proposed resolution: remove "implements" descriptions from - table. See resolution to 9.34 - - -9.24 Use of undefined name in iterator_facade table -=================================================== - -:Submitter: Pete Becker -:Status: New - -Several of the descriptions use the name X without defining -it. This seems to be a carryover from the table immediately above -this section, but the text preceding that table says "In the table -below, X is the derived iterator type." Looks like the X:: -qualifiers aren't really needed; X::reference can simply be -reference, since that's defined by the iterator_facade -specialization itself. - -:Proposed resolution: - - Remove references to X. - - In [lib.iterator.facade] operations ``operator->() const;``: - - Change: - - :Returns: If ``X::reference`` is a reference type, an object - of type ``X::pointer`` equal to:: - - &static_cast(this)->dereference() - - Otherwise returns an object of unspecified type such that, - given an object ``a`` of type ``X``, ``a->m`` is equivalent - to ``(w = *a, w.m)`` for some temporary object ``w`` of type - ``X::value_type``. - - The type ``X::pointer`` is ``Value*`` if - ``is_writable_iterator::value`` is ``true``, and - ``Value const*`` otherwise. - - to: - - :Returns: If ``reference`` is a reference type, an object - of type ``pointer`` equal to:: - - &static_cast(this)->dereference() - - Otherwise returns an object of unspecified type such that, - ``(*static_cast(this))->m`` is equivalent - to ``(w = **static_cast(this), w.m)`` for - some temporary object ``w`` of type ``value_type``. - - Further changes are covered by issue 9.26. - -9.25 Iterator_facade: wrong return type -======================================= - -:Submitter: Pete Becker -:Status: New - -Several of the member functions return a Derived object or a -Derived&. Their Effects clauses end with:: - - return *this; - -This should be :: - - return *static_cast(this); - -:Proposed resolution: - - In [lib.iterator.facade], in the effects clause - of the following operations:: - - Derived& operator++() - Derived& operator--() - Derived& operator+=(difference_type n) - Derived& operator-=(difference_type n) - - Change: - ``return *this`` - - to: - ``return *static_cast(this);`` - -9.26 Iterator_facade: unclear returns clause for operator[] -=========================================================== - -:Submitter: Pete Becker -:Status: New - -The returns clause for ``operator[](difference_type n)`` const -says: - - Returns: an object convertible to X::reference and holding a copy - p of a+n such that, for a constant object v of type - X::value_type, X::reference(a[n] = v) is equivalent to p = v. - This needs to define 'a', but assuming it's supposed to be - ``*this`` (or maybe ``*(Derived*)this``), it still isn't clear - what this says. Presumably, the idea is that you can index off of - an iterator and assign to the result. But why the requirement - that it hold a copy of a+n? Granted, that's probably how it's - implemented, but it seems over-constrained. And the last phrase - seems wrong. p is an iterator; there's no requirement that you - can assign a value_type object to it. Should that be ``*p = v``? - But why the cast in reference(a[n] = v)? - -:Proposed resolution: - - In section operator[]: - - Change: - - Writable iterators built with ``iterator_facade`` implement - the semantics required by the preferred resolution to `issue - 299` and adopted by proposal `n1477`: the result of ``p[n]`` - is a proxy object containing a copy of ``p+n``, and ``p[n] = - x`` is equivalent to ``*(p + n) = x``. This approach will - work properly for any random-access iterator regardless of - the other details of its implementation. A user who knows - more about the implementation of her iterator is free to - implement an ``operator[]`` which returns an lvalue in the - derived iterator class; it will hide the one supplied by - ``iterator_facade`` from clients of her iterator. - - to: - - Writable iterators built with ``iterator_facade`` implement - the semantics required by the preferred resolution to `issue - 299` and adopted by proposal `n1550`: the result of ``p[n]`` - is an object convertible to the iterator's ``value_type``, - and ``p[n] = x`` is equivalent to ``*(p + n) = x`` (Note: - This result object may be implemented as a proxy containing a - copy of ``p+n``). This approach will work properly for any - random-access iterator regardless of the other details of its - implementation. A user who knows more about the - implementation of her iterator is free to implement an - ``operator[]`` that returns an lvalue in the derived iterator - class; it will hide the one supplied by ``iterator_facade`` - from clients of her iterator. - - In [lib.iterator.facade] operations: - - Change: - - :Returns: an object convertible to ``X::reference`` and - holding a copy *p* of ``a+n`` such that, for a constant - object ``v`` of type ``X::value_type``, ``X::reference(a[n] - = v)`` is equivalent to ``p = v``. - - to: - - :Returns: an object convertible to ``value_type``. For - constant objects ``v`` of type ``value_type``, and ``n`` of - type ``difference_type``, ``(*this)[n] = v`` is equivalent - to ``*(*this + n) = v``, and ``static_cast((*this)[n])`` is equivalent to - ``static_cast(*(*this + n))`` - - -9.27 Iterator_facade: redundant clause -====================================== - -:Submitter: Pete Becker -:Status: New - -``operator-`` has both an effects clause and a returns -clause. Looks like the returns clause should be removed. - -:Proposed resolution: - - Remove the returns clause. - - In [lib.iterator.facade] operations: - - Remove: - :Returns: ``static_cast(this)->advance(-n);`` - - - - -9.28 indirect_iterator: incorrect specification of default constructor -====================================================================== - -:Submitter: Pete Becker -:Status: New - -The default constructor returns "An instance of indirect_iterator -with a default constructed base object", but the constructor that -takes an Iterator object returns "An instance of indirect_iterator -with the iterator_adaptor subobject copy constructed from x." The -latter is the correct form, since it does not reach inside the base -class for its semantics. So the default constructor shoudl return -"An instance of indirect_iterator with a default-constructed -iterator_adaptor subobject." - -:Proposed resolution: - Change: - :Returns: An instance of ``indirect_iterator`` with - a default constructed base object. - - to: - :Returns: An instance of ``indirect_iterator`` with - a default-constructed ``m_iterator``. - -:Rationale: Inheritance from iterator_adaptor has been removed, so we instead - give the semantics in terms of the (exposition only) member - ``m_iterator``. - - -9.29 indirect_iterator: unclear specification of template constructor -===================================================================== - -:Submitter: Pete Becker -:Status: New - -The templated constructor that takes an indirect_iterator with a -different set of template arguments says that it returns "An -instance of indirect_iterator that is a copy of [the argument]". -But the type of the argument is different from the type of the -object being constructed, and there is no description of what -a "copy" means. The Iterator template parameter for the argument -must be convertible to the Iterator template parameter for the type -being constructed, which suggests that the argument's contained -Iterator object should be converted to the target type's Iterator -type. Is that what's meant here? -(Pete later writes: In fact, this problem is present in all of the -specialized adaptors that have a constructor like this: the -constructor returns "a copy" of the argument without saying what a -copy is.) - -:Proposed resolution: - - Change: - :Returns: An instance of ``indirect_iterator`` that is a copy of ``y``. - - to: - :Returns: An instance of ``indirect_iterator`` whose - ``m_iterator`` subobject is constructed from ``y.base()``. - - -:Rationale: Inheritance from iterator_adaptor has been removed, so we - instead give the semantics in terms of the member ``m_iterator``. - - -9.30 transform_iterator argument irregularity -============================================= - -:Submitter: Pete Becker -:Status: New - -The specialized adaptors that take both a Value and a Reference -template argument all take them in that order, i.e. Value precedes -Reference in the template argument list, with the exception of -transform_iterator, where Reference precedes Value. This seems like -a possible source of confusion. Is there a reason why this order is -preferable? - -:Proposed resolution: NAD - -:Rationale: defaults for Value depend on Reference. A sensible - Value can almost always be computed from Reference. The first - parameter is UnaryFunction, so the argument order is already - different from the other adapters. - - -9.31 function_output_iterator overconstrained -============================================= - -:Submitter: Pete Becker -:Status: New - -function_output_iterator requirements says: "The UnaryFunction must -be Assignable, Copy Constructible, and the expression f(x) must be -valid, where f is an object of type UnaryFunction and x is an -object of a type accepted by f." - -Everything starting with "and," somewhat reworded, is actually a -constraint on output_proxy::operator=. All that's needed to create -a function_output_iterator object is that the UnaryFunction type be -Assignable and CopyConstructible. That's also sufficient to -dereference and to increment such an object. It's only when you try -to assign through a dereferenced iterator that f(x) has to work, -and then only for the particular function object that the iterator -holds and for the particular value that is being assigned. - - -Addition from Jeremy: - The constructor for ``function_output_iterator`` is also - slightly overconstrained because it requires - the ``UnaryFunction`` to have a default constructor - even when the default constructor of ``function_output_iterator`` - is not used. - - -:Proposed resolution: - - Change: - ``output_proxy operator*();`` - - to: - ``/* see below */ operator*();`` - - After ``function_output_iterator& operator++(int);`` add:: - - private: - UnaryFunction m_f; // exposition only - - Change: - The ``UnaryFunction`` must be Assignable, Copy Constructible, - and the expression ``f(x)`` must be valid, where ``f`` is an - object of type ``UnaryFunction`` and ``x`` is an object of a - type accepted by ``f``. The resulting - ``function_output_iterator`` is a model of the Writable and - Incrementable Iterator concepts. - - to: - ``UnaryFunction`` must be Assignable and Copy Constructible. - - After the requirements section, add: - -.. topic:: ``function_output_iterator`` models - - ``function_output_iterator`` is a model of the Writable and - Incrementable Iterator concepts. - - Change: - :Returns: An instance of ``function_output_iterator`` with - ``f`` stored as a data member. - - to: - :Effects: Constructs an instance of ``function_output_iterator`` - with ``m_f`` constructed from ``f``. - - Change: - ``output_proxy operator*();`` - - :Returns: An instance of ``output_proxy`` constructed with - a copy of the unary function ``f``. - - to: - ``operator*();`` - - :Returns: An object ``r`` of unspecified type such that ``r = t`` - is equivalent to ``m_f(t)`` for all ``t``. - - - Remove: - ``function_output_iterator::output_proxy`` operations - - ``output_proxy(UnaryFunction& f);`` - - :Returns: An instance of ``output_proxy`` with ``f`` stored as - a data member. - - - ``template output_proxy& operator=(const T& value);`` - - :Effects: - :: - - m_f(value); - return *this; - - - Change:: - - explicit function_output_iterator(const UnaryFunction& f = UnaryFunction()); - - to:: - - explicit function_output_iterator(); - - explicit function_output_iterator(const UnaryFunction& f); - - - -9.32 Should output_proxy really be a named type? -================================================ - -:Submitter: Pete Becker -:Status: New - -This means someone can store an output_proxy object for later use, -whatever that means. It also constrains output_proxy to hold a copy -of the function object, rather than a pointer to the iterator -object. Is all this mechanism really necessary? - -:Proposed resolution: See issue 9.31. - - - -9.33 istreambuf_iterator isn't a Readable Iterator -================================================== - -:Submitter: Pete Becker -:Status: New - -c++std-lib-12333: - - N1550 requires that for a Readable Iterator a of type X, ``*a`` - returns an object of type - ``iterator_traits::reference``. ``istreambuf_iterator::operator*`` - returns ``charT``, but ``istreambuf_iterator::reference`` is - ``charT&``. So am I overlooking something, or is - ``istreambuf_iterator`` not Readable. - -:Proposed resolution: Remove all constraints on - ``iterator_traits::reference`` in Readable Iterator and Lvalue - Iterator. Change Lvalue Iterator to refer to ``T&`` instead of - ``iterator_traits::reference``. - - Change: - A class or built-in type ``X`` models the *Readable Iterator* - concept for the value type ``T`` if the following expressions - are valid and respect the stated semantics. ``U`` is the type - of any specified member of type ``T``. - - to: - A class or built-in type ``X`` models the *Readable Iterator* - concept for value type ``T`` if, in addition to ``X`` being - Assignable and Copy Constructible, the following expressions - are valid and respect the stated semantics. ``U`` is the type - of any specified member of type ``T``. - - From the Input Iterator Requirements table, remove: - - +-----------------------------------+-----------------------------------+-------------------------+ - |``iterator_traits::reference`` |Convertible to | | - | |``iterator_traits::value_type`` | | - +-----------------------------------+-----------------------------------+-------------------------+ - - Change: - - +-----------------------------------+-----------------------------------+-------------------------+ - |``*a`` |``iterator_traits::reference`` |pre: ``a`` is | - | | |dereferenceable. If ``a | - | | |== b`` then ``*a`` is | - | | |equivalent to ``*b`` | - +-----------------------------------+-----------------------------------+-------------------------+ - - to: - - +-----------------------------------+------------------------+----------------------------------------------------------------+ - |``*a`` | Convertible to ``T`` |pre: ``a`` is dereferenceable. If ``a == b`` then ``*a`` | - | | | is equivalent to ``*b``. | - +-----------------------------------+------------------------+----------------------------------------------------------------+ - - Change: - The *Lvalue Iterator* concept adds the requirement that the - ``reference`` type be a reference to the value type of the - iterator. - - to: - The *Lvalue Iterator* concept adds the requirement that the - return type of ``operator*`` type be a reference to the value - type of the iterator. - - Change: - - +---------------------------------------------------------------------------------+ - | Lvalue Iterator Requirements | - +---------------------------------+-----------+-----------------------------------+ - |Expression |Return Type|Assertion | - +=================================+===========+===================================+ - |``iterator_traits::reference``|``T&`` |``T`` is *cv* | - | | |``iterator_traits::value_type`` | - | | |where *cv* is an optional | - | | |cv-qualification | - +---------------------------------+-----------+-----------------------------------+ - - to: - - +-------------------------------------------------------------+ - | Lvalue Iterator Requirements | - +-------------+-----------+-----------------------------------+ - |Expression |Return Type|Note/Assertion | - +=============+===========+===================================+ - |``*a`` | ``T&`` |``T`` is *cv* | - | | |``iterator_traits::value_type`` | - | | |where *cv* is an optional | - | | |cv-qualification. | - | | |pre: ``a`` is | - | | |dereferenceable. If ``a | - | | |== b`` then ``*a`` is | - | | |equivalent to ``*b``. | - +-------------+-----------+-----------------------------------+ - - - At the end of the section reverse_iterator models, add: - The type ``iterator_traits::reference`` must be the type of - ``*i``, where ``i`` is an object of type ``Iterator``. - - -:Rationale: Ideally there should be requirements on the reference - type, however, since Readable Iterator is suppose to correspond - to the current standard iterator requirements (which do not place - requirements on the reference type) we will leave them off for - now. There is a DR in process with respect to the reference type - in the stadard iterator requirements. Once that is resolved we - will revisit this issue for Readable Iterator and Lvalue - Iterator. - - We added Assignable to the requirements for Readable - Iterator. This is needed to have Readable Iterator coincide with - the capabilities of Input Iterator. - - -9.34 iterator_facade free functions unspecified -=============================================== - -:Submitter: Pete Becker -:Status: New - -c++std-lib-12562: - - The template functions ``operator==``, ``operator!=``, - ``operator<``, ``operator<=``, ``operator>``, ``operator>=``, and - ``operator-`` that take two arguments that are specializations of - iterator_facade have no specification. The template function - operator+ that takes an argument that is a specialization of - iterator_facade and an argument of type difference_type has no - specification. - -:Proposed resolution: - Add the missing specifications. - - :: - - template - Derived operator+ (iterator_facade const&, - typename Derived::difference_type n); - - template - Derived operator+ (typename Derived::difference_type n, - iterator_facade const&); - - :Effects: - :: - - Derived tmp(static_cast(this)); - return tmp += n; - - - :: - - template - typename enable_if_interoperable::type - operator ==(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Returns: if ``is_convertible::value``, then - ``lhs.equal(rhs)``. Otherwise, ``rhs.equal(lhs)``. - - :: - - template - typename enable_if_interoperable::type - operator !=(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Returns: if ``is_convertible::value``, then - ``!lhs.equal(rhs)``. Otherwise, ``!rhs.equal(lhs)``. - - :: - - template - typename enable_if_interoperable::type - operator <(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Returns: if ``is_convertible::value``, then - ``lhs.distance_to(rhs) < 0``. Otherwise, ``rhs.distance_to(lhs) > - 0``. - - :: - - template - typename enable_if_interoperable::type - operator <=(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Returns: if ``is_convertible::value``, then - ``lhs.distance_to(rhs) <= 0``. Otherwise, ``rhs.distance_to(lhs) - >= 0``. - - :: - - template - typename enable_if_interoperable::type - operator >(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Returns: if ``is_convertible::value``, then - ``lhs.distance_to(rhs) > 0``. Otherwise, - ``rhs.distance_to(lhs) < 0``. - - - :: - - template - typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Returns: if ``is_convertible::value``, then - ``lhs.distance_to(rhs) >= 0``. Otherwise, - ``rhs.distance_to(lhs) <= 0``. - - :: - - template - typename enable_if_interoperable::type - operator -(iterator_facade const& lhs, - iterator_facade const& rhs); - - :Return Type: if ``is_convertible::value``, then - ``difference`` shall be - ``iterator_traits::difference_type``. Otherwise, - ``difference`` shall be - ``iterator_traits::difference_type``. - - :Returns: if ``is_convertible::value``, then - ``-lhs.distance_to(rhs)``. Otherwise, - ``rhs.distance_to(lhs)``. - - - -9.35 iterator_facade: too many equals? -====================================== - -:Submitter: Pete Becker -:Status: New - -c++std-lib-12563: - - The table listing the functions required for types derived from - iterator_facade has two functions named equal and two named - distance_to:: - - c.equal(b) - c.equal(y) - c.distance_to(b) - c.distance_to(z) - - where b and c are const objects of the derived type, y and z are - constant objects of certain iterator types that are interoperable - with the derived type. Seems like the 'b' versions are - redundant: in both cases, the other version will take a 'b'. In - fact, iterator_adaptor is specified to use iterator_facade, but - does not provide the 'b' versions of these functions. - - Are the 'b' versions needed? - -:Proposed resolution: Remove the 'b' versions. - - In ``iterator_facade`` requirements, remove: - - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.equal(b)`` |convertible to bool|true iff ``b`` and ``c`` are |Single Pass Iterator | - | | |equivalent. | | - +--------------------+-------------------+-------------------------------------+---------------------------+ - - and remove: - - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.distance_to(b)``|convertible to |equivalent to ``distance(c, b)`` |Random Access Traversal | - | |X::difference_type | |Iterator | - +--------------------+-------------------+-------------------------------------+---------------------------+ - - -9.36 iterator_facade function requirements -========================================== - -:Submitter: Pete Becker -:Status: New - -c++std-lib-12636: - - The table that lists required functions for the derived type X - passed to iterator_facade lists, among others: - - for a single pass iterator:: - - c.equal(b) - c.equal(y) - - where b and c are const X objects, and y is a const object of a - single pass iterator that is interoperable with X. Since X is - interoperable with itself, c.equal(b) is redundant. There is a - difference in their descriptions, but its meaning isn't - clear. The first is "true iff b and c are equivalent", and the - second is "true iff c and y refer to the same position." Is there - a difference between the undefined term "equivalent" and "refer - to the same position"? - - Similarly, for a random access traversal iterator:: - - c.distance_to(b) - c.distance_to(z) - - where z is a constant object of a random access traversal - iterator that is interoperable with X. Again, X is interoperable - with itself, so c.distance_to(b) is redundant. Also, the - specification for c.distance_to(z) isn't valid. It's written - as "equivalent to distance(c, z)". The template function distance - takes two arguments of the same type, so distance(c, z) isn't - valid if c and z are different types. Should it be - distance(c, (X)z)? - -:Proposed resolution: Removed the 'b' versions (see 9.35) and added the cast. - - Change: - - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.distance_to(z)``|convertible to |equivalent to ``distance(c, z)``. |Random Access Traversal | - | |X::difference_type |Implements ``c - z``, ``c < z``, ``c |Iterator | - | | |<= z``, ``c > z``, and ``c >= c``. | | - +--------------------+-------------------+-------------------------------------+---------------------------+ - - to: - - +--------------------+----------------------+-------------------------+---------------------------+ - |``c.distance_to(z)``|convertible to |equivalent to |Random Access Traversal | - | |``F::difference_type``|``distance(c, X(z))``. |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - - - -==================================== - More Issues (not from Matt's list) -==================================== - - - -9.37x Inheritance in iterator_adaptor and other adaptors is an overspecification -================================================================================ - -:Submitter: Pete Becker -:Status: New - -c++std-lib-12696: -The paper requires that iterator_adaptor be derived from an -appropriate instance of iterator_facade, and that most of the specific -forms of adaptors be derived from appropriate instances of -iterator_adaptor. That seems like overspecification, and we ought to -look at specifying these things in terms of what the various templates -provide rather than how they're implemented. - -:Proposed resolution: - - Remove the specfication of inheritance, and add explicit - specification of all the functionality that was inherited from the - specialized iterators. - - In iterator_adaptor, inheritance is retained, sorry NAD. Also, - the Interoperable Iterators concept is added to the new iterator - concepts, and this concept is used in the specification of the - iterator adaptors. - - - In n1550, after [lib.random.access.traversal.iterators], add: - - Interoperable Iterators [lib.interoperable.iterators] - - A class or built-in type ``X`` that models Single Pass Iterator - is *interoperable with* a class or built-in type ``Y`` that - also models Single Pass Iterator if the following expressions - are valid and respect the stated semantics. In the tables - below, ``x`` is an object of type ``X``, ``y`` is an object of - type ``Y``, ``Distance`` is - ``iterator_traits::difference_type``, and ``n`` represents a - constant object of type ``Distance``. - - +-----------+-----------------------+---------------------------------------------------+ - |Expression |Return Type |Assertion/Precondition/Postcondition | - +===========+=======================+===================================================+ - |``y = x`` |``Y`` |post: ``y == x`` | - +-----------+-----------------------+---------------------------------------------------+ - |``Y(x)`` |``Y`` |post: ``Y(x) == x`` | - +-----------+-----------------------+---------------------------------------------------+ - |``x == y`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. | - +-----------+-----------------------+---------------------------------------------------+ - |``y == x`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. | - +-----------+-----------------------+---------------------------------------------------+ - |``x != y`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain. | - +-----------+-----------------------+---------------------------------------------------+ - |``y != x`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain. | - +-----------+-----------------------+---------------------------------------------------+ - - If ``X`` and ``Y`` both model Random Access Traversal Iterator then - the following additional requirements must be met. - - +-----------+-----------------------+---------------------+--------------------------------------+ - |Expression |Return Type |Operational Semantics|Assertion/ Precondition | - +===========+=======================+=====================+======================================+ - |``x < y`` |convertible to ``bool``|``y - x > 0`` |``<`` is a total ordering relation | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``y < x`` |convertible to ``bool``|``x - y > 0`` |``<`` is a total ordering relation | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``x > y`` |convertible to ``bool``|``y < x`` |``>`` is a total ordering relation | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``y > x`` |convertible to ``bool``|``x < y`` |``>`` is a total ordering relation | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``x >= y`` |convertible to ``bool``|``!(x < y)`` | | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``y >= x`` |convertible to ``bool``|``!(y < x)`` | | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``x <= y`` |convertible to ``bool``|``!(x > y)`` | | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``y <= x`` |convertible to ``bool``|``!(y > x)`` | | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``y - x`` |``Distance`` |``distance(Y(x),y)`` |pre: there exists a value ``n`` of | - | | | |``Distance`` such that ``x + n == y``.| - | | | |``y == x + (y - x)``. | - +-----------+-----------------------+---------------------+--------------------------------------+ - |``x - y`` |``Distance`` |``distance(y,Y(x))`` |pre: there exists a value ``n`` of | - | | | |``Distance`` such that ``y + n == x``.| - | | | |``x == y + (x - y)``. | - +-----------+-----------------------+---------------------+--------------------------------------+ - - - - In N1530: - - In [lib.iterator.adaptor] - - Change:: - - class iterator_adaptor - : public iterator_facade - - To:: - - class iterator_adaptor - : public iterator_facade // see details - - - Change the text from: - The ``Base`` type must implement the expressions involving - ``m_iterator`` in the specifications... - - until the end of the **iterator_adaptor requirements** section, to: - The ``Base`` argument shall be Assignable and Copy Constructible. - - - Add: - -.. topic:: ``iterator_adaptor`` base class parameters - - The *V'*, *C'*, *R'*, and *D'* parameters of the ``iterator_facade`` - used as a base class in the summary of ``iterator_adaptor`` - above are defined as follows: - - .. parsed-literal:: - - *V'* = if (Value is use_default) - return iterator_traits::value_type - else - return Value - - *C'* = if (CategoryOrTraversal is use_default) - return iterator_traversal::type - else - return CategoryOrTraversal - - *R'* = if (Reference is use_default) - if (Value is use_default) - return iterator_traits::reference - else - return Value& - else - return Reference - - *D'* = if (Difference is use_default) - return iterator_traits::difference_type - else - return Difference - - - In [lib.iterator.special.adaptors] - - Change:: - - class indirect_iterator - : public iterator_adaptor - { - friend class iterator_core_access; - - to:: - - class indirect_iterator - { - public: - typedef /* see below */ value_type; - typedef /* see below */ reference; - typedef /* see below */ pointer; - typedef /* see below */ difference_type; - typedef /* see below */ iterator_category; - - Change:: - - private: // as-if specification - typename indirect_iterator::reference dereference() const - { - return **this->base(); - } - - to:: - - Iterator const& base() const; - reference operator*() const; - indirect_iterator& operator++(); - indirect_iterator& operator--(); - private: - Iterator m_iterator; // exposition - - - After the synopsis add: - - The member types of ``indirect_iterator`` are defined - according to the following pseudo-code, where ``V`` is - ``iterator_traits::value_type`` - - .. parsed-literal:: - - if (Value is use_default) then - typedef remove_const::type>::type value_type; - else - typedef remove_const::type value_type; - - if (Reference is use_default) then - if (Value is use_default) then - typedef indirect_reference::type reference; - else - typedef Value& reference; - else - typedef Reference reference; - - if (Value is use_default) then - typedef pointee::type\* pointer; - else - typedef Value\* pointer; - - if (Difference is use_default) - typedef iterator_traits::difference_type difference_type; - else - typedef Difference difference_type; - - if (CategoryOrTraversal is use_default) - typedef |iterator-category|\ ( - iterator_traversal::type,``reference``,``value_type`` - ) iterator_category; - else - typedef |iterator-category|\ ( - CategoryOrTraversal,``reference``,``value_type`` - ) iterator_category; - - - [Note: See resolution to 9.44y for a description of ``pointee`` and - ``indirect_reference``] - - After the requirements section, add: - -.. topic:: ``indirect_iterator`` models - - - In addition to the concepts indicated by ``iterator_category`` - and by ``iterator_traversal::type``, a - specialization of ``indirect_iterator`` models the following - concepts, Where ``v`` is an object of - ``iterator_traits::value_type``: - - * Readable Iterator if ``reference(*v)`` is convertible to - ``value_type``. - - * Writable Iterator if ``reference(*v) = t`` is a valid - expression (where ``t`` is an object of type - ``indirect_iterator::value_type``) - - * Lvalue Iterator if ``reference`` is a reference type. - - ``indirect_iterator`` is interoperable with - ``indirect_iterator`` if and only if ``X`` is - interoperable with ``Y``. - - - Before ``indirect_iterator();`` add: - - In addition to the operations required by the concepts described - above, specializations of ``indirect_iterator`` provide the - following operations. - - Change: - :Returns: An instance of ``indirect_iterator`` with - the ``iterator_adaptor`` subobject copy constructed from ``x``. - - to: - :Returns: An instance of ``indirect_iterator`` with - ``m_iterator`` copy constructed from ``x``. - - - At the end of the indirect_iterator operations add: - - ``Iterator const& base() const;`` - - :Returns: ``m_iterator`` - - - ``reference operator*() const;`` - - :Returns: ``**m_iterator`` - - - ``indirect_iterator& operator++();`` - - :Effects: ``++m_iterator`` - :Returns: ``*this`` - - - ``indirect_iterator& operator--();`` - - :Effects: ``--m_iterator`` - :Returns: ``*this`` - - - - Change:: - - template - class reverse_iterator : - public iterator_adaptor< reverse_iterator, Iterator > - { - friend class iterator_core_access; - - to:: - - template - class reverse_iterator - { - public: - typedef iterator_traits::value_type value_type; - typedef iterator_traits::reference reference; - typedef iterator_traits::pointer pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - Change:: - - private: // as-if specification - typename reverse_iterator::reference dereference() const { return *prior(this->base()); } - - void increment() { --this->base_reference(); } - void decrement() { ++this->base_reference(); } - - void advance(typename reverse_iterator::difference_type n) - { - this->base_reference() += -n; - } - - template - typename reverse_iterator::difference_type - distance_to(reverse_iterator const& y) const - { - return this->base_reference() - y.base(); - } - - to:: - - Iterator const& base() const; - reference operator*() const; - reverse_iterator& operator++(); - reverse_iterator& operator--(); - private: - Iterator m_iterator; // exposition - - After the synopsis for ``reverse_iterator``, add: - If ``Iterator`` models Random Access Traversal Iterator and Readable - Lvalue Iterator, then ``iterator_category`` is convertible to - ``random_access_iterator_tag``. Otherwise, if - ``Iterator`` models Bidirectional Traversal Iterator and Readable - Lvalue Iterator, then ``iterator_category`` is convertible to - ``bidirectional_iterator_tag``. Otherwise, ``iterator_category`` is - convertible to ``input_iterator_tag``. - - - Change: - **reverse_iterator requirements** - - The base ``Iterator`` must be a model of Bidirectional Traversal - Iterator. The resulting ``reverse_iterator`` will be a model of the - most refined standard traversal and access concepts that are modeled - by ``Iterator``. - - - to: - **reverse_iterator requirements** - - ``Iterator`` must be a model of Bidirectional Traversal Iterator. - - -.. topic:: ``reverse_iterator`` models - - A specialization of ``reverse_iterator`` models the same iterator - traversal and iterator access concepts modeled by its ``Iterator`` - argument. In addition, it may model old iterator concepts - specified in the following table: - - +---------------------------------------+-----------------------------------+ - | If ``I`` models |then ``reverse_iterator`` models| - +=======================================+===================================+ - | Readable Lvalue Iterator, | Bidirectional Iterator | - | Bidirectional Traversal Iterator | | - +---------------------------------------+-----------------------------------+ - | Writable Lvalue Iterator, | Mutable Bidirectional Iterator | - | Bidirectional Traversal Iterator | | - +---------------------------------------+-----------------------------------+ - | Readable Lvalue Iterator, | Random Access Iterator | - | Random Access Traversal Iterator | | - +---------------------------------------+-----------------------------------+ - | Writable Lvalue Iterator, | Mutable Random Access Iterator | - | Random Access Traversal Iterator | | - +---------------------------------------+-----------------------------------+ - - - ``reverse_iterator`` is interoperable with - ``reverse_iterator`` if and only if ``X`` is interoperable with - ``Y``. - - Change: - :Returns: An instance of ``reverse_iterator`` with a - default constructed base object. - - to: - :Effects: Constructs an instance of ``reverse_iterator`` with ``m_iterator`` - default constructed. - - Change: - :Effects: Constructs an instance of ``reverse_iterator`` with a - base object copy constructed from ``x``. - - to: - :Effects: Constructs an instance of ``reverse_iterator`` with a - ``m_iterator`` constructed from ``x``. - - - Change: - :Returns: An instance of ``reverse_iterator`` that is a copy of ``r``. - - to: - :Effects: Constructs instance of ``reverse_iterator`` whose - ``m_iterator`` subobject is constructed from ``y.base()``. - - - - At the end of the operations for ``reverse_iterator``, add: - ``Iterator const& base() const;`` - - :Returns: ``m_iterator`` - - - ``reference operator*() const;`` - - :Effects: - - :: - - Iterator tmp = m_iterator; - return *--tmp; - - - ``reverse_iterator& operator++();`` - - :Effects: ``--m_iterator`` - :Returns: ``*this`` - - - ``reverse_iterator& operator--();`` - - :Effects: ``++m_iterator`` - :Returns: ``*this`` - - - - Change:: - - class transform_iterator - : public iterator_adaptor - { - friend class iterator_core_access; - - to:: - - class transform_iterator - { - public: - typedef /* see below */ value_type; - typedef /* see below */ reference; - typedef /* see below */ pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - - After ``UnaryFunction functor() const;`` add:: - - Iterator const& base() const; - reference operator*() const; - transform_iterator& operator++(); - transform_iterator& operator--(); - - Change:: - - private: - typename transform_iterator::value_type dereference() const; - UnaryFunction m_f; - }; - - to:: - - private: - Iterator m_iterator; // exposition only - UnaryFunction m_f; // exposition only - }; - - - After the synopsis, add: - If ``Iterator`` models Readable Lvalue Iterator and if ``Iterator`` - models Random Access Traversal Iterator, then ``iterator_category`` is - convertible to ``random_access_iterator_tag``. Otherwise, if - ``Iterator`` models Bidirectional Traversal Iterator, then - ``iterator_category`` is convertible to - ``bidirectional_iterator_tag``. Otherwise ``iterator_category`` is - convertible to ``forward_iterator_tag``. If ``Iterator`` does not - model Readable Lvalue Iterator then ``iterator_category`` is - convertible to ``input_iterator_tag``. - - - In the requirements section, change: - The type ``Iterator`` must at least model Readable Iterator. The - resulting ``transform_iterator`` models the most refined of the - following that is also modeled by ``Iterator``. - - * Writable Lvalue Iterator if - ``result_of::reference)>::type`` - is a non-const reference. - - * Readable Lvalue Iterator if - ``result_of::reference)>::type`` - is a const reference. - - * Readable Iterator otherwise. - - - The ``transform_iterator`` models the most refined standard traversal - concept that is modeled by ``Iterator``. - - The ``reference`` type of ``transform_iterator`` is - ``result_of::reference)>::type``. - The ``value_type`` is ``remove_cv >::type``. - - to: - The argument ``Iterator`` shall model Readable Iterator. - - - After the requirements section, add: - -.. topic:: ``transform_iterator`` models - - The resulting ``transform_iterator`` models the most refined of the - following options that is also modeled by ``Iterator``. - - * Writable Lvalue Iterator if - ``transform_iterator::reference`` is a non-const - reference. - - * Readable Lvalue Iterator if - ``transform_iterator::reference`` is a const reference. - - * Readable Iterator otherwise. - - The ``transform_iterator`` models the most refined standard traversal - concept that is modeled by the ``Iterator`` argument. - - 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. - - +-----------------------------------+-----------------------------------+ - | If ``Iterator`` models |then ``transform_iterator`` models | - +===================================+===================================+ - | Single Pass Iterator | Input Iterator | - +-----------------------------------+-----------------------------------+ - | Forward Traversal Iterator | Forward Iterator | - +-----------------------------------+-----------------------------------+ - | Bidirectional Traversal Iterator | Bidirectional Iterator | - +-----------------------------------+-----------------------------------+ - | Random Access Traversal Iterator | Random Access Iterator | - +-----------------------------------+-----------------------------------+ - - If ``transform_iterator`` models Writable Lvalue Iterator then it is a - mutable iterator (as defined in the old iterator requirements). - - ``transform_iterator`` is interoperable with - ``transform_iterator`` if and only if ``X`` is - interoperable with ``Y``. - - - Remove the private operations section heading and remove:: - - ``typename transform_iterator::value_type dereference() const;`` - - :Returns: ``m_f(transform_iterator::dereference());`` - - After the entry for ``functor()``, add:: - - ``Iterator const& base() const;`` - - :Returns: ``m_iterator`` - - - ``reference operator*() const;`` - - :Returns: ``m_f(*m_iterator)`` - - - ``transform_iterator& operator++();`` - - :Effects: ``++m_iterator`` - :Returns: ``*this`` - - - ``transform_iterator& operator--();`` - - :Effects: ``--m_iterator`` - :Returns: ``*this`` - - - Change:: - - template - class filter_iterator - : public iterator_adaptor< - filter_iterator, Iterator - , use_default - , /* see details */ - > - { - public: - - to:: - - template - class filter_iterator - { - public: - typedef iterator_traits::value_type value_type; - typedef iterator_traits::reference reference; - typedef iterator_traits::pointer pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - Change:: - - private: // as-if specification - void increment() - { - ++(this->base_reference()); - satisfy_predicate(); - } - - void satisfy_predicate() - { - while (this->base() != this->m_end && !this->m_predicate(*this->base())) - ++(this->base_reference()); - } - - Predicate m_predicate; - Iterator m_end; - - to:: - - Iterator const& base() const; - reference operator*() const; - filter_iterator& operator++(); - private: - Predicate m_pred; // exposition only - Iterator m_iter; // exposition only - Iterator m_end; // exposition only - - - - Change: - The base ``Iterator`` parameter must be a model of Readable - Iterator and Single Pass Iterator. The resulting - ``filter_iterator`` will be a model of Forward Traversal Iterator - if ``Iterator`` is, otherwise the ``filter_iterator`` will be a - model of Single Pass Iterator. The access category of the - ``filter_iterator`` will be the same as the access category of - ``Iterator``. - - to: - The ``Iterator`` argument shall meet the requirements of Readable - Iterator and Single Pass Iterator or it shall meet the requirements of - Input Iterator. - - After the requirements section, add: - -.. topic:: ``filter_iterator`` models - - The concepts that ``filter_iterator`` models are dependent on which - concepts the ``Iterator`` argument models, as specified in the - following tables. - - +-----------------------------+----------------------------------------------------------+ - | If ``Iterator`` models | then ``filter_iterator`` models | - +=============================+==========================================================+ - | Single Pass Iterator | Single Pass Iterator | - +-----------------------------+----------------------------------------------------------+ - | Forward Traversal Iterator | Forward Traversal Iterator | - +-----------------------------+----------------------------------------------------------+ - - +--------------------------------+----------------------------------------------+ - | If ``Iterator`` models | then ``filter_iterator`` models | - +================================+==============================================+ - | Readable Iterator | Readable Iterator | - +--------------------------------+----------------------------------------------+ - | Writable Iterator | Writable Iterator | - +--------------------------------+----------------------------------------------+ - | Lvalue Iterator | Lvalue Iterator | - +--------------------------------+----------------------------------------------+ - - +-------------------------------------------------------+---------------------------------+ - | If ``Iterator`` models | then ``filter_iterator`` models | - +=======================================================+=================================+ - | Readable Iterator, Single Pass Iterator | Input Iterator | - +-------------------------------------------------------+---------------------------------+ - | Readable Lvalue Iterator, Forward Traversal Iterator | Forward Iterator | - +-------------------------------------------------------+---------------------------------+ - | Writable Lvalue Iterator, Forward Traversal Iterator | Mutable Forward Iterator | - +-------------------------------------------------------+---------------------------------+ - - - ``filter_iterator`` is interoperable with ``filter_iterator`` - if and only if ``X`` is interoperable with ``Y``. - - - Change: - :Returns: a ``filter_iterator`` whose - predicate is a default constructed ``Predicate`` and - whose ``end`` is a default constructed ``Iterator``. - - to: - :Effects: Constructs a ``filter_iterator`` whose``m_pred``, ``m_iter``, and ``m_end`` - members are a default constructed. - - Change: - :Returns: A ``filter_iterator`` at position ``x`` that filters according - to predicate ``f`` and that will not increment past ``end``. - - to: - :Effects: Constructs a ``filter_iterator`` where ``m_iter`` is either - the first position in the range ``[x,end)`` such that ``f(*m_iter) == true`` - or else``m_iter == end``. The member ``m_pred`` is constructed from - ``f`` and ``m_end`` from ``end``. - - Change: - :Returns: A ``filter_iterator`` at position ``x`` that filters - according to a default constructed ``Predicate`` - and that will not increment past ``end``. - - to: - :Effects: Constructs a ``filter_iterator`` where ``m_iter`` is either - the first position in the range ``[x,end)`` such that ``m_pred(*m_iter) == true`` - or else``m_iter == end``. The member ``m_pred`` is default constructed. - - - Change: - :Returns: A copy of iterator ``t``. - - to: - :Effects: Constructs a filter iterator whose members are copied from ``t``. - - Change: - :Returns: A copy of the predicate object used to construct ``*this``. - - to: - :Returns: ``m_pred`` - - Change: - :Returns: The object ``end`` used to construct ``*this``. - - to: - :Returns: ``m_end`` - - At the end of the operations section, add: - - ``reference operator*() const;`` - - :Returns: ``*m_iter`` - - - ``filter_iterator& operator++();`` - - :Effects: Increments ``m_iter`` and then continues to - increment ``m_iter`` until either ``m_iter == m_end`` - or ``m_pred(*m_iter) == true``. - :Returns: ``*this`` - - - Change:: - - class counting_iterator - : public iterator_adaptor< - counting_iterator - , Incrementable - , Incrementable - , Access - , /* see details for traversal category */ - , Incrementable const& - , Incrementable const* - , /* distance = Difference or a signed integral type */> - { - friend class iterator_core_access; - public: - - to:: - - class counting_iterator - { - public: - typedef Incrementable value_type; - typedef const Incrementable& reference; - typedef const Incrementable* pointer; - typedef /* see below */ difference_type; - typedef /* see below */ iterator_category; - - - - Change:: - - private: - typename counting_iterator::reference dereference() const - { - return this->base_reference(); - } - - to:: - - Incrementable const& base() const; - reference operator*() const; - counting_iterator& operator++(); - counting_iterator& operator--(); - private: - Incrementable m_inc; // exposition - - After the synopsis, add: - - If the ``Difference`` argument is ``use_default`` then - ``difference_type`` is an unspecified signed integral - type. Otherwise ``difference_type`` is ``Difference``. - - ``iterator_category`` is determined according to the following - algorithm: - - .. parsed-literal:: - - if (CategoryOrTraversal is not use_default) - return CategoryOrTraversal - else if (numeric_limits::is_specialized) - return |iterator-category|\ ( - random_access_traversal_tag, Incrementable, const Incrementable&) - else - return |iterator-category|\ ( - iterator_traversal::type, - Incrementable, const Incrementable&) - - - - Change: - [*Note:* implementers are encouraged to provide an implementation of - ``distance_to`` and a ``difference_type`` that avoids overflows in - the cases when the ``Incrementable`` type is a numeric type.] - - to: - [*Note:* implementers are encouraged to provide an implementation of - ``operator-`` and a ``difference_type`` that avoid overflows in - the cases where ``std::numeric_limits::is_specialized`` - is true.] - - Change: - The ``Incrementable`` type must be Default Constructible, Copy - Constructible, and Assignable. The default distance is - an implementation defined signed integegral type. - - The resulting ``counting_iterator`` models Readable Lvalue Iterator. - - to: - The ``Incrementable`` argument shall be Copy Constructible and Assignable. - - Change: - Furthermore, if you wish to create a counting iterator that is a Forward - Traversal Iterator, then the following expressions must be valid: - - to: - If ``iterator_category`` is convertible to ``forward_iterator_tag`` - or ``forward_traversal_tag``, the following must be well-formed: - - Change: - If you wish to create a counting iterator that is a - Bidirectional Traversal Iterator, then pre-decrement is also required: - - to: - If ``iterator_category`` is convertible to - ``bidirectional_iterator_tag`` or ``bidirectional_traversal_tag``, - the following expression must also be well-formed: - - Change: - If you wish to create a counting iterator that is a Random Access - Traversal Iterator, then these additional expressions are also - required: - - to: - If ``iterator_category`` is convertible to - ``random_access_iterator_tag`` or ``random_access_traversal_tag``, - the following must must also be valid: - - After the requirements section, add: - -.. topic:: ``counting_iterator`` models - - Specializations of ``counting_iterator`` model Readable Lvalue - Iterator. In addition, they model the concepts corresponding to the - iterator tags to which their ``iterator_category`` is convertible. - Also, if ``CategoryOrTraversal`` is not ``use_default`` then - ``counting_iterator`` models the concept corresponding to the iterator - tag ``CategoryOrTraversal``. Otherwise, if - ``numeric_limits::is_specialized``, then - ``counting_iterator`` models Random Access Traversal Iterator. - Otherwise, ``counting_iterator`` models the same iterator traversal - concepts modeled by ``Incrementable``. - - ``counting_iterator`` is interoperable with - ``counting_iterator`` if and only if ``X`` is - interoperable with ``Y``. - - At the begining of the operations section, add: - - In addition to the operations required by the concepts modeled by - ``counting_iterator``, ``counting_iterator`` provides the following - operations. - - Change: - :Returns: A default constructed instance of ``counting_iterator``. - - to: - :Requires: ``Incrementable`` is Default Constructible. - :Effects: Default construct the member ``m_inc``. - - Change: - :Returns: An instance of ``counting_iterator`` that is a copy of ``rhs``. - - to: - :Effects: Construct member ``m_inc`` from ``rhs.m_inc``. - - Change: - :Returns: An instance of ``counting_iterator`` with its base - object copy constructed from ``x``. - - to: - :Effects: Construct member ``m_inc`` from ``x``. - - At the end of the operations section, add: - - ``reference operator*() const;`` - - :Returns: ``m_inc`` - - - ``counting_iterator& operator++();`` - - :Effects: ``++m_inc`` - :Returns: ``*this`` - - - ``counting_iterator& operator--();`` - - :Effects: ``--m_inc`` - :Returns: ``*this`` - - - ``Incrementable const& base() const;`` - - :Returns: ``m_inc`` - - -9.38x Problem with specification of a->m in Readable Iterator -============================================================= - -:Submitter: Howard Hinnant -:Status: New - -c++std-lib-12585: - -Readable Iterator Requirements says: - - +----------+--------+-----------------------------------------------------------+ - | ``a->m`` | ``U&`` | pre: ``(*a).m`` is well-defined. Equivalent to ``(*a).m`` | - +----------+--------+-----------------------------------------------------------+ - -Do we mean to outlaw iterators with proxy references from meeting -the readable requirements? - -Would it be better for the requirements to read ``static_cast(*a).m`` -instead of ``(*a).m`` ? - -:Proposed resolution: NAD. - -:Rationale: We think you're misreading "pre:". - If ``(*a).m`` is not well defined, then the iterator is not - required to provide ``a->m``. So a proxy iterator is not - required to provide ``a->m``. - - As an aside, it is possible for proxy iterators to - support ``->``, so changing the requirements to - read ``static_cast(*a).m`` is interesting. - However, such a change to Readable Iterator would - mean that it no longer corresponds to the - input iterator requirements. So old iterators would not - necessarily conform to new iterator requirements. - - -9.39x counting_iterator Traversal argument unspecified -====================================================== - -:Submitter: Pete Becker - -c++std-lib-12635: - -counting_iterator takes an argument for its Traversal type, with a -default value of use_default. It is derived from an instance of -iterator_adaptor, where the argument passed for the Traversal type -is described as "\ ``/* see details for traversal category -*/``". The details for counting_iterator describe constraints on -the Incrementable type imposed by various traversal -categories. There is no description of what the argument to -iterator_adaptor should be. - - -:Proposed resolution: - We no longer inherit from iterator_adaptor. So instead, - we specify the iterator_category in terms of the Traversal type - (which is now called CategoryOrTraversal). Also the - requirements and models section was reorganized to - match these changes and to make more sense. - - - -9.40x indirect_iterator requirements muddled -============================================ - -:Submitter: Pete Becker - -c++std-lib-12640: - - The value_type of the Iterator template parameter should itself - be dereferenceable. The return type of the ``operator*`` for - the value_type must be the same type as the Reference template - parameter. - - I'd say this a bit differently, to emphasize what's required: - iterator_traits::value_type must be dereferenceable. - The Reference template parameter must be the same type as - ``*iterator_traits::value_type()``. - - The Value template parameter will be the value_type for the - indirect_iterator, unless Value is const. If Value is const X, then - value_type will be non- const X. - - Also non-volatile, right? In other words, if Value isn't use_default, it - just gets passed as the Value argument for iterator_adaptor. - - The default for Value is:: - - iterator_traits< iterator_traits::value_type >::value_type - - If the default is used for Value, then there must be a valid - specialization of iterator_traits for the value type of the - base iterator. - - The earlier requirement is that - ``iterator_traits::value_type`` must be - dereferenceable. Now it's being treated as an iterator. Is this - just a pun, or is ``iterator_traits::value_type`` - required to be some form of iterator? If it's the former we need - to find a different way to say it. If it's the latter we need to - say so. - -:Proposed resolution: - Change: - - The ``value_type`` of the ``Iterator`` template parameter - should itself be dereferenceable. The return type of the - ``operator*`` for the ``value_type`` must be the same type as - the ``Reference`` template parameter. The ``Value`` template - parameter will be the ``value_type`` for the - ``indirect_iterator``, unless ``Value`` is const. If ``Value`` - is ``const X``, then ``value_type`` will be *non-* ``const X``. - The default for ``Value`` is:: - - iterator_traits< iterator_traits::value_type >::value_type - - If the default is used for ``Value``, then there must be a - valid specialization of ``iterator_traits`` for the value type - of the base iterator. - - The ``Reference`` parameter will be the ``reference`` type of the - ``indirect_iterator``. The default is ``Value&``. - - The ``Access`` and ``Traversal`` parameters are passed - unchanged to the corresponding parameters of the - ``iterator_adaptor`` base class, and the ``Iterator`` parameter - is passed unchanged as the ``Base`` parameter to the - ``iterator_adaptor`` base class. - - to: - - The expression ``*v``, where ``v`` is an object of - ``iterator_traits::value_type``, shall be valid - expression and convertible to ``reference``. ``Iterator`` - shall model the traversal concept indicated by - ``iterator_category``. ``Value``, ``Reference``, and - ``Difference`` shall be chosen so that ``value_type``, - ``reference``, and ``difference_type`` meet the requirements - indicated by ``iterator_category``. - - [Note: there are further requirements on the - ``iterator_traits::value_type`` if the ``Value`` - parameter is not ``use_default``, as implied by the algorithm - for deducing the default for the ``value_type`` member.] - - -:Rationale: Not included above is the specification of the - ``value_type``, ``reference``, etc., members, which is handled by - the changes in 9.37x. - - -9.41x Problem with transform_iterator requirements -================================================== - -:Submitter: Pete Becker - -c++std-lib-12641: - - The reference type of transform_iterator is ``result_of< - UnaryFunction(iterator_traits::reference) - >::type``. The ``value_type`` is - ``remove_cv >::type``. - -These are the defaults, right? If the user supplies their own types -that's what gets passed to iterator_adaptor. And again, the -specification should be in terms of the specialization of -iterator_adaptor, and not in terms of the result: - -Reference argument to iterator_adaptor:: - - if (Reference != use_default) - Reference - else - result_of< - UnaryFunction(iterator_traits::reference) - >::type - -Value argument to iterator_adaptor:: - - if (Value != use_default) - Value - else if (Reference != use_default) - remove_reference::type - else - remove_reference< - result_of< - UnaryFunction(iterator_traits::reference) - >::type - >::type - -There's probably a better way to specify that last alternative, but -I've been at this too long, and it's all turning into a maze of -twisty passages, all alike. - -:Proposed resolution: - Replace: - - The reference type of transform_iterator is ``result_of< - UnaryFunction(iterator_traits::reference) - >::type``. The ``value_type`` is - ``remove_cv >::type``. - - with: - - If ``Reference`` is ``use_default`` then the ``reference`` - member of ``transform_iterator`` is ``result_of< - UnaryFunction(iterator_traits::reference) - >::type``. Otherwise, ``reference`` is ``Reference``. - - If ``Value`` is ``use_default`` then the ``value_type`` - member is ``remove_cv >::type``. - Otherwise, ``value_type`` is ``Value``. - - -9.42x filter_iterator details unspecified -========================================= - -:Submitter: Pete Becker - -c++std-lib-12642: - -The paper says:: - - template - class filter_iterator - : public iterator_adaptor< - filter_iterator, - Iterator, - use_default, - /* see details */ > - -That comment covers the Access, Traversal, Reference, and Difference -arguments. The only specification for any of these in the details is: - - The access category of the filter_iterator will be the same as - the access category of Iterator. - -Needs more. - -:Proposed resolution: - Add to the synopsis:: - - typedef iterator_traits::value_type value_type; - typedef iterator_traits::reference reference; - typedef iterator_traits::pointer pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - and add just after the synopsis: - - If ``Iterator`` models Readable Lvalue Iterator and Forward - Traversal Iterator then ``iterator_category`` is convertible - to ``std::forward_iterator_tag``. Otherwise - ``iterator_category`` is convertible to - ``std::input_iterator_tag``. - - -9.43x transform_iterator interoperability too restrictive -========================================================= - -:Submitter: Jeremy Siek - -We do not need to require that the function objects have the same -type, just that they be convertible. - -:Proposed resolution: - - Change:: - - template - transform_iterator( - transform_iterator const& t - , typename enable_if_convertible::type* = 0 // exposition - ); - - to:: - - template - transform_iterator( - transform_iterator const& t - , typename enable_if_convertible::type* = 0 // exposition only - , typename enable_if_convertible::type* = 0 // exposition only - ); - - -9.44y ``indirect_iterator`` and smart pointers -============================================== - -:Submitter: Dave Abrahams - -``indirect_iterator`` should be able to iterate over containers of -smart pointers, but the mechanism that allows it was left out of -the specification, even though it's present in the Boost -specification - -:Proposed resolution: Add ``pointee`` and ``indirect_reference`` - to deal with this capability. - - In [lib.iterator.helper.synopsis], add:: - - template - struct pointee; - - template - struct indirect_reference; - - After ``indirect_iterator``\ 's abstract, add: - -.. topic:: Class template ``pointee`` - - .. include:: pointee_ref.rst - -.. topic:: Class template ``indirect_reference`` - - .. include:: indirect_reference_ref.rst - -See proposed resolution to Issue 9.37x for more changes related to -this issue. - -9.45y N1530: Typos and editorial changes in proposal text (not standardese) -=========================================================================== - -:Submitter: Dave Abrahams - -1. "because specification helps to highlight that the ``Reference`` - template parameter may not always be identical to the iterator's - ``reference`` type, and will keep users making mistakes based on - that assumption." - - :Proposed resolution: add "from" before "making" - -2. mention of obsolete projection_iterator - - :Proposed Resolution: - - From n1530, in the **Specialized Adaptors** section, remove: - - ``projection_iterator``, which is similar to ``transform_iterator`` - except that when dereferenced it returns a reference instead of - a value. - - :Rationale: - This iterator was in the original boost library, but the new - iterator concepts allowed this iterator to be - folded into ``transform_iterator``. - - - -9.46y N1530: ``base()`` return-by-value is costly -================================================= - -:Submitter: Dave Abrahams - -We've had some real-life reports that iterators that use -``iterator_adaptor``\ 's ``base()`` function can be inefficient -when the ``Base`` iterator is expensive to copy. Iterators, of -all things, should be efficient. - -:Proposed resolution: - - In [lib.iterator.adaptor] - - Change:: - - Base base() const; - - to:: - - Base const& base() const; - - twice (once in the synopsis and once in the **public - operations** section). - - -9.47x Forgot default constructible in Forward Traversal Iterator -================================================================ - -:Submitter: Jeremy Siek - -We want Forward Traversal Iterator plus Readable Lvalue Iterator to -match the old Foward Iterator requirements, so we need Forward -Traversal Iterator to include Default Constructible. - -:Proposed resolution: - - Change: - - A class or built-in type ``X`` models the *Forward Traversal Iterator* - concept if the following expressions are valid and respect the stated - semantics. - - +-------------------------------------------------------------------------------------------+ - |Forward Traversal Iterator Requirements (in addition to Single Pass Iterator) | - +---------------------------------------+-----------------------------------+---------------+ - - to: - - A class or built-in type ``X`` models the *Forward Traversal Iterator* - 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. - - +--------------------------------------------------------------------------------------------------------+ - |Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator) | - +---------------------------------------+-----------------------------------+----------------------------+ - -9.48x Editorial changes (non-normative text) -============================================ - -Change: - Iterator facade uses the Curiously Recurring Template Pattern (CRTP) - [Cop95] so that the user can specify the behavior of - ``iterator_facade`` in a derived class. Former designs used policy - objects to specify the behavior. ``iterator_facade`` does not use policy - objects for several reasons: - -to: - Iterator facade uses the Curiously Recurring Template - Pattern (CRTP) [Cop95] so that the user can specify the behavior - of ``iterator_facade`` in a derived class. Former designs used - policy objects to specify the behavior, but that approach was - discarded for several reasons: - - -Change: - iterator's ``operator++`` returns the iterator type itself means - that all iterators generated by ``iterator_facade`` would be - instantiations of ``iterator_facade``. Cumbersome type generator - -to: - iterator's ``operator++`` returns the iterator type itself - would mean that all iterators built with the library would - have to be specializations of ``iterator_facade<...>``, rather - than something more descriptive like - ``indirect_iterator``. Cumbersome type generator - - -Change: - The return type for ``operator->`` and ``operator[]`` is not - explicitly specified. Instead it requires each ``iterator_facade`` - instantiation to meet the requirements of its ``iterator_category``. - -To: - The return types for ``iterator_facade``\ 's ``operator->`` and - ``operator[]`` are not explicitly specified. Instead, those types - are described in terms of a set of requirements, which must be - satisfied by the ``iterator_facade`` implementation. - - -9.49x Clarification of iterator_facade requirements and type members -==================================================================== - -A general cleanup and simplification of the requirements and -description of type members for ``iterator_facade``. - - -The user is only allowed to add ``const`` as a qualifier. - -Change: - ``typedef remove_cv::type value_type;`` - -to: - ``typedef remove_const::type value_type;`` - - -We use to have an unspecified type for ``pointer``, to match the -return type of ``operator->``, but there's no real reason to make them -match, so we just use the simpler ``Value*`` for ``pointer``. - -Change: - - ``typedef /* see description of operator-> */ pointer;`` - -To: - ``typedef Value* pointer;`` - - -Remove: - Some of the constraints on template parameters to - ``iterator_facade`` are expressed in terms of resulting nested - types and should be viewed in the context of their impact on - ``iterator_traits``. - -Change: - The ``Derived`` template parameter must be a class derived from - ``iterator_facade``. - -and: - The following table describes the other requirements on the - ``Derived`` parameter. Depending on the resulting iterator's - ``iterator_category``, a subset of the expressions listed in the table - are required to be valid. The operations in the first column must be - accessible to member functions of class ``iterator_core_access``. - -to: - The following table describes the typical valid expressions on - ``iterator_facade``\ 's ``Derived`` parameter, depending on the - iterator concept(s) it will model. The operations in the first - column must be made accessible to member functions of class - ``iterator_core_access``. In addition, - ``static_cast(iterator_facade*)`` shall be well-formed. - - -Remove: - The nested ``::value_type`` type will be the same as - ``remove_cv::type``, so the ``Value`` parameter must be - an (optionally ``const``\ -qualified) non-reference type. - - The nested ``::reference`` will be the same as the ``Reference`` - parameter; it must be a suitable reference type for the resulting - iterator. The default for the ``Reference`` parameter is - ``Value&``. - - -Change: - - In the table below, ``X`` is the derived iterator type, ``a`` is an - object of type ``X``, ``b`` and ``c`` are objects of type ``const X``, - ``n`` is an object of ``X::difference_type``, ``y`` is a constant - object of a single pass iterator type interoperable with X, and ``z`` - is a constant object of a random access traversal iterator type - interoperable with ``X``. - - +--------------------+-------------------+-------------------------------------+---------------------------+ - |Expression |Return Type |Assertion/Note |Required to implement | - | | | |Iterator Concept(s) | - +====================+===================+=====================================+===========================+ - |``c.dereference()`` |``X::reference`` | |Readable Iterator, Writable| - | | | |Iterator | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.equal(b)`` |convertible to bool|true iff ``b`` and ``c`` are |Single Pass Iterator | - | | |equivalent. | | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.equal(y)`` |convertible to bool|true iff ``c`` and ``y`` refer to the|Single Pass Iterator | - | | |same position. Implements ``c == y``| | - | | |and ``c != y``. | | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``a.advance(n)`` |unused | |Random Access Traversal | - | | | |Iterator | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``a.increment()`` |unused | |Incrementable Iterator | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``a.decrement()`` |unused | |Bidirectional Traversal | - | | | |Iterator | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.distance_to(b)``|convertible to |equivalent to ``distance(c, b)`` |Random Access Traversal | - | |X::difference_type | |Iterator | - +--------------------+-------------------+-------------------------------------+---------------------------+ - |``c.distance_to(z)``|convertible to |equivalent to ``distance(c, z)``. |Random Access Traversal | - | |X::difference_type |Implements ``c - z``, ``c < z``, ``c |Iterator | - | | |<= z``, ``c > z``, and ``c >= c``. | | - +--------------------+-------------------+-------------------------------------+---------------------------+ - -to: - - In the table below, ``F`` is ``iterator_facade``, ``a`` is an - object of type ``X``, ``b`` and ``c`` are objects of type ``const X``, - ``n`` is an object of ``F::difference_type``, ``y`` is a constant - object of a single pass iterator type interoperable with ``X``, and ``z`` - is a constant object of a random access traversal iterator type - interoperable with ``X``. - - **iterator_facade Core Operations** - - +--------------------+----------------------+-------------------------+---------------------------+ - |Expression |Return Type |Assertion/Note |Used to implement Iterator | - | | | |Concept(s) | - +====================+======================+=========================+===========================+ - |``c.dereference()`` |``F::reference`` | |Readable Iterator, Writable| - | | | |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``c.equal(y)`` |convertible to bool |true iff ``c`` and ``y`` |Single Pass Iterator | - | | |refer to the same | | - | | |position. | | - +--------------------+----------------------+-------------------------+---------------------------+ - |``a.increment()`` |unused | |Incrementable Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``a.decrement()`` |unused | |Bidirectional Traversal | - | | | |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``a.advance(n)`` |unused | |Random Access Traversal | - | | | |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``c.distance_to(z)``|convertible to |equivalent to |Random Access Traversal | - | |``F::difference_type``|``distance(c, X(z))``. |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - - - diff --git a/doc/iterator_adaptor.html b/doc/iterator_adaptor.html deleted file mode 100644 index 5e5934f..0000000 --- a/doc/iterator_adaptor.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - -Iterator Adaptor - - - - - - - -
-

Iterator Adaptor

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:
- - -

Each specialization of the iterator_adaptor class template is derived from -a specialization of iterator_facade. The core interface functions -expected by iterator_facade are implemented in terms of the -iterator_adaptor's Base template parameter. A class derived -from iterator_adaptor typically redefines some of the core -interface functions to adapt the behavior of the Base type. -Whether the derived class models any of the standard iterator concepts -depends on the operations supported by the Base type and which -core interface functions of iterator_facade are redefined in the -Derived class.

- -
-

Overview

- - -

The iterator_adaptor class template adapts some Base [1] -type to create a new iterator. Instantiations of iterator_adaptor -are derived from a corresponding instantiation of iterator_facade -and implement the core behaviors in terms of the Base type. In -essence, iterator_adaptor merely forwards all operations to an -instance of the Base type, which it stores as a member.

- - - - - -
[1](1, 2) The term "Base" here does not refer to a base class and is -not meant to imply the use of derivation. We have followed the lead -of the standard library, which provides a base() function to access -the underlying iterator object of a reverse_iterator adaptor.
-

The user of iterator_adaptor creates a class derived from an -instantiation of iterator_adaptor and then selectively -redefines some of the core member functions described in the -iterator_facade core requirements table. The Base type need -not meet the full requirements for an iterator; it need only -support the operations used by the core interface functions of -iterator_adaptor that have not been redefined in the user's -derived class.

-

Several of the template parameters of iterator_adaptor default -to use_default. This allows the -user to make use of a default parameter even when she wants to -specify a parameter later in the parameter list. Also, the -defaults for the corresponding associated types are somewhat -complicated, so metaprogramming is required to compute them, and -use_default can help to simplify the implementation. Finally, -the identity of the use_default type is not left unspecified -because specification helps to highlight that the Reference -template parameter may not always be identical to the iterator's -reference type, and will keep users from making mistakes based on -that assumption.

-
-
-

Reference

- - -
-template <
-    class Derived
-  , class Base
-  , class Value               = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference           = use_default
-  , class Difference = use_default
->
-class iterator_adaptor 
-  : public iterator_facade<Derived, V', C', R', D'> // see details
-{
-    friend class iterator_core_access;
- public:
-    iterator_adaptor();
-    explicit iterator_adaptor(Base const& iter);
-    typedef Base base_type;
-    Base const& base() const;
- protected:
-    typedef iterator_adaptor iterator_adaptor_;
-    Base const& base_reference() const;
-    Base& base_reference();
- private: // Core iterator interface for iterator_facade.  
-    typename iterator_adaptor::reference dereference() const;
-
-    template <
-    class OtherDerived, class OtherIterator, class V, class C, class R, class D
-    >   
-    bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const;
-
-    void advance(typename iterator_adaptor::difference_type n);
-    void increment();
-    void decrement();
-
-    template <
-        class OtherDerived, class OtherIterator, class V, class C, class R, class D
-    >   
-    typename iterator_adaptor::difference_type distance_to(
-        iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const;
-
- private:
-    Base m_iterator; // exposition only
-};
-
-
-

iterator_adaptor requirements

-

static_cast<Derived*>(iterator_adaptor*) shall be well-formed. -The Base argument shall be Assignable and Copy Constructible.

-
-
-

iterator_adaptor base class parameters

-

The V', C', R', and D' parameters of the iterator_facade -used as a base class in the summary of iterator_adaptor -above are defined as follows:

-
-V' = if (Value is use_default)
-          return iterator_traits<Base>::value_type
-      else
-          return Value
-
-C' = if (CategoryOrTraversal is use_default)
-          return iterator_traversal<Base>::type
-      else
-          return CategoryOrTraversal
-
-R' = if (Reference is use_default)
-          if (Value is use_default)
-              return iterator_traits<Base>::reference
-          else
-              return Value&
-      else
-          return Reference
-
-D' = if (Difference is use_default)
-          return iterator_traits<Base>::difference_type
-      else
-          return Difference
-
- - - -
-
-

iterator_adaptor public operations

-

iterator_adaptor();

- --- - - - - - -
Requires:The Base type must be Default Constructible.
Returns:An instance of iterator_adaptor with -m_iterator default constructed.
-

explicit iterator_adaptor(Base const& iter);

- --- - - - -
Returns:An instance of iterator_adaptor with -m_iterator copy constructed from iter.
-

Base const& base() const;

- --- - - - -
Returns:m_iterator
-
-
-

iterator_adaptor protected member functions

-

Base const& base_reference() const;

- --- - - - -
Returns:A const reference to m_iterator.
-

Base& base_reference();

- --- - - - -
Returns:A non-const reference to m_iterator.
-
-
-

iterator_adaptor private member functions

-

typename iterator_adaptor::reference dereference() const;

- --- - - - -
Returns:*m_iterator
-
-template <
-class OtherDerived, class OtherIterator, class V, class C, class R, class D
->   
-bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const;
-
- --- - - - -
Returns:m_iterator == x.base()
-

void advance(typename iterator_adaptor::difference_type n);

- --- - - - -
Effects:m_iterator += n;
-

void increment();

- --- - - - -
Effects:++m_iterator;
-

void decrement();

- --- - - - -
Effects:--m_iterator;
-
-template <
-    class OtherDerived, class OtherIterator, class V, class C, class R, class D
->   
-typename iterator_adaptor::difference_type distance_to(
-    iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const;
-
- --- - - - -
Returns:y.base() - m_iterator
-
-
-
-

Tutorial Example

- - - -

In this section we'll further refine the node_iter class -template we developed in the iterator_facade tutorial. If you haven't already -read that material, you should go back now and check it out because -we're going to pick up right where it left off.

- -

You probably didn't think of it this way, but the node_base* -object that underlies node_iterator is itself an iterator, -just like all other pointers. If we examine that pointer closely -from an iterator perspective, we can see that it has much in common -with the node_iterator we're building. First, they share most -of the same associated types (value_type, reference, -pointer, and difference_type). Second, even some of the -core functionality is the same: operator* and operator== on -the node_iterator return the result of invoking the same -operations on the underlying pointer, via the node_iterator's -dereference and equal member functions). The only real behavioral difference -between node_base* and node_iterator can be observed when -they are incremented: node_iterator follows the -m_next pointer, while node_base* just applies an address offset.

-

It turns out that the pattern of building an iterator on another -iterator-like type (the Base [1] type) while modifying -just a few aspects of the underlying type's behavior is an -extremely common one, and it's the pattern addressed by -iterator_adaptor. Using iterator_adaptor is very much like -using iterator_facade, but because iterator_adaptor tries to -mimic as much of the Base type's behavior as possible, we -neither have to supply a Value argument, nor implement any core -behaviors other than increment. The implementation of -node_iter is thus reduced to:

-
-template <class Value>
-class node_iter
-  : public boost::iterator_adaptor<
-        node_iter<Value>                // Derived
-      , Value*                          // Base
-      , boost::use_default              // Value
-      , boost::forward_traversal_tag    // CategoryOrTraversal
-    >
-{
- private:
-    struct enabler {};  // a private type avoids misuse
-
- public:
-    node_iter()
-      : node_iter::iterator_adaptor_(0) {}
-
-    explicit node_iter(Value* p)
-      : node_iter::iterator_adaptor_(p) {}
-
-    template <class OtherValue>
-    node_iter(
-        node_iter<OtherValue> const& other
-      , typename boost::enable_if<
-            boost::is_convertible<OtherValue*,Value*>
-          , enabler
-        >::type = enabler()
-    )
-      : node_iter::iterator_adaptor_(other.base()) {}
-
- private:
-    friend class boost::iterator_core_access;
-    void increment() { this->base_reference() = this->base()->next(); }
-};
-
-

Note the use of node_iter::iterator_adaptor_ here: because -iterator_adaptor defines a nested iterator_adaptor_ type -that refers to itself, that gives us a convenient way to refer to -the complicated base class type of node_iter<Value>. [Note: -this technique is known not to work with Borland C++ 5.6.4 and -Metrowerks CodeWarrior versions prior to 9.0]

-

You can see an example program that exercises this version of the -node iterators here.

-

In the case of node_iter, it's not very compelling to pass -boost::use_default as iterator_adaptor's Value -argument; we could have just passed node_iter's Value -along to iterator_adaptor, and that'd even be shorter! Most -iterator class templates built with iterator_adaptor are -parameterized on another iterator type, rather than on its -value_type. For example, boost::reverse_iterator takes an -iterator type argument and reverses its direction of traversal, -since the original iterator and the reversed one have all the same -associated types, iterator_adaptor's delegation of default -types to its Base saves the implementor of -boost::reverse_iterator from writing:

-
-std::iterator_traits<Iterator>::some-associated-type
-
-

at least four times.

-

We urge you to review the documentation and implementations of -reverse_iterator and the other Boost specialized iterator -adaptors to get an idea of the sorts of things you can do with -iterator_adaptor. In particular, have a look at -transform_iterator, which is perhaps the most straightforward -adaptor, and also counting_iterator, which demonstrates that -iterator_adaptor's Base type needn't be an iterator.

-
-
- - - - diff --git a/doc/iterator_adaptor.pdf b/doc/iterator_adaptor.pdf deleted file mode 100755 index ade87c4..0000000 Binary files a/doc/iterator_adaptor.pdf and /dev/null differ diff --git a/doc/iterator_adaptor.rst b/doc/iterator_adaptor.rst deleted file mode 100644 index 81c34dc..0000000 --- a/doc/iterator_adaptor.rst +++ /dev/null @@ -1,37 +0,0 @@ -+++++++++++++++++ - Iterator Adaptor -+++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - -.. include:: iterator_adaptor_abstract.rst - -.. contents:: Table of Contents - -Overview -======== - -.. include:: iterator_adaptor_body.rst - - -Reference -========= - -.. include:: iterator_adaptor_ref.rst - -Tutorial Example -================ - -.. include:: iterator_adaptor_tutorial.rst diff --git a/doc/iterator_adaptor_abstract.diff b/doc/iterator_adaptor_abstract.diff deleted file mode 100755 index 6cebd77..0000000 --- a/doc/iterator_adaptor_abstract.diff +++ /dev/null @@ -1,22 +0,0 @@ -Index: iterator_adaptor_abstract.rst -=================================================================== -RCS file: /cvsroot/boost/boost/libs/iterator/doc/iterator_adaptor_abstract.rst,v -retrieving revision 1.1 -retrieving revision 1.2 -diff -b -d -u -r1.1 -r1.2 ---- iterator_adaptor_abstract.rst 5 Aug 2003 18:19:55 -0000 1.1 -+++ iterator_adaptor_abstract.rst 24 Nov 2003 05:02:46 -0000 1.2 -@@ -1,5 +1,11 @@ Issue 9.21 --The ``iterator_adaptor`` is a base class template derived from an --instantiation of ``iterator_facade``. The core interface functions -+.. Version 1.1 of this ReStructuredText document corresponds to -+ n1530_, the paper accepted by the LWG. -+ -+.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All -+ rights reserved -+ -+Each specialization of the ``iterator_adaptor`` class template is derived from -+a specialization of ``iterator_facade``. The core interface functions - expected by ``iterator_facade`` are implemented in terms of the - ``iterator_adaptor``\ 's ``Base`` template parameter. A class derived - from ``iterator_adaptor`` typically redefines some of the core diff --git a/doc/iterator_adaptor_abstract.rst b/doc/iterator_adaptor_abstract.rst deleted file mode 100644 index fc4de4c..0000000 --- a/doc/iterator_adaptor_abstract.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. Version 1.1 of this ReStructuredText document corresponds to - n1530_, the paper accepted by the LWG. - -.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -Each specialization of the ``iterator_adaptor`` class template is derived from -a specialization of ``iterator_facade``. The core interface functions -expected by ``iterator_facade`` are implemented in terms of the -``iterator_adaptor``\ 's ``Base`` template parameter. A class derived -from ``iterator_adaptor`` typically redefines some of the core -interface functions to adapt the behavior of the ``Base`` type. -Whether the derived class models any of the standard iterator concepts -depends on the operations supported by the ``Base`` type and which -core interface functions of ``iterator_facade`` are redefined in the -``Derived`` class. diff --git a/doc/iterator_adaptor_body.diff b/doc/iterator_adaptor_body.diff deleted file mode 100755 index a170244..0000000 --- a/doc/iterator_adaptor_body.diff +++ /dev/null @@ -1,35 +0,0 @@ -Index: iterator_adaptor_body.rst -=================================================================== -RCS file: /cvsroot/boost/boost/libs/iterator/doc/iterator_adaptor_body.rst,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -b -d -u -r1.2 -r1.3 ---- iterator_adaptor_body.rst 22 Sep 2003 19:55:00 -0000 1.2 -+++ iterator_adaptor_body.rst 24 Nov 2003 05:02:46 -0000 1.3 -@@ -1,3 +1,9 @@ -+.. Version 1.2 of this ReStructuredText document corresponds to -+ n1530_, the paper accepted by the LWG for TR1. -+ -+.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All -+ rights reserved -+ - The ``iterator_adaptor`` class template adapts some ``Base`` [#base]_ - type to create a new iterator. Instantiations of ``iterator_adaptor`` - are derived from a corresponding instantiation of ``iterator_facade`` -@@ -19,7 +25,7 @@ Issue 9.1 et al - redefined in the user's derived class. - - Several of the template parameters of ``iterator_adaptor`` default --to ``use_default`` (or ``use_default_access``). This allows the -+to ``use_default``. This allows the - user to make use of a default parameter even when she wants to - specify a parameter later in the parameter list. Also, the - defaults for the corresponding associated types are somewhat -@@ -28,6 +34,6 @@ Issue 9.45y - the identity of the ``use_default`` type is not left unspecified - because specification helps to highlight that the ``Reference`` - template parameter may not always be identical to the iterator's --``reference`` type, and will keep users making mistakes based on -+``reference`` type, and will keep users from making mistakes based on - that assumption. - diff --git a/doc/iterator_adaptor_body.rst b/doc/iterator_adaptor_body.rst deleted file mode 100644 index 1c27118..0000000 --- a/doc/iterator_adaptor_body.rst +++ /dev/null @@ -1,39 +0,0 @@ -.. Version 1.2 of this ReStructuredText document corresponds to - n1530_, the paper accepted by the LWG for TR1. - -.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -The ``iterator_adaptor`` class template adapts some ``Base`` [#base]_ -type to create a new iterator. Instantiations of ``iterator_adaptor`` -are derived from a corresponding instantiation of ``iterator_facade`` -and implement the core behaviors in terms of the ``Base`` type. In -essence, ``iterator_adaptor`` merely forwards all operations to an -instance of the ``Base`` type, which it stores as a member. - -.. [#base] The term "Base" here does not refer to a base class and is - not meant to imply the use of derivation. We have followed the lead - of the standard library, which provides a base() function to access - the underlying iterator object of a ``reverse_iterator`` adaptor. - -The user of ``iterator_adaptor`` creates a class derived from an -instantiation of ``iterator_adaptor`` and then selectively -redefines some of the core member functions described in the -``iterator_facade`` core requirements table. The ``Base`` type need -not meet the full requirements for an iterator; it need only -support the operations used by the core interface functions of -``iterator_adaptor`` that have not been redefined in the user's -derived class. - -Several of the template parameters of ``iterator_adaptor`` default -to ``use_default``. This allows the -user to make use of a default parameter even when she wants to -specify a parameter later in the parameter list. Also, the -defaults for the corresponding associated types are somewhat -complicated, so metaprogramming is required to compute them, and -``use_default`` can help to simplify the implementation. Finally, -the identity of the ``use_default`` type is not left unspecified -because specification helps to highlight that the ``Reference`` -template parameter may not always be identical to the iterator's -``reference`` type, and will keep users from making mistakes based on -that assumption. - diff --git a/doc/iterator_adaptor_ref.html b/doc/iterator_adaptor_ref.html deleted file mode 100755 index b979f74..0000000 --- a/doc/iterator_adaptor_ref.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - -
- - -
-template <
-    class Derived
-  , class Base
-  , class Value               = use_default
-  , class CategoryOrTraversal = use_default
-  , class Reference           = use_default
-  , class Difference = use_default
->
-class iterator_adaptor 
-  : public iterator_facade<Derived, V', C', R', D'> // see details
-{
-    friend class iterator_core_access;
- public:
-    iterator_adaptor();
-    explicit iterator_adaptor(Base iter);
-    Base const& base() const;
- protected:
-    typedef iterator_adaptor iterator_adaptor_;
-    Base const& base_reference() const;
-    Base& base_reference();
- private: // Core iterator interface for iterator_facade.  
-    typename iterator_adaptor::reference dereference() const;
-
-    template <
-    class OtherDerived, class OtherIterator, class V, class C, class R, class D
-    >   
-    bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const;
-
-    void advance(typename iterator_adaptor::difference_type n);
-    void increment();
-    void decrement();
-
-    template <
-        class OtherDerived, class OtherIterator, class V, class C, class R, class D
-    >   
-    typename iterator_adaptor::difference_type distance_to(
-        iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const;
-
- private:
-    Base m_iterator; // exposition only
-};
-
-
-

iterator_adaptor requirements

-

static_cast<Derived*>(iterator_adaptor*) shall be well-formed. -The Base argument shall be Assignable and Copy Constructible.

-
-
-

iterator_adaptor base class parameters

-

The V', C', R', and D' parameters of the iterator_facade -used as a base class in the summary of iterator_adaptor -above are defined as follows:

-
-V' = if (Value is use_default)
-          return iterator_traits<Base>::value_type
-      else
-          return Value
-
-C' = if (CategoryOrTraversal is use_default)
-          return iterator_traversal<Base>::type
-      else
-          return CategoryOrTraversal
-
-R' = if (Reference is use_default)
-          if (Value is use_default)
-              return iterator_traits<Base>::reference
-          else
-              return Value&
-      else
-          return Reference
-
-D' = if (Difference is use_default)
-          return iterator_traits<Base>::difference_type
-      else
-          return Difference
-
- - - -
-
-

iterator_adaptor public operations

-

iterator_adaptor();

- --- - - - - - -
Requires:The Base type must be Default Constructible.
Returns:An instance of iterator_adaptor with -m_iterator default constructed.
-

explicit iterator_adaptor(Base iter);

- --- - - - -
Returns:An instance of iterator_adaptor with -m_iterator copy constructed from iter.
-

Base const& base() const;

- --- - - - -
Returns:m_iterator
-
-
-

iterator_adaptor protected member functions

-

Base const& base_reference() const;

- --- - - - -
Returns:A const reference to m_iterator.
-

Base& base_reference();

- --- - - - -
Returns:A non-const reference to m_iterator.
-
-
-

iterator_adaptor private member functions

-

typename iterator_adaptor::reference dereference() const;

- --- - - - -
Returns:*m_iterator
-
-template <
-class OtherDerived, class OtherIterator, class V, class C, class R, class D
->   
-bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const;
-
- --- - - - -
Returns:m_iterator == x.base()
-

void advance(typename iterator_adaptor::difference_type n);

- --- - - - -
Effects:m_iterator += n;
-

void increment();

- --- - - - -
Effects:++m_iterator;
-

void decrement();

- --- - - - -
Effects:--m_iterator;
-
-template <
-    class OtherDerived, class OtherIterator, class V, class C, class R, class D
->   
-typename iterator_adaptor::difference_type distance_to(
-    iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const;
-
- --- - - - -
Returns:y.base() - m_iterator
-
-
- - - - diff --git a/doc/iterator_adaptor_ref.rst b/doc/iterator_adaptor_ref.rst deleted file mode 100644 index 1d13a9c..0000000 --- a/doc/iterator_adaptor_ref.rst +++ /dev/null @@ -1,178 +0,0 @@ -.. Version 1.4 of this ReStructuredText document corresponds to - n1530_, the paper accepted by the LWG for TR1. - -.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. parsed-literal:: - - template < - class Derived - , class Base - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default - , class Difference = use_default - > - class iterator_adaptor - : public iterator_facade // see details__ - { - friend class iterator_core_access; - public: - iterator_adaptor(); - explicit iterator_adaptor(Base const& iter); - typedef Base base_type; - Base const& base() const; - protected: - typedef iterator_adaptor iterator_adaptor\_; - Base const& base_reference() const; - Base& base_reference(); - private: // Core iterator interface for iterator_facade. - typename iterator_adaptor::reference dereference() const; - - template < - class OtherDerived, class OtherIterator, class V, class C, class R, class D - > - bool equal(iterator_adaptor const& x) const; - - void advance(typename iterator_adaptor::difference_type n); - void increment(); - void decrement(); - - template < - class OtherDerived, class OtherIterator, class V, class C, class R, class D - > - typename iterator_adaptor::difference_type distance_to( - iterator_adaptor const& y) const; - - private: - Base m_iterator; // exposition only - }; - -__ base_parameters_ - -.. _requirements: - -``iterator_adaptor`` requirements ---------------------------------- - -``static_cast(iterator_adaptor*)`` shall be well-formed. -The ``Base`` argument shall be Assignable and Copy Constructible. - - -.. _base_parameters: - -``iterator_adaptor`` base class parameters ------------------------------------------- - -The *V'*, *C'*, *R'*, and *D'* parameters of the ``iterator_facade`` -used as a base class in the summary of ``iterator_adaptor`` -above are defined as follows: - -.. parsed-literal:: - - *V'* = if (Value is use_default) - return iterator_traits::value_type - else - return Value - - *C'* = if (CategoryOrTraversal is use_default) - return iterator_traversal::type - else - return CategoryOrTraversal - - *R'* = if (Reference is use_default) - if (Value is use_default) - return iterator_traits::reference - else - return Value& - else - return Reference - - *D'* = if (Difference is use_default) - return iterator_traits::difference_type - else - return Difference - -.. ``iterator_adaptor`` models - --------------------------- - - In order for ``Derived`` to model the iterator concepts corresponding - to ``iterator_traits::iterator_category``, the expressions - involving ``m_iterator`` in the specifications of those private member - functions of ``iterator_adaptor`` that may be called by - ``iterator_facade`` in evaluating any valid - expression involving ``Derived`` in those concepts' requirements. - -.. The above is confusing and needs a rewrite. -JGS -.. That's why it's removed. We're embracing inheritance, remember? - -``iterator_adaptor`` public operations --------------------------------------- - -``iterator_adaptor();`` - -:Requires: The ``Base`` type must be Default Constructible. -:Returns: An instance of ``iterator_adaptor`` with - ``m_iterator`` default constructed. - - -``explicit iterator_adaptor(Base const& iter);`` - -:Returns: An instance of ``iterator_adaptor`` with - ``m_iterator`` copy constructed from ``iter``. - -``Base const& base() const;`` - -:Returns: ``m_iterator`` - -``iterator_adaptor`` protected member functions ------------------------------------------------ - -``Base const& base_reference() const;`` - -:Returns: A const reference to ``m_iterator``. - - -``Base& base_reference();`` - -:Returns: A non-const reference to ``m_iterator``. - - -``iterator_adaptor`` private member functions ---------------------------------------------- - -``typename iterator_adaptor::reference dereference() const;`` - -:Returns: ``*m_iterator`` - -:: - - template < - class OtherDerived, class OtherIterator, class V, class C, class R, class D - > - bool equal(iterator_adaptor const& x) const; - -:Returns: ``m_iterator == x.base()`` - - -``void advance(typename iterator_adaptor::difference_type n);`` - -:Effects: ``m_iterator += n;`` - -``void increment();`` - -:Effects: ``++m_iterator;`` - -``void decrement();`` - -:Effects: ``--m_iterator;`` - -:: - - template < - class OtherDerived, class OtherIterator, class V, class C, class R, class D - > - typename iterator_adaptor::difference_type distance_to( - iterator_adaptor const& y) const; - -:Returns: ``y.base() - m_iterator`` diff --git a/doc/iterator_adaptor_tutorial.rst b/doc/iterator_adaptor_tutorial.rst deleted file mode 100755 index 4106846..0000000 --- a/doc/iterator_adaptor_tutorial.rst +++ /dev/null @@ -1,135 +0,0 @@ -.. Copyright David Abrahams 2004. Use, modification and distribution is -.. subject to the Boost Software License, Version 1.0. (See accompanying -.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -In this section we'll further refine the ``node_iter`` class -template we developed in the |fac_tut|_. If you haven't already -read that material, you should go back now and check it out because -we're going to pick up right where it left off. - -.. |fac_tut| replace:: ``iterator_facade`` tutorial -.. _fac_tut: iterator_facade.html#tutorial-example - -.. sidebar:: ``node_base*`` really *is* an iterator - - It's not really a very interesting iterator, since ``node_base`` - is an abstract class: a pointer to a ``node_base`` just points - at some base subobject of an instance of some other class, and - incrementing a ``node_base*`` moves it past this base subobject - to who-knows-where? The most we can do with that incremented - position is to compare another ``node_base*`` to it. In other - words, the original iterator traverses a one-element array. - -You probably didn't think of it this way, but the ``node_base*`` -object that underlies ``node_iterator`` is itself an iterator, -just like all other pointers. If we examine that pointer closely -from an iterator perspective, we can see that it has much in common -with the ``node_iterator`` we're building. First, they share most -of the same associated types (``value_type``, ``reference``, -``pointer``, and ``difference_type``). Second, even some of the -core functionality is the same: ``operator*`` and ``operator==`` on -the ``node_iterator`` return the result of invoking the same -operations on the underlying pointer, via the ``node_iterator``\ 's -|dereference_and_equal|_). The only real behavioral difference -between ``node_base*`` and ``node_iterator`` can be observed when -they are incremented: ``node_iterator`` follows the -``m_next`` pointer, while ``node_base*`` just applies an address offset. - -.. |dereference_and_equal| replace:: ``dereference`` and ``equal`` member functions -.. _dereference_and_equal: iterator_facade.html#implementing-the-core-operations - -It turns out that the pattern of building an iterator on another -iterator-like type (the ``Base`` [#base]_ type) while modifying -just a few aspects of the underlying type's behavior is an -extremely common one, and it's the pattern addressed by -``iterator_adaptor``. Using ``iterator_adaptor`` is very much like -using ``iterator_facade``, but because iterator_adaptor tries to -mimic as much of the ``Base`` type's behavior as possible, we -neither have to supply a ``Value`` argument, nor implement any core -behaviors other than ``increment``. The implementation of -``node_iter`` is thus reduced to:: - - template - class node_iter - : public boost::iterator_adaptor< - node_iter // Derived - , Value* // Base - , boost::use_default // Value - , boost::forward_traversal_tag // CategoryOrTraversal - > - { - private: - struct enabler {}; // a private type avoids misuse - - public: - node_iter() - : node_iter::iterator_adaptor_(0) {} - - explicit node_iter(Value* p) - : node_iter::iterator_adaptor_(p) {} - - template - node_iter( - node_iter const& other - , typename boost::enable_if< - boost::is_convertible - , enabler - >::type = enabler() - ) - : node_iter::iterator_adaptor_(other.base()) {} - - private: - friend class boost::iterator_core_access; - void increment() { this->base_reference() = this->base()->next(); } - }; - -Note the use of ``node_iter::iterator_adaptor_`` here: because -``iterator_adaptor`` defines a nested ``iterator_adaptor_`` type -that refers to itself, that gives us a convenient way to refer to -the complicated base class type of ``node_iter``. [Note: -this technique is known not to work with Borland C++ 5.6.4 and -Metrowerks CodeWarrior versions prior to 9.0] - -You can see an example program that exercises this version of the -node iterators `here`__. - -__ ../example/node_iterator3.cpp - -In the case of ``node_iter``, it's not very compelling to pass -``boost::use_default`` as ``iterator_adaptor``\ 's ``Value`` -argument; we could have just passed ``node_iter``\ 's ``Value`` -along to ``iterator_adaptor``, and that'd even be shorter! Most -iterator class templates built with ``iterator_adaptor`` are -parameterized on another iterator type, rather than on its -``value_type``. For example, ``boost::reverse_iterator`` takes an -iterator type argument and reverses its direction of traversal, -since the original iterator and the reversed one have all the same -associated types, ``iterator_adaptor``\ 's delegation of default -types to its ``Base`` saves the implementor of -``boost::reverse_iterator`` from writing: - -.. parsed-literal:: - - std::iterator_traits::*some-associated-type* - -at least four times. - -We urge you to review the documentation and implementations of -|reverse_iterator|_ and the other Boost `specialized iterator -adaptors`__ to get an idea of the sorts of things you can do with -``iterator_adaptor``. In particular, have a look at -|transform_iterator|_, which is perhaps the most straightforward -adaptor, and also |counting_iterator|_, which demonstrates that -``iterator_adaptor``\ 's ``Base`` type needn't be an iterator. - -.. |reverse_iterator| replace:: ``reverse_iterator`` -.. _reverse_iterator: reverse_iterator.html - -.. |counting_iterator| replace:: ``counting_iterator`` -.. _counting_iterator: counting_iterator.html - -.. |transform_iterator| replace:: ``transform_iterator`` -.. _transform_iterator: transform_iterator.html - -__ index.html#specialized-adaptors - diff --git a/doc/iterator_archetypes.html b/doc/iterator_archetypes.html deleted file mode 100755 index c6bf7d7..0000000 --- a/doc/iterator_archetypes.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - -Iterator Archetype - - - - - - - -
-

Iterator Archetype

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com
Organization:Boost Consulting, Indiana University Open Systems -Lab, Zephyr Associates, Inc.
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004.
- --- - - - -
abstract:The iterator_archetype class constructs a minimal implementation of -one of the iterator access concepts and one of the iterator traversal concepts. -This is used for doing a compile-time check to see if a the type requirements -of a template are really enough to cover the implementation of the template. -For further information see the documentation for the boost::concept_check library.
- -
-

Reference

-
-

iterator_archetype Synopsis

-
-namespace iterator_archetypes
-{
-    // Access categories
-
-    typedef /*implementation  defined*/ readable_iterator_t;
-    typedef /*implementation  defined*/ writable_iterator_t;
-    typedef /*implementation  defined*/ readable_writable_iterator_t;
-    typedef /*implementation  defined*/ readable_lvalue_iterator_t;
-    typedef /*implementation  defined*/ writable_lvalue_iterator_t;
-
-}
-
-template <
-    class Value
-  , class AccessCategory
-  , class TraversalCategory
->
-class iterator_archetype
-{
-    typedef /* see below */ value_type;
-    typedef /* see below */ reference;
-    typedef /* see below */ pointer;
-    typedef /* see below */ difference_type;
-    typedef /* see below */ iterator_category;
-};
-
-
-
-

Access Category Tags

-

The access category types provided correspond to the following -standard iterator access concept combinations:

-
-readable_iterator_t :=
-
-  Readable Iterator
-
-writable_iterator_t :=
-
-  Writeable Iterator
-
-readable_writable_iterator_t :=
-
-  Readable Iterator & Writeable Iterator & Swappable Iterator
-
-readable_lvalue_iterator_t :=
-
-  Readable Iterator & Lvalue Iterator
-
-writeable_lvalue_iterator_t :=
-
-  Readable Iterator & Writeable Iterator & Swappable Iterator & Lvalue Iterator
-
-
-
-

iterator_archetype Requirements

-

The AccessCategory argument must be one of the predefined access -category tags. The TraversalCategory must be one of the standard -traversal tags. The Value type must satisfy the requirements of -the iterator concept specified by AccessCategory and -TraversalCategory as implied by the nested traits types.

-
-
-

iterator_archetype Models

-

iterator_archetype models the iterator concepts specified by the -AccessCategory and TraversalCategory -arguments. iterator_archetype does not model any other access -concepts or any more derived traversal concepts.

-
-
-

Traits

-

The nested trait types are defined as follows:

-
-if (AccessCategory == readable_iterator_t)
-  
-  value_type = Value
-  reference  = Value
-  pointer    = Value*
-
-else if (AccessCategory == writable_iterator_t)
-
-  value_type = void
-  reference  = void
-  pointer    = void
-
-else if (AccessCategory == readable_writable_iterator_t)
-
-  value_type = Value
-
-  reference :=
-
-    A type X that is convertible to Value for which the following
-    expression is valid. Given an object x of type X and v of type 
-    Value.
-
-    x = v
-
-  pointer    = Value*
-
-else if (AccessCategory == readable_lvalue_iterator_t)
-  
-  value_type = Value
-  reference  = Value const&
-  pointer    = Value const*
-
-else if (AccessCategory == writable_lvalue_iterator_t)
-  
-  value_type = Value
-  reference  = Value&
-  pointer    = Value*
-
-if ( TraversalCategory is convertible to forward_traversal_tag )
-
-  difference_type := ptrdiff_t
-
-else
-
-  difference_type := unspecified type
-
-
-iterator_category := 
-
-  A type X satisfying the following two constraints:
-
-     1. X is convertible to X1, and not to any more-derived
-        type, where X1 is defined by:
-
-          if (reference is a reference type
-              && TraversalCategory is convertible to forward_traversal_tag)
-          {
-              if (TraversalCategory is convertible to random_access_traversal_tag)
-                  X1 = random_access_iterator_tag
-              else if (TraversalCategory is convertible to bidirectional_traversal_tag)
-                  X1 = bidirectional_iterator_tag
-              else
-                  X1 = forward_iterator_tag
-          }
-          else
-          {
-              if (TraversalCategory is convertible to single_pass_traversal_tag
-                  && reference != void)
-                  X1 = input_iterator_tag
-              else
-                  X1 = output_iterator_tag
-          }
-
-     2. X is convertible to TraversalCategory
-
-
-
-
- - - - diff --git a/doc/iterator_archetypes.pdf b/doc/iterator_archetypes.pdf deleted file mode 100755 index 8cecde3..0000000 Binary files a/doc/iterator_archetypes.pdf and /dev/null differ diff --git a/doc/iterator_archetypes.rst b/doc/iterator_archetypes.rst deleted file mode 100755 index e26fde8..0000000 --- a/doc/iterator_archetypes.rst +++ /dev/null @@ -1,189 +0,0 @@ -++++++++++++++++++++ - Iterator Archetype -++++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, `Zephyr Associates, Inc.`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - -:abstract: The ``iterator_archetype`` class constructs a minimal implementation of - one of the iterator access concepts and one of the iterator traversal concepts. - This is used for doing a compile-time check to see if a the type requirements - of a template are really enough to cover the implementation of the template. - For further information see the documentation for the |concepts|_ library. - -.. |concepts| replace:: ``boost::concept_check`` -.. _concepts: ../../concept_check/index.html - - -.. contents:: Table of Contents - -Reference -========= - -``iterator_archetype`` Synopsis -............................... - -:: - - namespace iterator_archetypes - { - // Access categories - - typedef /*implementation defined*/ readable_iterator_t; - typedef /*implementation defined*/ writable_iterator_t; - typedef /*implementation defined*/ readable_writable_iterator_t; - typedef /*implementation defined*/ readable_lvalue_iterator_t; - typedef /*implementation defined*/ writable_lvalue_iterator_t; - - } - - template < - class Value - , class AccessCategory - , class TraversalCategory - > - class iterator_archetype - { - typedef /* see below */ value_type; - typedef /* see below */ reference; - typedef /* see below */ pointer; - typedef /* see below */ difference_type; - typedef /* see below */ iterator_category; - }; - -``Access Category Tags`` -........................ - -The access category types provided correspond to the following -standard iterator access concept combinations: - -:: - - readable_iterator_t := - - Readable Iterator - - writable_iterator_t := - - Writeable Iterator - - readable_writable_iterator_t := - - Readable Iterator & Writeable Iterator & Swappable Iterator - - readable_lvalue_iterator_t := - - Readable Iterator & Lvalue Iterator - - writeable_lvalue_iterator_t := - - Readable Iterator & Writeable Iterator & Swappable Iterator & Lvalue Iterator - -``iterator_archetype`` Requirements -................................... - -The ``AccessCategory`` argument must be one of the predefined access -category tags. The ``TraversalCategory`` must be one of the standard -traversal tags. The ``Value`` type must satisfy the requirements of -the iterator concept specified by ``AccessCategory`` and -``TraversalCategory`` as implied by the nested traits types. - -``iterator_archetype`` Models -............................. - -``iterator_archetype`` models the iterator concepts specified by the -``AccessCategory`` and ``TraversalCategory`` -arguments. ``iterator_archetype`` does not model any other access -concepts or any more derived traversal concepts. - -``Traits`` -.......... - -The nested trait types are defined as follows: - -:: - - if (AccessCategory == readable_iterator_t) - - value_type = Value - reference = Value - pointer = Value* - - else if (AccessCategory == writable_iterator_t) - - value_type = void - reference = void - pointer = void - - else if (AccessCategory == readable_writable_iterator_t) - - value_type = Value - - reference := - - A type X that is convertible to Value for which the following - expression is valid. Given an object x of type X and v of type - Value. - - x = v - - pointer = Value* - - else if (AccessCategory == readable_lvalue_iterator_t) - - value_type = Value - reference = Value const& - pointer = Value const* - - else if (AccessCategory == writable_lvalue_iterator_t) - - value_type = Value - reference = Value& - pointer = Value* - - if ( TraversalCategory is convertible to forward_traversal_tag ) - - difference_type := ptrdiff_t - - else - - difference_type := unspecified type - - - iterator_category := - - A type X satisfying the following two constraints: - - 1. X is convertible to X1, and not to any more-derived - type, where X1 is defined by: - - if (reference is a reference type - && TraversalCategory is convertible to forward_traversal_tag) - { - if (TraversalCategory is convertible to random_access_traversal_tag) - X1 = random_access_iterator_tag - else if (TraversalCategory is convertible to bidirectional_traversal_tag) - X1 = bidirectional_iterator_tag - else - X1 = forward_iterator_tag - } - else - { - if (TraversalCategory is convertible to single_pass_traversal_tag - && reference != void) - X1 = input_iterator_tag - else - X1 = output_iterator_tag - } - - 2. X is convertible to TraversalCategory - - diff --git a/doc/iterator_concepts.html b/doc/iterator_concepts.html deleted file mode 100644 index af23cdc..0000000 --- a/doc/iterator_concepts.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - -Iterator Concepts - - - - - - - -
-

Iterator Concepts

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com
Organization:Boost Consulting, Indiana University Open Systems -Lab, Zephyr Associates, Inc.
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004.
- --- - - - -
abstract:The iterator concept checking classes provide a mechanism for -a template to report better error messages when a user instantiates -the template with a type that does not meet the requirements of -the template.
-

For an introduction to using concept checking classes, see -the documentation for the boost::concept_check library.

-
-

Reference

- - -
-

iterator_concepts.hpp Synopsis

-
-namespace boost_concepts {
-
-    // Iterator Access Concepts
-
-    template <typename Iterator>
-    class ReadableIteratorConcept;
-
-    template <
-        typename Iterator
-      , typename ValueType = std::iterator_traits<Iterator>::value_type
-    >
-    class WritableIteratorConcept;
-
-    template <typename Iterator>
-    class SwappableIteratorConcept;
-
-    template <typename Iterator>
-    class LvalueIteratorConcept;
-
-    // Iterator Traversal Concepts
-
-    template <typename Iterator>
-    class IncrementableIteratorConcept;
-
-    template <typename Iterator>
-    class SinglePassIteratorConcept;
-
-    template <typename Iterator>
-    class ForwardTraversalConcept;
-
-    template <typename Iterator>
-    class BidirectionalTraversalConcept;
-
-    template <typename Iterator>
-    class RandomAccessTraversalConcept;
-
-    // Interoperability
-
-    template <typename Iterator, typename ConstIterator>
-    class InteroperableIteratorConcept;
-
-}
-
-
-
-
- - - - diff --git a/doc/iterator_concepts.pdf b/doc/iterator_concepts.pdf deleted file mode 100755 index 98e4302..0000000 Binary files a/doc/iterator_concepts.pdf and /dev/null differ diff --git a/doc/iterator_concepts.rst b/doc/iterator_concepts.rst deleted file mode 100755 index 1653d22..0000000 --- a/doc/iterator_concepts.rst +++ /dev/null @@ -1,128 +0,0 @@ - - -++++++++++++++++++ - Iterator Concepts -++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, `Zephyr Associates, Inc.`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - -:abstract: The iterator concept checking classes provide a mechanism for - a template to report better error messages when a user instantiates - the template with a type that does not meet the requirements of - the template. - - -For an introduction to using concept checking classes, see -the documentation for the |concepts|_ library. - -.. |concepts| replace:: ``boost::concept_check`` -.. _concepts: ../../concept_check/index.html - - -Reference -========= - -Iterator Access Concepts -........................ - -* |Readable|_ -* |Writable|_ -* |Swappable|_ -* |Lvalue|_ - -.. |Readable| replace:: *Readable Iterator* -.. _Readable: ReadableIterator.html - -.. |Writable| replace:: *Writable Iterator* -.. _Writable: WritableIterator.html - -.. |Swappable| replace:: *Swappable Iterator* -.. _Swappable: SwappableIterator.html - -.. |Lvalue| replace:: *Lvalue Iterator* -.. _Lvalue: LvalueIterator.html - - -Iterator Traversal Concepts -........................... - -* |Incrementable|_ -* |SinglePass|_ -* |Forward|_ -* |Bidir|_ -* |Random|_ - - -.. |Incrementable| replace:: *Incrementable Iterator* -.. _Incrementable: IncrementableIterator.html - -.. |SinglePass| replace:: *Single Pass Iterator* -.. _SinglePass: SinglePassIterator.html - -.. |Forward| replace:: *Forward Traversal* -.. _Forward: ForwardTraversal.html - -.. |Bidir| replace:: *Bidirectional Traversal* -.. _Bidir: BidirectionalTraversal.html - -.. |Random| replace:: *Random Access Traversal* -.. _Random: RandomAccessTraversal.html - - - -``iterator_concepts.hpp`` Synopsis -.................................. - -:: - - namespace boost_concepts { - - // Iterator Access Concepts - - template - class ReadableIteratorConcept; - - template < - typename Iterator - , typename ValueType = std::iterator_traits::value_type - > - class WritableIteratorConcept; - - template - class SwappableIteratorConcept; - - template - class LvalueIteratorConcept; - - // Iterator Traversal Concepts - - template - class IncrementableIteratorConcept; - - template - class SinglePassIteratorConcept; - - template - class ForwardTraversalConcept; - - template - class BidirectionalTraversalConcept; - - template - class RandomAccessTraversalConcept; - - // Interoperability - - template - class InteroperableIteratorConcept; - - } diff --git a/doc/iterator_facade.html b/doc/iterator_facade.html deleted file mode 100644 index d68099d..0000000 --- a/doc/iterator_facade.html +++ /dev/null @@ -1,1319 +0,0 @@ - - - - - - -Iterator Facade - - - - - - - -
-

Iterator Facade

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:iterator_facade is a base class template that implements the -interface of standard iterators in terms of a few core functions -and associated types, to be supplied by a derived iterator class.
- -
-

Overview

- - -

While the iterator interface is rich, there is a core subset of the -interface that is necessary for all the functionality. We have -identified the following core behaviors for iterators:

-
    -
  • dereferencing
  • -
  • incrementing
  • -
  • decrementing
  • -
  • equality comparison
  • -
  • random-access motion
  • -
  • distance measurement
  • -
-

In addition to the behaviors listed above, the core interface elements -include the associated types exposed through iterator traits: -value_type, reference, difference_type, and -iterator_category.

-

Iterator facade uses the Curiously Recurring Template -Pattern (CRTP) [Cop95] so that the user can specify the behavior -of iterator_facade in a derived class. Former designs used -policy objects to specify the behavior, but that approach was -discarded for several reasons:

-
-
    -
  1. the creation and eventual copying of the policy object may create -overhead that can be avoided with the current approach.
  2. -
  3. The policy object approach does not allow for custom constructors -on the created iterator types, an essential feature if -iterator_facade should be used in other library -implementations.
  4. -
  5. Without the use of CRTP, the standard requirement that an -iterator's operator++ returns the iterator type itself -would mean that all iterators built with the library would -have to be specializations of iterator_facade<...>, rather -than something more descriptive like -indirect_iterator<T*>. Cumbersome type generator -metafunctions would be needed to build new parameterized -iterators, and a separate iterator_adaptor layer would be -impossible.
  6. -
-
-
-

Usage

-

The user of iterator_facade derives his iterator class from a -specialization of iterator_facade and passes the derived -iterator class as iterator_facade's first template parameter. -The order of the other template parameters have been carefully -chosen to take advantage of useful defaults. For example, when -defining a constant lvalue iterator, the user can pass a -const-qualified version of the iterator's value_type as -iterator_facade's Value parameter and omit the -Reference parameter which follows.

-

The derived iterator class must define member functions implementing -the iterator's core behaviors. The following table describes -expressions which are required to be valid depending on the category -of the derived iterator type. These member functions are described -briefly below and in more detail in the iterator facade -requirements.

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionEffects
i.dereference()Access the value referred to
i.equal(j)Compare for equality with j
i.increment()Advance by one position
i.decrement()Retreat by one position
i.advance(n)Advance by n positions
i.distance_to(j)Measure the distance to j
-
- -

In addition to implementing the core interface functions, an iterator -derived from iterator_facade typically defines several -constructors. To model any of the standard iterator concepts, the -iterator must at least have a copy constructor. Also, if the iterator -type X is meant to be automatically interoperate with another -iterator type Y (as with constant and mutable iterators) then -there must be an implicit conversion from X to Y or from Y -to X (but not both), typically implemented as a conversion -constructor. Finally, if the iterator is to model Forward Traversal -Iterator or a more-refined iterator concept, a default constructor is -required.

-
-
-

Iterator Core Access

-

iterator_facade and the operator implementations need to be able -to access the core member functions in the derived class. Making the -core member functions public would expose an implementation detail to -the user. The design used here ensures that implementation details do -not appear in the public interface of the derived iterator type.

-

Preventing direct access to the core member functions has two -advantages. First, there is no possibility for the user to accidently -use a member function of the iterator when a member of the value_type -was intended. This has been an issue with smart pointer -implementations in the past. The second and main advantage is that -library implementers can freely exchange a hand-rolled iterator -implementation for one based on iterator_facade without fear of -breaking code that was accessing the public core member functions -directly.

-

In a naive implementation, keeping the derived class' core member -functions private would require it to grant friendship to -iterator_facade and each of the seven operators. In order to -reduce the burden of limiting access, iterator_core_access is -provided, a class that acts as a gateway to the core member functions -in the derived iterator class. The author of the derived class only -needs to grant friendship to iterator_core_access to make his core -member functions available to the library.

- - -

iterator_core_access will be typically implemented as an empty -class containing only private static member functions which invoke the -iterator core member functions. There is, however, no need to -standardize the gateway protocol. Note that even if -iterator_core_access used public member functions it would not -open a safety loophole, as every core member function preserves the -invariants of the iterator.

-
-
-

operator[]

-

The indexing operator for a generalized iterator presents special -challenges. A random access iterator's operator[] is only -required to return something convertible to its value_type. -Requiring that it return an lvalue would rule out currently-legal -random-access iterators which hold the referenced value in a data -member (e.g. counting_iterator), because *(p+n) is a reference -into the temporary iterator p+n, which is destroyed when -operator[] returns.

-

Writable iterators built with iterator_facade implement the -semantics required by the preferred resolution to issue 299 and -adopted by proposal n1550: the result of p[n] is an object -convertible to the iterator's value_type, and p[n] = x is -equivalent to *(p + n) = x (Note: This result object may be -implemented as a proxy containing a copy of p+n). This approach -will work properly for any random-access iterator regardless of the -other details of its implementation. A user who knows more about -the implementation of her iterator is free to implement an -operator[] that returns an lvalue in the derived iterator -class; it will hide the one supplied by iterator_facade from -clients of her iterator.

-
-
-

operator->

-

The reference type of a readable iterator (and today's input -iterator) need not in fact be a reference, so long as it is -convertible to the iterator's value_type. When the value_type -is a class, however, it must still be possible to access members -through operator->. Therefore, an iterator whose reference -type is not in fact a reference must return a proxy containing a copy -of the referenced value from its operator->.

-

The return types for iterator_facade's operator-> and -operator[] are not explicitly specified. Instead, those types -are described in terms of a set of requirements, which must be -satisfied by the iterator_facade implementation.

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

Reference

- - -
-template <
-    class Derived
-  , class Value
-  , class CategoryOrTraversal
-  , class Reference  = Value&
-  , class Difference = ptrdiff_t
->
-class iterator_facade {
- public:
-    typedef remove_const<Value>::type value_type;
-    typedef Reference reference;
-    typedef Value* pointer;
-    typedef Difference difference_type;
-    typedef /* see below */ iterator_category;
-
-    reference operator*() const;
-    /* see below */ operator->() const;
-    /* see below */ operator[](difference_type n) const;
-    Derived& operator++();
-    Derived operator++(int);
-    Derived& operator--();
-    Derived operator--(int);
-    Derived& operator+=(difference_type n);
-    Derived& operator-=(difference_type n);
-    Derived operator-(difference_type n) const;
- protected:
-    typedef iterator_facade iterator_facade_;
-};
-
-// Comparison operators
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type // exposition
-operator ==(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator !=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-// Iterator difference
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-/* see below */
-operator-(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-          iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
-// Iterator addition
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (iterator_facade<Dr,V,TC,R,D> const&,
-                   typename Derived::difference_type n);
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (typename Derived::difference_type n,
-                   iterator_facade<Dr,V,TC,R,D> const&);
-
-

The iterator_category member of iterator_facade is

-
-iterator-category(CategoryOrTraversal, value_type, reference)
-
-

where iterator-category is defined as follows:

-
-iterator-category(C,R,V) :=
-   if (C is convertible to std::input_iterator_tag
-       || C is convertible to std::output_iterator_tag
-   )
-       return C
-
-   else if (C is not convertible to incrementable_traversal_tag)
-       the program is ill-formed
-
-   else return a type X satisfying the following two constraints:
-
-      1. X is convertible to X1, and not to any more-derived
-         type, where X1 is defined by:
-
-           if (R is a reference type
-               && C is convertible to forward_traversal_tag)
-           {
-               if (C is convertible to random_access_traversal_tag)
-                   X1 = random_access_iterator_tag
-               else if (C is convertible to bidirectional_traversal_tag)
-                   X1 = bidirectional_iterator_tag
-               else
-                   X1 = forward_iterator_tag
-           }
-           else
-           {
-               if (C is convertible to single_pass_traversal_tag
-                   && R is convertible to V)
-                   X1 = input_iterator_tag
-               else
-                   X1 = C
-           }
-
-      2. category-to-traversal(X) is convertible to the most
-         derived traversal tag type to which X is also
-         convertible, and not to any more-derived traversal tag
-         type.
-
-

[Note: the intention is to allow iterator_category to be one of -the five original category tags when convertibility to one of the -traversal tags would add no information]

- - - -

The enable_if_interoperable template used above is for exposition -purposes. The member operators should only be in an overload set -provided the derived types Dr1 and Dr2 are interoperable, -meaning that at least one of the types is convertible to the other. The -enable_if_interoperable approach uses SFINAE to take the operators -out of the overload set when the types are not interoperable. -The operators should behave as-if enable_if_interoperable -were defined to be:

-
-template <bool, typename> enable_if_interoperable_impl
-{};
-
-template <typename T> enable_if_interoperable_impl<true,T>
-{ typedef T type; };
-
-template<typename Dr1, typename Dr2, typename T>
-struct enable_if_interoperable
-  : enable_if_interoperable_impl<
-        is_convertible<Dr1,Dr2>::value || is_convertible<Dr2,Dr1>::value
-      , T
-    >
-{};
-
-
-

iterator_facade Requirements

-

The following table describes the typical valid expressions on -iterator_facade's Derived parameter, depending on the -iterator concept(s) it will model. The operations in the first -column must be made accessible to member functions of class -iterator_core_access. In addition, -static_cast<Derived*>(iterator_facade*) shall be well-formed.

-

In the table below, F is iterator_facade<X,V,C,R,D>, a is an -object of type X, b and c are objects of type const X, -n is an object of F::difference_type, y is a constant -object of a single pass iterator type interoperable with X, and z -is a constant object of a random access traversal iterator type -interoperable with X.

-
-

iterator_facade Core Operations

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeAssertion/NoteUsed to implement Iterator -Concept(s)
c.dereference()F::reference Readable Iterator, Writable -Iterator
c.equal(y)convertible to booltrue iff c and y -refer to the same -position.Single Pass Iterator
a.increment()unused Incrementable Iterator
a.decrement()unused Bidirectional Traversal -Iterator
a.advance(n)unused Random Access Traversal -Iterator
c.distance_to(z)convertible to -F::difference_typeequivalent to -distance(c, X(z)).Random Access Traversal -Iterator
-
-
-
-

iterator_facade operations

-

The operations in this section are described in terms of operations on -the core interface of Derived which may be inaccessible -(i.e. private). The implementation should access these operations -through member functions of class iterator_core_access.

-

reference operator*() const;

- --- - - - -
Returns:static_cast<Derived const*>(this)->dereference()
-

operator->() const; (see below)

- --- - - - -
Returns:

If reference is a reference type, an object -of type pointer equal to:

-
-&static_cast<Derived const*>(this)->dereference()
-
-

Otherwise returns an object of unspecified type such that, -(*static_cast<Derived const*>(this))->m is equivalent to (w = **static_cast<Derived const*>(this), -w.m) for some temporary object w of type value_type.

-
-

unspecified operator[](difference_type n) const;

- --- - - - -
Returns:an object convertible to value_type. For constant -objects v of type value_type, and n of type -difference_type, (*this)[n] = v is equivalent to -*(*this + n) = v, and static_cast<value_type -const&>((*this)[n]) is equivalent to -static_cast<value_type const&>(*(*this + n))
-

Derived& operator++();

- --- - - - -
Effects:
-static_cast<Derived*>(this)->increment();
-return *static_cast<Derived*>(this);
-
-
-

Derived operator++(int);

- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-++*this;
-return tmp;
-
-
-

Derived& operator--();

- --- - - - -
Effects:
-static_cast<Derived*>(this)->decrement();
-return *static_cast<Derived*>(this);
-
-
-

Derived operator--(int);

- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
---*this;
-return tmp;
-
-
-

Derived& operator+=(difference_type n);

- --- - - - -
Effects:
-static_cast<Derived*>(this)->advance(n);
-return *static_cast<Derived*>(this);
-
-
-

Derived& operator-=(difference_type n);

- --- - - - -
Effects:
-static_cast<Derived*>(this)->advance(-n);
-return *static_cast<Derived*>(this);
-
-
-

Derived operator-(difference_type n) const;

- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-return tmp -= n;
-
-
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (iterator_facade<Dr,V,TC,R,D> const&,
-                   typename Derived::difference_type n);
-
-template <class Dr, class V, class TC, class R, class D>
-Derived operator+ (typename Derived::difference_type n,
-                   iterator_facade<Dr,V,TC,R,D> const&);
-
- --- - - - -
Effects:
-Derived tmp(static_cast<Derived const*>(this));
-return tmp += n;
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator ==(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).equal((Dr2 const&)rhs).
-
Otherwise,
-
((Dr2 const&)rhs).equal((Dr1 const&)lhs).
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator !=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
!((Dr1 const&)lhs).equal((Dr2 const&)rhs).
-
Otherwise,
-
!((Dr2 const&)rhs).equal((Dr1 const&)lhs).
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) < 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) > 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator <=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) <= 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) >= 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) > 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) < 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,bool>::type
-operator >=(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-            iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - -
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) >= 0.
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) <= 0.
-
-
-
-template <class Dr1, class V1, class TC1, class R1, class D1,
-          class Dr2, class V2, class TC2, class R2, class D2>
-typename enable_if_interoperable<Dr1,Dr2,difference>::type
-operator -(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
-           iterator_facade<Dr2,V2,TC2,R2,D2> const& rhs);
-
- --- - - - - - -
Return Type:

if is_convertible<Dr2,Dr1>::value

-
-
-
then
-
difference shall be -iterator_traits<Dr1>::difference_type.
-
Otherwise
-
difference shall be iterator_traits<Dr2>::difference_type
-
-
-
Returns:

if is_convertible<Dr2,Dr1>::value

-
-
then
-
-((Dr1 const&)lhs).distance_to((Dr2 const&)rhs).
-
Otherwise,
-
((Dr2 const&)rhs).distance_to((Dr1 const&)lhs).
-
-
-
-
-
-

Tutorial Example

- - - -

In this section we'll walk through the implementation of a few -iterators using iterator_facade, based around the simple -example of a linked list of polymorphic objects. This example was -inspired by a posting by Keith Macdonald on the Boost-Users -mailing list.

-
-

The Problem

-

Say we've written a polymorphic linked list node base class:

-
-# include <iostream>
-
-struct node_base
-{
-    node_base() : m_next(0) {}
-
-    // Each node manages all of its tail nodes
-    virtual ~node_base() { delete m_next; }
-
-    // Access the rest of the list
-    node_base* next() const { return m_next; }
-
-    // print to the stream
-    virtual void print(std::ostream& s) const = 0;
-    
-    // double the value
-    virtual void double_me() = 0;
-
-    void append(node_base* p)
-    {
-        if (m_next) 
-            m_next->append(p); 
-        else
-            m_next = p; 
-    }
-
- private:
-    node_base* m_next;
-};
-
-

Lists can hold objects of different types by linking together -specializations of the following template:

-
-template <class T>
-struct node : node_base
-{
-    node(T x)
-      : m_value(x)
-    {}
-
-    void print(std::ostream& s) const { s << this->m_value; }
-    void double_me() { m_value += m_value; }
-
- private:
-    T m_value;
-};
-
-

And we can print any node using the following streaming operator:

-
-inline std::ostream& operator<<(std::ostream& s, node_base const& n)
-{
-    n.print(s);
-    return s;
-}
-
-

Our first challenge is to build an appropriate iterator over these -lists.

-
-
-

A Basic Iterator Using iterator_facade

-

We will construct a node_iterator class using inheritance from -iterator_facade to implement most of the iterator's operations.

-
-# include "node.hpp"
-# include <boost/iterator/iterator_facade.hpp>
-
-class node_iterator
-  : public boost::iterator_facade<...>
-{
-   ...
-};
-
-
-

Template Arguments for iterator_facade

-

iterator_facade has several template parameters, so we must decide -what types to use for the arguments. The parameters are Derived, -Value, CategoryOrTraversal, Reference, and Difference.

-
-

Derived

-

Because iterator_facade is meant to be used with the CRTP -[Cop95] the first parameter is the iterator class name itself, -node_iterator.

-
-
-

Value

-

The Value parameter determines the node_iterator's -value_type. In this case, we are iterating over node_base -objects, so Value will be node_base.

-
-
-

CategoryOrTraversal

-

Now we have to determine which iterator traversal concept our -node_iterator is going to model. Singly-linked lists only have -forward links, so our iterator can't can't be a bidirectional -traversal iterator. Our iterator should be able to make multiple -passes over the same linked list (unlike, say, an -istream_iterator which consumes the stream it traverses), so it -must be a forward traversal iterator. Therefore, we'll pass -boost::forward_traversal_tag in this position [1].

- - - - - -
[1]iterator_facade also supports old-style category -tags, so we could have passed std::forward_iterator_tag here; -either way, the resulting iterator's iterator_category will -end up being std::forward_iterator_tag.
-
-
-

Reference

-

The Reference argument becomes the type returned by -node_iterator's dereference operation, and will also be the -same as std::iterator_traits<node_iterator>::reference. The -library's default for this parameter is Value&; since -node_base& is a good choice for the iterator's reference -type, we can omit this argument, or pass use_default.

-
-
-

Difference

-

The Difference argument determines how the distance between -two node_iterators will be measured and will also be the -same as std::iterator_traits<node_iterator>::difference_type. -The library's default for Difference is std::ptrdiff_t, an -appropriate type for measuring the distance between any two -addresses in memory, and one that works for almost any iterator, -so we can omit this argument, too.

-

The declaration of node_iterator will therefore look something -like:

-
-# include "node.hpp"
-# include <boost/iterator/iterator_facade.hpp>
-
-class node_iterator
-  : public boost::iterator_facade<
-        node_iterator
-      , node_base
-      , boost::forward_traversal_tag
-    >
-{
-   ...
-};
-
-
-
-
-

Constructors and Data Members

-

Next we need to decide how to represent the iterator's position. -This representation will take the form of data members, so we'll -also need to write constructors to initialize them. The -node_iterator's position is quite naturally represented using -a pointer to a node_base. We'll need a constructor to build an -iterator from a node_base*, and a default constructor to -satisfy the forward traversal iterator requirements [2]. -Our node_iterator then becomes:

-
-# include "node.hpp"
-# include <boost/iterator/iterator_facade.hpp>
-
-class node_iterator
-  : public boost::iterator_facade<
-        node_iterator
-      , node_base
-      , boost::forward_traversal_tag
-    >
-{
- public:
-    node_iterator()
-      : m_node(0)
-    {}
-
-    explicit node_iterator(node_base* p)
-      : m_node(p)
-    {}
-
- private:
-    ...
-    node_base* m_node;
-};
-
- - - - - -
[2]Technically, the C++ standard places almost no -requirements on a default-constructed iterator, so if we were -really concerned with efficiency, we could've written the -default constructor to leave m_node uninitialized.
-
-
-

Implementing the Core Operations

-

The last step is to implement the core operations required by -the concepts we want our iterator to model. Referring to the -table, we can see that the first three rows are applicable -because node_iterator needs to satisfy the requirements for -readable iterator, single pass iterator, and incrementable -iterator.

-

We therefore need to supply dereference, -equal, and increment members. We don't want these members -to become part of node_iterator's public interface, so we can -make them private and grant friendship to -boost::iterator_core_access, a "back-door" that -iterator_facade uses to get access to the core operations:

-
-# include "node.hpp"
-# include <boost/iterator/iterator_facade.hpp>
-
-class node_iterator
-  : public boost::iterator_facade<
-        node_iterator
-      , node_base
-      , boost::forward_traversal_tag
-    >
-{
- public:
-    node_iterator()
-      : m_node(0) {}
-
-    explicit node_iterator(node_base* p)
-      : m_node(p) {}
-
- private:
-    friend class boost::iterator_core_access;
-
-    void increment() { m_node = m_node->next(); }
-
-    bool equal(node_iterator const& other) const
-    {
-        return this->m_node == other.m_node;
-    }
-
-    node_base& dereference() const { return *m_node; }
-
-    node_base* m_node;
-};
-
-

Voilà; a complete and conforming readable, forward-traversal -iterator! For a working example of its use, see this program.

-
-
-
-

A constant node_iterator

- -

Now, our node_iterator gives clients access to both node's print(std::ostream&) const member function, but also its -mutating double_me() member. If we wanted to build a -constant node_iterator, we'd only have to make three -changes:

-
-class const_node_iterator
-  : public boost::iterator_facade<
-        node_iterator
-      , node_base const
-      , boost::forward_traversal_tag
-    >
-{
- public:
-    const_node_iterator()
-      : m_node(0) {}
-
-    explicit const_node_iterator(node_base* p)
-      : m_node(p) {}
-
- private:
-    friend class boost::iterator_core_access;
-
-    void increment() { m_node = m_node->next(); }
-
-    bool equal(const_node_iterator const& other) const
-    {
-        return this->m_node == other.m_node;
-    }
-
-    node_base const& dereference() const { return *m_node; }
-
-    node_base const* m_node;
-};
-
- -

As a matter of fact, node_iterator and const_node_iterator -are so similar that it makes sense to factor the common code out -into a template as follows:

-
-template <class Value>
-class node_iter
-  : public boost::iterator_facade<
-        node_iter<Value>
-      , Value
-      , boost::forward_traversal_tag
-    >
-{
- public:
-    node_iter()
-      : m_node(0) {}
-
-    explicit node_iter(Value* p)
-      : m_node(p) {}
-
- private:
-    friend class boost::iterator_core_access;
-
-    bool equal(node_iter<Value> const& other) const
-    {
-        return this->m_node == other.m_node;
-    }
-
-    void increment()
-    { m_node = m_node->next(); }
-
-    Value& dereference() const
-    { return *m_node; }
-
-    Value* m_node;
-};
-typedef node_iter<node_base> node_iterator;
-typedef node_iter<node_base const> node_const_iterator;
-
-
-
-

Interoperability

-

Our const_node_iterator works perfectly well on its own, but -taken together with node_iterator it doesn't quite meet -expectations. For example, we'd like to be able to pass a -node_iterator where a node_const_iterator was expected, -just as you can with std::list<int>'s iterator and -const_iterator. Furthermore, given a node_iterator and a -node_const_iterator into the same list, we should be able to -compare them for equality.

-

This expected ability to use two different iterator types together -is known as interoperability. Achieving interoperability in -our case is as simple as templatizing the equal function and -adding a templatized converting constructor [3] [4]:

-
-template <class Value>
-class node_iter
-  : public boost::iterator_facade<
-        node_iter<Value>
-      , Value
-      , boost::forward_traversal_tag
-    >
-{
- public:
-    node_iter()
-      : m_node(0) {}
-
-    explicit node_iter(Value* p)
-      : m_node(p) {}
-
-    template <class OtherValue>
-    node_iter(node_iter<OtherValue> const& other)
-      : m_node(other.m_node) {}
-
- private:
-    friend class boost::iterator_core_access;
-    template <class> friend class node_iter;
-
-    template <class OtherValue>
-    bool equal(node_iter<OtherValue> const& other) const
-    { 
-        return this->m_node == other.m_node;
-    }
-
-    void increment()
-    { m_node = m_node->next(); }
-
-    Value& dereference() const
-    { return *m_node; }
-
-    Value* m_node;
-};
-typedef impl::node_iterator<node_base> node_iterator;
-typedef impl::node_iterator<node_base const> node_const_iterator;
-
- - - - - -
[3]If you're using an older compiler and it can't handle -this example, see the example code for workarounds.
- - - - - -
[4]If node_iterator had been a random access -traversal iterator, we'd have had to templatize its -distance_to function as well.
-

You can see an example program which exercises our interoperable -iterators here.

-
-
-

Telling the Truth

-

Now node_iterator and node_const_iterator behave exactly as -you'd expect... almost. We can compare them and we can convert in -one direction: from node_iterator to node_const_iterator. -If we try to convert from node_const_iterator to -node_iterator, we'll get an error when the converting -constructor tries to initialize node_iterator's m_node, a -node* with a node const*. So what's the problem?

-

The problem is that -boost::is_convertible<node_const_iterator,node_iterator>::value -will be true, but it should be false. is_convertible -lies because it can only see as far as the declaration of -node_iter's converting constructor, but can't look inside at -the definition to make sure it will compile. A perfect solution -would make node_iter's converting constructor disappear when -the m_node conversion would fail.

-

In fact, that sort of magic is possible using -boost::enable_if. By rewriting the converting constructor as -follows, we can remove it from the overload set when it's not -appropriate:

-
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/enable_if.hpp>
-
-  ...
-
-private: 
-  struct enabler {};
-
-public:
-  template <class OtherValue>
-  node_iter(
-      node_iter<OtherValue> const& other
-    , typename boost::enable_if<
-          boost::is_convertible<OtherValue*,Value*>
-        , enabler
-      >::type = enabler()
-  )
-    : m_node(other.m_node) {}
-
-
-
-

Wrap Up

-

This concludes our iterator_facade tutorial, but before you -stop reading we urge you to take a look at iterator_adaptor. -There's another way to approach writing these iterators which might -even be superior.

-
-
-
- - - - diff --git a/doc/iterator_facade.pdf b/doc/iterator_facade.pdf deleted file mode 100755 index bfa17bf..0000000 Binary files a/doc/iterator_facade.pdf and /dev/null differ diff --git a/doc/iterator_facade.rst b/doc/iterator_facade.rst deleted file mode 100644 index a76da74..0000000 --- a/doc/iterator_facade.rst +++ /dev/null @@ -1,40 +0,0 @@ -++++++++++++++++ - Iterator Facade -++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - - .. include:: iterator_facade_abstract.rst - -.. contents:: Table of Contents - -Overview -======== - -.. include:: iterator_facade_body.rst - - -Reference -========= - -.. include:: iterator_facade_ref.rst - -.. _counting: counting_iterator.html - -Tutorial Example -================ - -.. include:: iterator_facade_tutorial.rst - diff --git a/doc/iterator_facade_abstract.rst b/doc/iterator_facade_abstract.rst deleted file mode 100644 index f024b9b..0000000 --- a/doc/iterator_facade_abstract.rst +++ /dev/null @@ -1,4 +0,0 @@ -``iterator_facade`` is a base class template that implements the -interface of standard iterators in terms of a few core functions -and associated types, to be supplied by a derived iterator class. - diff --git a/doc/iterator_facade_body.rst b/doc/iterator_facade_body.rst deleted file mode 100644 index 38b827a..0000000 --- a/doc/iterator_facade_body.rst +++ /dev/null @@ -1,191 +0,0 @@ -.. Version 1.1 of this ReStructuredText document corresponds to - n1530_, the paper accepted by the LWG for TR1. - -.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - - -While the iterator interface is rich, there is a core subset of the -interface that is necessary for all the functionality. We have -identified the following core behaviors for iterators: - -* dereferencing -* incrementing -* decrementing -* equality comparison -* random-access motion -* distance measurement - -In addition to the behaviors listed above, the core interface elements -include the associated types exposed through iterator traits: -``value_type``, ``reference``, ``difference_type``, and -``iterator_category``. - -Iterator facade uses the Curiously Recurring Template -Pattern (CRTP) [Cop95]_ so that the user can specify the behavior -of ``iterator_facade`` in a derived class. Former designs used -policy objects to specify the behavior, but that approach was -discarded for several reasons: - - 1. the creation and eventual copying of the policy object may create - overhead that can be avoided with the current approach. - - 2. The policy object approach does not allow for custom constructors - on the created iterator types, an essential feature if - ``iterator_facade`` should be used in other library - implementations. - - 3. Without the use of CRTP, the standard requirement that an - iterator's ``operator++`` returns the iterator type itself - would mean that all iterators built with the library would - have to be specializations of ``iterator_facade<...>``, rather - than something more descriptive like - ``indirect_iterator``. Cumbersome type generator - metafunctions would be needed to build new parameterized - iterators, and a separate ``iterator_adaptor`` layer would be - impossible. - -Usage ------ - -The user of ``iterator_facade`` derives his iterator class from a -specialization of ``iterator_facade`` and passes the derived -iterator class as ``iterator_facade``\ 's first template parameter. -The order of the other template parameters have been carefully -chosen to take advantage of useful defaults. For example, when -defining a constant lvalue iterator, the user can pass a -const-qualified version of the iterator's ``value_type`` as -``iterator_facade``\ 's ``Value`` parameter and omit the -``Reference`` parameter which follows. - -The derived iterator class must define member functions implementing -the iterator's core behaviors. The following table describes -expressions which are required to be valid depending on the category -of the derived iterator type. These member functions are described -briefly below and in more detail in the iterator facade -requirements. - - +------------------------+-------------------------------+ - |Expression |Effects | - +========================+===============================+ - |``i.dereference()`` |Access the value referred to | - +------------------------+-------------------------------+ - |``i.equal(j)`` |Compare for equality with ``j``| - +------------------------+-------------------------------+ - |``i.increment()`` |Advance by one position | - +------------------------+-------------------------------+ - |``i.decrement()`` |Retreat by one position | - +------------------------+-------------------------------+ - |``i.advance(n)`` |Advance by ``n`` positions | - +------------------------+-------------------------------+ - |``i.distance_to(j)`` |Measure the distance to ``j`` | - +------------------------+-------------------------------+ - -.. Should we add a comment that a zero overhead implementation of iterator_facade - is possible with proper inlining? - -In addition to implementing the core interface functions, an iterator -derived from ``iterator_facade`` typically defines several -constructors. To model any of the standard iterator concepts, the -iterator must at least have a copy constructor. Also, if the iterator -type ``X`` is meant to be automatically interoperate with another -iterator type ``Y`` (as with constant and mutable iterators) then -there must be an implicit conversion from ``X`` to ``Y`` or from ``Y`` -to ``X`` (but not both), typically implemented as a conversion -constructor. Finally, if the iterator is to model Forward Traversal -Iterator or a more-refined iterator concept, a default constructor is -required. - - - -Iterator Core Access --------------------- - -``iterator_facade`` and the operator implementations need to be able -to access the core member functions in the derived class. Making the -core member functions public would expose an implementation detail to -the user. The design used here ensures that implementation details do -not appear in the public interface of the derived iterator type. - -Preventing direct access to the core member functions has two -advantages. First, there is no possibility for the user to accidently -use a member function of the iterator when a member of the value_type -was intended. This has been an issue with smart pointer -implementations in the past. The second and main advantage is that -library implementers can freely exchange a hand-rolled iterator -implementation for one based on ``iterator_facade`` without fear of -breaking code that was accessing the public core member functions -directly. - -In a naive implementation, keeping the derived class' core member -functions private would require it to grant friendship to -``iterator_facade`` and each of the seven operators. In order to -reduce the burden of limiting access, ``iterator_core_access`` is -provided, a class that acts as a gateway to the core member functions -in the derived iterator class. The author of the derived class only -needs to grant friendship to ``iterator_core_access`` to make his core -member functions available to the library. - -.. This is no long uptodate -thw -.. Yes it is; I made sure of it! -DWA - -``iterator_core_access`` will be typically implemented as an empty -class containing only private static member functions which invoke the -iterator core member functions. There is, however, no need to -standardize the gateway protocol. Note that even if -``iterator_core_access`` used public member functions it would not -open a safety loophole, as every core member function preserves the -invariants of the iterator. - -``operator[]`` --------------- - -The indexing operator for a generalized iterator presents special -challenges. A random access iterator's ``operator[]`` is only -required to return something convertible to its ``value_type``. -Requiring that it return an lvalue would rule out currently-legal -random-access iterators which hold the referenced value in a data -member (e.g. |counting|_), because ``*(p+n)`` is a reference -into the temporary iterator ``p+n``, which is destroyed when -``operator[]`` returns. - -.. |counting| replace:: ``counting_iterator`` - -Writable iterators built with ``iterator_facade`` implement the -semantics required by the preferred resolution to `issue 299`_ and -adopted by proposal n1550_: the result of ``p[n]`` is an object -convertible to the iterator's ``value_type``, and ``p[n] = x`` is -equivalent to ``*(p + n) = x`` (Note: This result object may be -implemented as a proxy containing a copy of ``p+n``). This approach -will work properly for any random-access iterator regardless of the -other details of its implementation. A user who knows more about -the implementation of her iterator is free to implement an -``operator[]`` that returns an lvalue in the derived iterator -class; it will hide the one supplied by ``iterator_facade`` from -clients of her iterator. - -.. _n1550: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/papers/2003/n1550.html - -.. _`issue 299`: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#299 - -.. _`operator arrow`: - - -``operator->`` --------------- - -The ``reference`` type of a readable iterator (and today's input -iterator) need not in fact be a reference, so long as it is -convertible to the iterator's ``value_type``. When the ``value_type`` -is a class, however, it must still be possible to access members -through ``operator->``. Therefore, an iterator whose ``reference`` -type is not in fact a reference must return a proxy containing a copy -of the referenced value from its ``operator->``. - -The return types for ``iterator_facade``\ 's ``operator->`` and -``operator[]`` are not explicitly specified. Instead, those types -are described in terms of a set of requirements, which must be -satisfied by the ``iterator_facade`` implementation. - -.. [Cop95] [Coplien, 1995] Coplien, J., Curiously Recurring Template - Patterns, C++ Report, February 1995, pp. 24-27. - diff --git a/doc/iterator_facade_ref.rst b/doc/iterator_facade_ref.rst deleted file mode 100644 index 695d2d4..0000000 --- a/doc/iterator_facade_ref.rst +++ /dev/null @@ -1,437 +0,0 @@ -.. Version 1.3 of this ReStructuredText document corresponds to - n1530_, the paper accepted by the LWG for TR1. - -.. Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - - -.. parsed-literal:: - - template < - class Derived - , class Value - , class CategoryOrTraversal - , class Reference = Value& - , class Difference = ptrdiff_t - > - class iterator_facade { - public: - typedef remove_const::type value_type; - typedef Reference reference; - typedef Value\* pointer; - typedef Difference difference_type; - typedef /* see below__ \*/ iterator_category; - - reference operator\*() const; - /* see below__ \*/ operator->() const; - /* see below__ \*/ operator[](difference_type n) const; - Derived& operator++(); - Derived operator++(int); - Derived& operator--(); - Derived operator--(int); - Derived& operator+=(difference_type n); - Derived& operator-=(difference_type n); - Derived operator-(difference_type n) const; - protected: - typedef iterator_facade iterator_facade\_; - }; - - // Comparison operators - template - typename enable_if_interoperable::type // exposition - operator ==(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator !=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator <(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator <=(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >(iterator_facade const& lhs, - iterator_facade const& rhs); - - template - typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); - - // Iterator difference - template - /* see below__ \*/ - operator-(iterator_facade const& lhs, - iterator_facade const& rhs); - - // Iterator addition - template - Derived operator+ (iterator_facade const&, - typename Derived::difference_type n); - - template - Derived operator+ (typename Derived::difference_type n, - iterator_facade const&); - -__ `iterator category`_ - -__ `operator arrow`_ - -__ brackets_ - -__ minus_ - -.. _`iterator category`: - -The ``iterator_category`` member of ``iterator_facade`` is - -.. parsed-literal:: - - *iterator-category*\ (CategoryOrTraversal, value_type, reference) - -where *iterator-category* is defined as follows: - -.. include:: facade_iterator_category.rst - -The ``enable_if_interoperable`` template used above is for exposition -purposes. The member operators should only be in an overload set -provided the derived types ``Dr1`` and ``Dr2`` are interoperable, -meaning that at least one of the types is convertible to the other. The -``enable_if_interoperable`` approach uses SFINAE to take the operators -out of the overload set when the types are not interoperable. -The operators should behave *as-if* ``enable_if_interoperable`` -were defined to be:: - - template enable_if_interoperable_impl - {}; - - template enable_if_interoperable_impl - { typedef T type; }; - - template - struct enable_if_interoperable - : enable_if_interoperable_impl< - is_convertible::value || is_convertible::value - , T - > - {}; - - -``iterator_facade`` Requirements --------------------------------- - -The following table describes the typical valid expressions on -``iterator_facade``\ 's ``Derived`` parameter, depending on the -iterator concept(s) it will model. The operations in the first -column must be made accessible to member functions of class -``iterator_core_access``. In addition, -``static_cast(iterator_facade*)`` shall be well-formed. - -In the table below, ``F`` is ``iterator_facade``, ``a`` is an -object of type ``X``, ``b`` and ``c`` are objects of type ``const X``, -``n`` is an object of ``F::difference_type``, ``y`` is a constant -object of a single pass iterator type interoperable with ``X``, and ``z`` -is a constant object of a random access traversal iterator type -interoperable with ``X``. - -.. _`core operations`: - -.. topic:: ``iterator_facade`` Core Operations - - +--------------------+----------------------+-------------------------+---------------------------+ - |Expression |Return Type |Assertion/Note |Used to implement Iterator | - | | | |Concept(s) | - +====================+======================+=========================+===========================+ - |``c.dereference()`` |``F::reference`` | |Readable Iterator, Writable| - | | | |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``c.equal(y)`` |convertible to bool |true iff ``c`` and ``y`` |Single Pass Iterator | - | | |refer to the same | | - | | |position. | | - +--------------------+----------------------+-------------------------+---------------------------+ - |``a.increment()`` |unused | |Incrementable Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``a.decrement()`` |unused | |Bidirectional Traversal | - | | | |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``a.advance(n)`` |unused | |Random Access Traversal | - | | | |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - |``c.distance_to(z)``|convertible to |equivalent to |Random Access Traversal | - | |``F::difference_type``|``distance(c, X(z))``. |Iterator | - +--------------------+----------------------+-------------------------+---------------------------+ - - - -``iterator_facade`` operations ------------------------------- - -The operations in this section are described in terms of operations on -the core interface of ``Derived`` which may be inaccessible -(i.e. private). The implementation should access these operations -through member functions of class ``iterator_core_access``. - -``reference operator*() const;`` - -:Returns: ``static_cast(this)->dereference()`` - -``operator->() const;`` (see below__) - -__ `operator arrow`_ - -:Returns: If ``reference`` is a reference type, an object - of type ``pointer`` equal to:: - - &static_cast(this)->dereference() - - Otherwise returns an object of unspecified type such that, - ``(*static_cast(this))->m`` is equivalent to ``(w = **static_cast(this), - w.m)`` for some temporary object ``w`` of type ``value_type``. - -.. _brackets: - -*unspecified* ``operator[](difference_type n) const;`` - -:Returns: an object convertible to ``value_type``. For constant - objects ``v`` of type ``value_type``, and ``n`` of type - ``difference_type``, ``(*this)[n] = v`` is equivalent to - ``*(*this + n) = v``, and ``static_cast((*this)[n])`` is equivalent to - ``static_cast(*(*this + n))`` - - - -``Derived& operator++();`` - -:Effects: - - :: - - static_cast(this)->increment(); - return *static_cast(this); - -``Derived operator++(int);`` - -:Effects: - - :: - - Derived tmp(static_cast(this)); - ++*this; - return tmp; - - -``Derived& operator--();`` - -:Effects: - - :: - - static_cast(this)->decrement(); - return *static_cast(this); - - -``Derived operator--(int);`` - -:Effects: - - :: - - Derived tmp(static_cast(this)); - --*this; - return tmp; - - -``Derived& operator+=(difference_type n);`` - -:Effects: - - :: - - static_cast(this)->advance(n); - return *static_cast(this); - - -``Derived& operator-=(difference_type n);`` - -:Effects: - - :: - - static_cast(this)->advance(-n); - return *static_cast(this); - - -``Derived operator-(difference_type n) const;`` - -:Effects: - - :: - - Derived tmp(static_cast(this)); - return tmp -= n; - -:: - - template - Derived operator+ (iterator_facade const&, - typename Derived::difference_type n); - - template - Derived operator+ (typename Derived::difference_type n, - iterator_facade const&); - -:Effects: - - :: - - Derived tmp(static_cast(this)); - return tmp += n; - - -:: - - template - typename enable_if_interoperable::type - operator ==(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Returns: - if ``is_convertible::value`` - - then - ``((Dr1 const&)lhs).equal((Dr2 const&)rhs)``. - - Otherwise, - ``((Dr2 const&)rhs).equal((Dr1 const&)lhs)``. - -:: - - template - typename enable_if_interoperable::type - operator !=(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Returns: - if ``is_convertible::value`` - - then - ``!((Dr1 const&)lhs).equal((Dr2 const&)rhs)``. - - Otherwise, - ``!((Dr2 const&)rhs).equal((Dr1 const&)lhs)``. - -:: - - template - typename enable_if_interoperable::type - operator <(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Returns: - if ``is_convertible::value`` - - then - ``((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) < 0``. - - Otherwise, - ``((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) > 0``. - -:: - - template - typename enable_if_interoperable::type - operator <=(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Returns: - if ``is_convertible::value`` - - then - ``((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) <= 0``. - - Otherwise, - ``((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) >= 0``. - -:: - - template - typename enable_if_interoperable::type - operator >(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Returns: - if ``is_convertible::value`` - - then - ``((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) > 0``. - - Otherwise, - ``((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) < 0``. - - -:: - - template - typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Returns: - if ``is_convertible::value`` - - then - ``((Dr1 const&)lhs).distance_to((Dr2 const&)rhs) >= 0``. - - Otherwise, - ``((Dr2 const&)rhs).distance_to((Dr1 const&)lhs) <= 0``. - -.. _minus: - -:: - - template - typename enable_if_interoperable::type - operator -(iterator_facade const& lhs, - iterator_facade const& rhs); - -:Return Type: - if ``is_convertible::value`` - - then - ``difference`` shall be - ``iterator_traits::difference_type``. - - Otherwise - ``difference`` shall be ``iterator_traits::difference_type`` - -:Returns: - if ``is_convertible::value`` - - then - ``-((Dr1 const&)lhs).distance_to((Dr2 const&)rhs)``. - - Otherwise, - ``((Dr2 const&)rhs).distance_to((Dr1 const&)lhs)``. diff --git a/doc/iterator_facade_tutorial.rst b/doc/iterator_facade_tutorial.rst deleted file mode 100755 index f56085d..0000000 --- a/doc/iterator_facade_tutorial.rst +++ /dev/null @@ -1,523 +0,0 @@ -.. Copyright David Abrahams 2004. Use, modification and distribution is -.. subject to the Boost Software License, Version 1.0. (See accompanying -.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -In this section we'll walk through the implementation of a few -iterators using ``iterator_facade``, based around the simple -example of a linked list of polymorphic objects. This example was -inspired by a `posting`__ by Keith Macdonald on the `Boost-Users`_ -mailing list. - -.. _`Boost-Users`: ../../../more/mailing_lists.htm#users - -__ http://thread.gmane.org/gmane.comp.lib.boost.user/5100 - -The Problem ------------ - -Say we've written a polymorphic linked list node base class:: - - # include - - struct node_base - { - node_base() : m_next(0) {} - - // Each node manages all of its tail nodes - virtual ~node_base() { delete m_next; } - - // Access the rest of the list - node_base* next() const { return m_next; } - - // print to the stream - virtual void print(std::ostream& s) const = 0; - - // double the value - virtual void double_me() = 0; - - void append(node_base* p) - { - if (m_next) - m_next->append(p); - else - m_next = p; - } - - private: - node_base* m_next; - }; - -Lists can hold objects of different types by linking together -specializations of the following template:: - - template - struct node : node_base - { - node(T x) - : m_value(x) - {} - - void print(std::ostream& s) const { s << this->m_value; } - void double_me() { m_value += m_value; } - - private: - T m_value; - }; - -And we can print any node using the following streaming operator:: - - inline std::ostream& operator<<(std::ostream& s, node_base const& n) - { - n.print(s); - return s; - } - -Our first challenge is to build an appropriate iterator over these -lists. - -A Basic Iterator Using ``iterator_facade`` ------------------------------------------- - -We will construct a ``node_iterator`` class using inheritance from -``iterator_facade`` to implement most of the iterator's operations. - -:: - - # include "node.hpp" - # include - - class node_iterator - : public boost::iterator_facade<...> - { - ... - }; - - - -Template Arguments for ``iterator_facade`` -.......................................... - -``iterator_facade`` has several template parameters, so we must decide -what types to use for the arguments. The parameters are ``Derived``, -``Value``, ``CategoryOrTraversal``, ``Reference``, and ``Difference``. - - -``Derived`` -''''''''''' - -Because ``iterator_facade`` is meant to be used with the CRTP -[Cop95]_ the first parameter is the iterator class name itself, -``node_iterator``. - -``Value`` -''''''''' - -The ``Value`` parameter determines the ``node_iterator``\ 's -``value_type``. In this case, we are iterating over ``node_base`` -objects, so ``Value`` will be ``node_base``. - - -``CategoryOrTraversal`` -''''''''''''''''''''''' - -Now we have to determine which `iterator traversal concept`_ our -``node_iterator`` is going to model. Singly-linked lists only have -forward links, so our iterator can't can't be a `bidirectional -traversal iterator`_. Our iterator should be able to make multiple -passes over the same linked list (unlike, say, an -``istream_iterator`` which consumes the stream it traverses), so it -must be a `forward traversal iterator`_. Therefore, we'll pass -``boost::forward_traversal_tag`` in this position [#category]_. - -.. [#category] ``iterator_facade`` also supports old-style category - tags, so we could have passed ``std::forward_iterator_tag`` here; - either way, the resulting iterator's ``iterator_category`` will - end up being ``std::forward_iterator_tag``. - -``Reference`` -''''''''''''' - -The ``Reference`` argument becomes the type returned by -``node_iterator``\ 's dereference operation, and will also be the -same as ``std::iterator_traits::reference``. The -library's default for this parameter is ``Value&``; since -``node_base&`` is a good choice for the iterator's ``reference`` -type, we can omit this argument, or pass ``use_default``. - -``Difference`` -'''''''''''''' - -The ``Difference`` argument determines how the distance between -two ``node_iterator``\ s will be measured and will also be the -same as ``std::iterator_traits::difference_type``. -The library's default for ``Difference`` is ``std::ptrdiff_t``, an -appropriate type for measuring the distance between any two -addresses in memory, and one that works for almost any iterator, -so we can omit this argument, too. - -The declaration of ``node_iterator`` will therefore look something -like:: - - # include "node.hpp" - # include - - class node_iterator - : public boost::iterator_facade< - node_iterator - , node_base - , boost::forward_traversal_tag - > - { - ... - }; - -Constructors and Data Members -............................. - -Next we need to decide how to represent the iterator's position. -This representation will take the form of data members, so we'll -also need to write constructors to initialize them. The -``node_iterator``\ 's position is quite naturally represented using -a pointer to a ``node_base``. We'll need a constructor to build an -iterator from a ``node_base*``, and a default constructor to -satisfy the `forward traversal iterator`_ requirements [#default]_. -Our ``node_iterator`` then becomes:: - - # include "node.hpp" - # include - - class node_iterator - : public boost::iterator_facade< - node_iterator - , node_base - , boost::forward_traversal_tag - > - { - public: - node_iterator() - : m_node(0) - {} - - explicit node_iterator(node_base* p) - : m_node(p) - {} - - private: - ... - node_base* m_node; - }; - -.. [#default] Technically, the C++ standard places almost no - requirements on a default-constructed iterator, so if we were - really concerned with efficiency, we could've written the - default constructor to leave ``m_node`` uninitialized. - -Implementing the Core Operations -................................ - -The last step is to implement the `core operations`_ required by -the concepts we want our iterator to model. Referring to the -table__, we can see that the first three rows are applicable -because ``node_iterator`` needs to satisfy the requirements for -`readable iterator`_, `single pass iterator`_, and `incrementable -iterator`_. - -__ `core operations`_ - -We therefore need to supply ``dereference``, -``equal``, and ``increment`` members. We don't want these members -to become part of ``node_iterator``\ 's public interface, so we can -make them private and grant friendship to -``boost::iterator_core_access``, a "back-door" that -``iterator_facade`` uses to get access to the core operations:: - - # include "node.hpp" - # include - - class node_iterator - : public boost::iterator_facade< - node_iterator - , node_base - , boost::forward_traversal_tag - > - { - public: - node_iterator() - : m_node(0) {} - - explicit node_iterator(node_base* p) - : m_node(p) {} - - private: - friend class boost::iterator_core_access; - - void increment() { m_node = m_node->next(); } - - bool equal(node_iterator const& other) const - { - return this->m_node == other.m_node; - } - - node_base& dereference() const { return *m_node; } - - node_base* m_node; - }; - -Voilà; a complete and conforming readable, forward-traversal -iterator! For a working example of its use, see `this program`__. - -__ ../example/node_iterator1.cpp - -A constant ``node_iterator`` ----------------------------- - -.. Sidebar:: Constant and Mutable iterators - - The term **mutable iterator** means an iterator through which - the object it references (its "referent") can be modified. A - **constant iterator** is one which doesn't allow modification of - its referent. - - The words *constant* and *mutable* don't refer to the ability to - modify the iterator itself. For example, an ``int const*`` is a - non-\ ``const`` *constant iterator*, which can be incremented - but doesn't allow modification of its referent, and ``int* - const`` is a ``const`` *mutable iterator*, which cannot be - modified but which allows modification of its referent. - - Confusing? We agree, but those are the standard terms. It - probably doesn't help much that a container's constant iterator - is called ``const_iterator``. - -Now, our ``node_iterator`` gives clients access to both ``node``\ -'s ``print(std::ostream&) const`` member function, but also its -mutating ``double_me()`` member. If we wanted to build a -*constant* ``node_iterator``, we'd only have to make three -changes: - -.. parsed-literal:: - - class const_node_iterator - : public boost::iterator_facade< - node_iterator - , node_base **const** - , boost::forward_traversal_tag - > - { - public: - const_node_iterator() - : m_node(0) {} - - explicit const_node_iterator(node_base* p) - : m_node(p) {} - - private: - friend class boost::iterator_core_access; - - void increment() { m_node = m_node->next(); } - - bool equal(const_node_iterator const& other) const - { - return this->m_node == other.m_node; - } - - node_base **const**\ & dereference() const { return \*m_node; } - - node_base **const**\ * m_node; - }; - -.. Sidebar:: ``const`` and an iterator's ``value_type`` - - The C++ standard requires an iterator's ``value_type`` *not* be - ``const``\ -qualified, so ``iterator_facade`` strips the - ``const`` from its ``Value`` parameter in order to produce the - iterator's ``value_type``. Making the ``Value`` argument - ``const`` provides a useful hint to ``iterator_facade`` that the - iterator is a *constant iterator*, and the default ``Reference`` - argument will be correct for all lvalue iterators. - -As a matter of fact, ``node_iterator`` and ``const_node_iterator`` -are so similar that it makes sense to factor the common code out -into a template as follows:: - - template - class node_iter - : public boost::iterator_facade< - node_iter - , Value - , boost::forward_traversal_tag - > - { - public: - node_iter() - : m_node(0) {} - - explicit node_iter(Value* p) - : m_node(p) {} - - private: - friend class boost::iterator_core_access; - - bool equal(node_iter const& other) const - { - return this->m_node == other.m_node; - } - - void increment() - { m_node = m_node->next(); } - - Value& dereference() const - { return *m_node; } - - Value* m_node; - }; - typedef node_iter node_iterator; - typedef node_iter node_const_iterator; - - -Interoperability ----------------- - -Our ``const_node_iterator`` works perfectly well on its own, but -taken together with ``node_iterator`` it doesn't quite meet -expectations. For example, we'd like to be able to pass a -``node_iterator`` where a ``node_const_iterator`` was expected, -just as you can with ``std::list``\ 's ``iterator`` and -``const_iterator``. Furthermore, given a ``node_iterator`` and a -``node_const_iterator`` into the same list, we should be able to -compare them for equality. - -This expected ability to use two different iterator types together -is known as |interoperability|_. Achieving interoperability in -our case is as simple as templatizing the ``equal`` function and -adding a templatized converting constructor [#broken]_ [#random]_:: - - template - class node_iter - : public boost::iterator_facade< - node_iter - , Value - , boost::forward_traversal_tag - > - { - public: - node_iter() - : m_node(0) {} - - explicit node_iter(Value* p) - : m_node(p) {} - - template - node_iter(node_iter const& other) - : m_node(other.m_node) {} - - private: - friend class boost::iterator_core_access; - template friend class node_iter; - - template - bool equal(node_iter const& other) const - { - return this->m_node == other.m_node; - } - - void increment() - { m_node = m_node->next(); } - - Value& dereference() const - { return *m_node; } - - Value* m_node; - }; - typedef impl::node_iterator node_iterator; - typedef impl::node_iterator node_const_iterator; - -.. |interoperability| replace:: **interoperability** -.. _interoperability: new-iter-concepts.html#interoperable-iterators-lib-interoperable-iterators - -.. [#broken] If you're using an older compiler and it can't handle - this example, see the `example code`__ for workarounds. - -.. [#random] If ``node_iterator`` had been a `random access - traversal iterator`_, we'd have had to templatize its - ``distance_to`` function as well. - - -__ ../example/node_iterator2.hpp - -You can see an example program which exercises our interoperable -iterators `here`__. - -__ ../example/node_iterator2.cpp - -Telling the Truth ------------------ - -Now ``node_iterator`` and ``node_const_iterator`` behave exactly as -you'd expect... almost. We can compare them and we can convert in -one direction: from ``node_iterator`` to ``node_const_iterator``. -If we try to convert from ``node_const_iterator`` to -``node_iterator``, we'll get an error when the converting -constructor tries to initialize ``node_iterator``\ 's ``m_node``, a -``node*`` with a ``node const*``. So what's the problem? - -The problem is that -``boost::``\ |is_convertible|_\ ``::value`` -will be ``true``, but it should be ``false``. |is_convertible|_ -lies because it can only see as far as the *declaration* of -``node_iter``\ 's converting constructor, but can't look inside at -the *definition* to make sure it will compile. A perfect solution -would make ``node_iter``\ 's converting constructor disappear when -the ``m_node`` conversion would fail. - -.. |is_convertible| replace:: ``is_convertible`` -.. _is_convertible: ../../type_traits/index.html#relationships - -In fact, that sort of magic is possible using -|enable_if|__. By rewriting the converting constructor as -follows, we can remove it from the overload set when it's not -appropriate:: - - #include - #include - - ... - - private: - struct enabler {}; - - public: - template - node_iter( - node_iter const& other - , typename boost::enable_if< - boost::is_convertible - , enabler - >::type = enabler() - ) - : m_node(other.m_node) {} - -.. |enable_if| replace:: ``boost::enable_if`` -__ ../../utility/enable_if.html - - -Wrap Up -------- - -This concludes our ``iterator_facade`` tutorial, but before you -stop reading we urge you to take a look at |iterator_adaptor|__. -There's another way to approach writing these iterators which might -even be superior. - -.. |iterator_adaptor| replace:: ``iterator_adaptor`` -__ iterator_adaptor.html - -.. _`iterator traversal concept`: new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal -.. _`readable iterator`: new-iter-concepts.html#readable-iterators-lib-readable-iterators -.. _`lvalue iterator`: new-iter-concepts.html#lvalue-iterators-lib-lvalue-iterators -.. _`single pass iterator`: new-iter-concepts.html#single-pass-iterators-lib-single-pass-iterators -.. _`incrementable iterator`: new-iter-concepts.html#incrementable-iterators-lib-incrementable-iterators -.. _`forward traversal iterator`: new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators -.. _`bidirectional traversal iterator`: new-iter-concepts.html#bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators -.. _`random access traversal iterator`: new-iter-concepts.html#random-access-traversal-iterators-lib-random-access-traversal-iterators - diff --git a/doc/iterator_traits.html b/doc/iterator_traits.html deleted file mode 100755 index d00d7be..0000000 --- a/doc/iterator_traits.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - -Iterator Traits - - - - - - - -
-

Iterator Traits

- --- - - - - - - - - - - - -
Author:David Abrahams
Contact:dave@boost-consulting.com
Organization:Boost Consulting
Date:2004-11-01
Copyright:Copyright David Abrahams 2004.
- --- - - - -
abstract:Header <boost/iterator/iterator_traits.hpp> provides -the ability to access an iterator's associated types using -MPL-compatible metafunctions.
-
-

Overview

-

std::iterator_traits provides access to five associated types -of any iterator: its value_type, reference, pointer, -iterator_category, and difference_type. Unfortunately, -such a "multi-valued" traits template can be difficult to use in a -metaprogramming context. <boost/iterator/iterator_traits.hpp> -provides access to these types using a standard metafunctions.

-
-
-

Summary

-

Header <boost/iterator/iterator_traits.hpp>:

-
-template <class Iterator>
-struct iterator_value
-{
-    typedef typename 
-      std::iterator_traits<Iterator>::value_type 
-    type;
-};
-
-template <class Iterator>
-struct iterator_reference
-{
-    typedef typename 
-      std::iterator_traits<Iterator>::reference
-    type;
-};
-
-
-template <class Iterator>
-struct iterator_pointer
-{
-    typedef typename 
-      std::iterator_traits<Iterator>::pointer 
-    type;
-};
-
-template <class Iterator>
-struct iterator_difference
-{
-    typedef typename
-      detail::iterator_traits<Iterator>::difference_type
-    type;
-};
-
-template <class Iterator>
-struct iterator_category
-{
-    typedef typename
-      detail::iterator_traits<Iterator>::iterator_category
-    type;
-};
-
-
-
-

Broken Compiler Notes

-

Because of workarounds in Boost, you may find that these -metafunctions actually work better than the facilities provided by -your compiler's standard library.

-

On compilers that don't support partial specialization, such as -Microsoft Visual C++ 6.0 or 7.0, you may need to manually invoke -BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION on the -value_type of pointers that are passed to these metafunctions.

-

Because of bugs in the implementation of GCC-2.9x, the name of -iterator_category is changed to iterator_category_ on that -compiler. A macro, BOOST_ITERATOR_CATEGORY, that expands to -either iterator_category or iterator_category_, as -appropriate to the platform, is provided for portability.

-
-
- - - - diff --git a/doc/iterator_traits.pdf b/doc/iterator_traits.pdf deleted file mode 100755 index b5c765a..0000000 Binary files a/doc/iterator_traits.pdf and /dev/null differ diff --git a/doc/iterator_traits.rst b/doc/iterator_traits.rst deleted file mode 100755 index a6d76dd..0000000 --- a/doc/iterator_traits.rst +++ /dev/null @@ -1,94 +0,0 @@ -+++++++++++++++++ - Iterator Traits -+++++++++++++++++ - -:Author: David Abrahams -:Contact: dave@boost-consulting.com -:organization: `Boost Consulting`_ -:date: $Date$ -:copyright: Copyright David Abrahams 2004. - -.. _`Boost Consulting`: http://www.boost-consulting.com - -:abstract: Header ```` provides - the ability to access an iterator's associated types using - MPL-compatible metafunctions_. - -.. _metafunctions: ../../mpl/doc/index.html#metafunctions - -Overview -======== - -``std::iterator_traits`` provides access to five associated types -of any iterator: its ``value_type``, ``reference``, ``pointer``, -``iterator_category``, and ``difference_type``. Unfortunately, -such a "multi-valued" traits template can be difficult to use in a -metaprogramming context. ```` -provides access to these types using a standard metafunctions_. - -Summary -======= - -Header ````:: - - template - struct iterator_value - { - typedef typename - std::iterator_traits::value_type - type; - }; - - template - struct iterator_reference - { - typedef typename - std::iterator_traits::reference - type; - }; - - - template - struct iterator_pointer - { - typedef typename - std::iterator_traits::pointer - type; - }; - - template - struct iterator_difference - { - typedef typename - detail::iterator_traits::difference_type - type; - }; - - template - struct iterator_category - { - typedef typename - detail::iterator_traits::iterator_category - type; - }; - -Broken Compiler Notes -===================== - -Because of workarounds in Boost, you may find that these -metafunctions_ actually work better than the facilities provided by -your compiler's standard library. - -On compilers that don't support partial specialization, such as -Microsoft Visual C++ 6.0 or 7.0, you may need to manually invoke -BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION_ on the -``value_type`` of pointers that are passed to these metafunctions. - -Because of bugs in the implementation of GCC-2.9x, the name of -``iterator_category`` is changed to ``iterator_category_`` on that -compiler. A macro, ``BOOST_ITERATOR_CATEGORY``, that expands to -either ``iterator_category`` or ``iterator_category_``, as -appropriate to the platform, is provided for portability. - -.. _BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION: ../../type_traits/index.html#transformations - diff --git a/doc/make_counting_iterator.rst b/doc/make_counting_iterator.rst deleted file mode 100755 index f1c9ae9..0000000 --- a/doc/make_counting_iterator.rst +++ /dev/null @@ -1,9 +0,0 @@ - -:: - - template - counting_iterator make_counting_iterator(Incrementable x); - -:Returns: An instance of ``counting_iterator`` - with ``current`` constructed from ``x``. - diff --git a/doc/make_filter_iterator.html b/doc/make_filter_iterator.html deleted file mode 100755 index c138f02..0000000 --- a/doc/make_filter_iterator.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - -
-
-template <class Predicate, class Iterator>
-filter_iterator<Predicate,Iterator>
-make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());
-
- --- - - - -
Returns:filter_iterator<Predicate,Iterator>(f, x, end)
-
-template <class Predicate, class Iterator>
-filter_iterator<Predicate,Iterator>
-make_filter_iterator(Iterator x, Iterator end = Iterator());
-
- --- - - - -
Returns:filter_iterator<Predicate,Iterator>(x, end)
-
- - - - diff --git a/doc/make_filter_iterator.rst b/doc/make_filter_iterator.rst deleted file mode 100755 index e4cd877..0000000 --- a/doc/make_filter_iterator.rst +++ /dev/null @@ -1,16 +0,0 @@ - -:: - - template - filter_iterator - make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator()); - -:Returns: filter_iterator(f, x, end) - -:: - - template - filter_iterator - make_filter_iterator(Iterator x, Iterator end = Iterator()); - -:Returns: filter_iterator(x, end) diff --git a/doc/make_reverse_iterator.rst b/doc/make_reverse_iterator.rst deleted file mode 100644 index c3e20ed..0000000 --- a/doc/make_reverse_iterator.rst +++ /dev/null @@ -1,9 +0,0 @@ -:: - - template - reverse_iteratorn - make_reverse_iterator(BidirectionalIterator x); - -:Returns: An instance of ``reverse_iterator`` - with a ``current`` constructed from ``x``. - diff --git a/doc/make_transform_iterator.rst b/doc/make_transform_iterator.rst deleted file mode 100755 index 5d5f1b2..0000000 --- a/doc/make_transform_iterator.rst +++ /dev/null @@ -1,19 +0,0 @@ -:: - - template - transform_iterator - make_transform_iterator(Iterator it, UnaryFunction fun); - -:Returns: An instance of ``transform_iterator`` with ``m_f`` - initialized to ``f`` and ``m_iterator`` initialized to ``x``. - - - -:: - - template - transform_iterator - make_transform_iterator(Iterator it); - -:Returns: An instance of ``transform_iterator`` with ``m_f`` - default constructed and ``m_iterator`` initialized to ``x``. diff --git a/doc/make_zip_iterator.rst b/doc/make_zip_iterator.rst deleted file mode 100755 index 0369760..0000000 --- a/doc/make_zip_iterator.rst +++ /dev/null @@ -1,8 +0,0 @@ -:: - - template - zip_iterator - make_zip_iterator(IteratorTuple t); - -:Returns: An instance of ``zip_iterator`` with ``m_iterator_tuple`` - initialized to ``t``. diff --git a/doc/new-iter-concepts.html b/doc/new-iter-concepts.html deleted file mode 100755 index f50727a..0000000 --- a/doc/new-iter-concepts.html +++ /dev/null @@ -1,1023 +0,0 @@ - - - - - - -New Iterator Concepts - - - - - - - -
-

New Iterator Concepts

- --- - - - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com
Organization:Boost Consulting, Indiana University Open Systems -Lab, Zephyr Associates, Inc.
Date:2004-11-01
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 -revision of paper n1297, n1477, and n1531.
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt -2003.
- - --- - - - -
Abstract:We propose a new system of iterator concepts that treat -access and positioning independently. This allows the -concepts to more closely match the requirements -of algorithms and provides better categorizations -of iterators that are used in practice.
- -
-

Motivation

-

The standard iterator categories and requirements are flawed because -they use a single hierarchy of concepts to address two orthogonal -issues: iterator traversal and value access. As a result, many -algorithms with requirements expressed in terms of the iterator -categories are too strict. Also, many real-world iterators can not be -accurately categorized. A proxy-based iterator with random-access -traversal, for example, may only legally have a category of "input -iterator", so generic algorithms are unable to take advantage of its -random-access capabilities. The current iterator concept hierarchy is -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.

- ---- - - - - - - - - - - - - - - - - - - -
Value Access Requirements in Existing Iterator Categories
Output Iterator*i = a
Input Iterator*i is convertible to T
Forward Iterator*i is T& (or const T& once issue 200 -is resolved)
Random Access Iteratori[n] is convertible to T (also i[n] = t -is required for mutable iterators once issue 299 -is resolved)
-

Because iterator traversal and value access are mixed together in a -single hierarchy, many useful iterators can not be appropriately -categorized. For example, vector<bool>::iterator is almost a -random access iterator, but the return type is not bool& (see -issue 96 and Herb Sutter's paper J16/99-0008 = WG21 -N1185). Therefore, the iterators of vector<bool> only meet the -requirements of input iterator and output iterator. This is so -nonintuitive that the C++ standard contradicts itself on this point. -In paragraph 23.2.4/1 it says that a vector is a sequence that -supports random access iterators.

-

Another difficult-to-categorize iterator is the transform iterator, an -adaptor which applies a unary function object to the dereferenced -value of the some underlying iterator (see transform_iterator). -For unary functions such as times, the return type of -operator* clearly needs to be the result_type of the function -object, which is typically not a reference. Because random access -iterators are required to return lvalues from operator*, if you -wrap int* with a transform iterator, you do not get a random -access iterator as might be expected, but an input iterator.

-

A third example is found in the vertex and edge iterators of the -Boost Graph Library. These iterators return vertex and edge -descriptors, which are lightweight handles created on-the-fly. They -must be returned by-value. As a result, their current standard -iterator category is input_iterator_tag, which means that, -strictly speaking, you could not use these iterators with algorithms -like min_element(). As a temporary solution, the concept -Multi-Pass Input Iterator was introduced to describe the vertex and -edge descriptors, but as the design notes for the concept suggest, a -better solution is needed.

-

In short, there are many useful iterators that do not fit into the -current standard iterator categories. As a result, the following bad -things happen:

-
    -
  • Iterators are often mis-categorized.
  • -
  • Algorithm requirements are more strict than necessary, because they -cannot separate the need for random access or bidirectional -traversal from the need for a true reference return type.
  • -
-
-
-

Impact on the Standard

-

This proposal for TR1 is a pure extension. Further, the new iterator -concepts are backward-compatible with the old iterator requirements, -and old iterators are forward-compatible with the new iterator -concepts. That is to say, iterators that satisfy the old requirements -also satisfy appropriate concepts in the new system, and iterators -modeling the new concepts will automatically satisfy the appropriate -old requirements.

- - -
-

Possible (but not proposed) Changes to the Working Paper

-

The extensions in this paper suggest several changes we might make -to the working paper for the next standard. These changes are not -a formal part of this proposal for TR1.

-
-

Changes to Algorithm Requirements

-

The algorithms in the standard library could benefit from the new -iterator concepts because the new concepts provide a more accurate way -to express their type requirements. The result is algorithms that are -usable in more situations and have fewer type requirements.

-

For the next working paper (but not for TR1), the committee should -consider the following changes to the type requirements of algorithms. -These changes are phrased as textual substitutions, listing the -algorithms to which each textual substitution applies.

-

Forward Iterator -> Forward Traversal Iterator and Readable Iterator

-
-find_end, adjacent_find, search, search_n, rotate_copy, -lower_bound, upper_bound, equal_range, binary_search, -min_element, max_element
-

Forward Iterator (1) -> Single Pass Iterator and Readable Iterator, -Forward Iterator (2) -> Forward Traversal Iterator and Readable Iterator

-
-find_first_of
-

Forward Iterator -> Readable Iterator and Writable Iterator

-
-iter_swap
-

Forward Iterator -> Single Pass Iterator and Writable Iterator

-
-fill, generate
-

Forward Iterator -> Forward Traversal Iterator and Swappable Iterator

-
-rotate
-

Forward Iterator (1) -> Swappable Iterator and Single Pass Iterator, -Forward Iterator (2) -> Swappable Iterator and Incrementable Iterator

-
-swap_ranges
-
-
Forward Iterator -> Forward Traversal Iterator and Readable Iterator and Writable Iterator
-
remove, remove_if, unique
-
-

Forward Iterator -> Single Pass Iterator and Readable Iterator and Writable Iterator

-
-replace, replace_if
-
-
Bidirectional Iterator -> Bidirectional Traversal Iterator and Swappable Iterator
-
reverse
-
Bidirectional Iterator -> Bidirectional Traversal Iterator and Readable and Swappable Iterator
-
partition
-
-

Bidirectional Iterator (1) -> Bidirectional Traversal Iterator and Readable Iterator, -Bidirectional Iterator (2) -> Bidirectional Traversal Iterator and Writable Iterator

-
-copy_backwards
-
-
Bidirectional Iterator -> Bidirectional Traversal Iterator and Swappable Iterator and Readable Iterator
-
next_permutation, prev_permutation
-
Bidirectional Iterator -> Bidirectional Traversal Iterator and Readable Iterator and Writable Iterator
-
stable_partition, inplace_merge
-
Bidirectional Iterator -> Bidirectional Traversal Iterator and Readable Iterator
-
reverse_copy
-
Random Access Iterator -> Random Access Traversal Iterator and Readable and Writable Iterator
-
random_shuffle, sort, stable_sort, partial_sort, nth_element, push_heap, pop_heap -make_heap, sort_heap
-
Input Iterator (2) -> Incrementable Iterator and Readable Iterator
-
equal, mismatch
-
Input Iterator (2) -> Incrementable Iterator and Readable Iterator
-
transform
-
-
-
-

Deprecations

-

For the next working paper (but not for TR1), the committee should -consider deprecating the old iterator tags, and -std::iterator_traits, since it will be superceded by individual -traits metafunctions.

-
-
-

vector<bool>

-

For the next working paper (but not for TR1), the committee should -consider reclassifying vector<bool>::iterator as a Random -Access Traversal Iterator and Readable Iterator and Writable -Iterator.

-
-
-
-
-

Design

-

The iterator requirements are to be separated into two groups. One set -of concepts handles the syntax and semantics of value access:

-
    -
  • Readable Iterator
  • -
  • Writable Iterator
  • -
  • Swappable Iterator
  • -
  • Lvalue Iterator
  • -
-

The access concepts describe requirements related to operator* and -operator->, including the value_type, reference, and -pointer associated types.

-

The other set of concepts handles traversal:

-
    -
  • Incrementable Iterator
  • -
  • Single Pass Iterator
  • -
  • Forward Traversal Iterator
  • -
  • Bidirectional Traversal Iterator
  • -
  • Random Access Traversal Iterator
  • -
-

The refinement relationships for the traversal concepts are in the -following diagram.

-
traversal.png
-

In addition to the iterator movement operators, such as -operator++, the traversal concepts also include requirements on -position comparison such as operator== and operator<. The -reason for the fine grain slicing of the concepts into the -Incrementable and Single Pass is to provide concepts that are exact -matches with the original input and output iterator requirements.

-

This proposal also includes a concept for specifying when an iterator -is interoperable with another iterator, in the sense that int* is -interoperable with int const*.

-
    -
  • Interoperable Iterators
  • -
-

The relationship between the new iterator concepts and the old are -given in the following diagram.

-
oldeqnew.png
-

Like the old iterator requirements, we provide tags for purposes of -dispatching based on the traversal concepts. The tags are related via -inheritance so that a tag is convertible to another tag if the concept -associated with the first tag is a refinement of the second tag.

-

Our design reuses iterator_traits<Iter>::iterator_category to -indicate an iterator's traversal capability. To specify -capabilities not captured by any old-style iterator category, an -iterator designer can use an iterator_category type that is -convertible to both the the most-derived old iterator category tag -which fits, and the appropriate new iterator traversal tag.

- -

We do not provide tags for the purposes of dispatching based on the -access concepts, in part because we could not find a way to -automatically infer the right access tags for old-style iterators. -An iterator's writability may be dependent on the assignability of -its value_type and there's no known way to detect whether an -arbitrary type is assignable. Fortunately, the need for -dispatching based on access capability is not as great as the need -for dispatching based on traversal capability.

-

A difficult design decision concerned the operator[]. The direct -approach for specifying operator[] would have a return type of -reference; the same as operator*. However, going in this -direction would mean that an iterator satisfying the old Random Access -Iterator requirements would not necessarily be a model of Readable or -Writable Lvalue Iterator. Instead we have chosen a design that -matches the preferred resolution of issue 299: operator[] is -only required to return something convertible to the value_type -(for a Readable Iterator), and is required to support assignment -i[n] = t (for a Writable Iterator).

-
-
-

Proposed Text

-
-

Addition to [lib.iterator.requirements]

-
-

Iterator Value Access Concepts [lib.iterator.value.access]

-

In the tables below, X is an iterator type, a is a constant -object of type X, R is -std::iterator_traits<X>::reference, T is -std::iterator_traits<X>::value_type, and v is a constant -object of type T.

-
-

Readable Iterators [lib.readable.iterators]

-

A class or built-in type X models the Readable Iterator concept -for value type T if, in addition to X being Assignable and -Copy Constructible, the following expressions are valid and respect -the stated semantics. U is the type of any specified member of -type T.

- ----- - - - - - - - - - - - - - - - - - - - - - - -
Readable Iterator Requirements (in addition to Assignable and Copy Constructible)
ExpressionReturn TypeNote/Precondition
iterator_traits<X>::value_typeTAny non-reference, -non-cv-qualified type
*aConvertible to T
-
pre: a is dereferenceable. If a == b then *a
-
is equivalent to *b.
-
-
a->mU&pre: pre: (*a).m is well-defined. Equivalent to (*a).m.
- -
-
-

Writable Iterators [lib.writable.iterators]

-

A class or built-in type X models the Writable Iterator concept -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.

- ----- - - - - - - - - - - - - - - -
Writable Iterator Requirements (in addition to Copy Constructible)
ExpressionReturn TypePrecondition
*a = o pre: The type of o -is in the set of -value types of X
-
-
-

Swappable Iterators [lib.swappable.iterators]

-

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.

- ----- - - - - - - - - - - - - - - -
Swappable Iterator Requirements (in addition to Copy Constructible)
ExpressionReturn TypePostcondition
iter_swap(a, b)voidthe pointed to values are -exchanged
-

[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.

- ----- - - - - - - - - - - - - - - -
Lvalue Iterator Requirements
ExpressionReturn TypeNote/Assertion
*aT&T is cv -iterator_traits<X>::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.

-
-
-
-

Iterator Traversal Concepts [lib.iterator.traversal]

-

In the tables below, X is an iterator type, a and b are -constant objects of type X, r and s are mutable objects of -type X, T is std::iterator_traits<X>::value_type, and -v is a constant object of type T.

-
-

Incrementable Iterators [lib.incrementable.iterators]

-

A class or built-in type X models the Incrementable Iterator -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)
ExpressionReturn TypeAssertion
++rX&&r == &++r
r++  
*r++  
iterator_traversal<X>::typeConvertible 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;.

- -
-
-

Single Pass Iterators [lib.single.pass.iterators]

-

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 -Comparable)
ExpressionReturn TypeOperational -SemanticsAssertion/ -Pre-/Post-condition
++rX& pre: r is -dereferenceable; post: -r is dereferenceable or -r is past-the-end
a == bconvertible to bool == is an equivalence -relation over its domain
a != bconvertible to bool!(a == b) 
iterator_traversal<X>::typeConvertible to -single_pass_traversal_tag  
- -
-
-

Forward Traversal Iterators [lib.forward.traversal.iterators]

-

A class or built-in type X models the Forward Traversal Iterator -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.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator)
ExpressionReturn TypeAssertion/Note
X u;X&note: u may have a -singular value.
++rX&r == s and r is -dereferenceable implies -++r == ++s.
iterator_traits<X>::difference_typeA signed integral type representing -the distance between iterators 
iterator_traversal<X>::typeConvertible to -forward_traversal_tag 
- -
-
-

Bidirectional Traversal Iterators [lib.bidirectional.traversal.iterators]

-

A class or built-in type X models the Bidirectional Traversal -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)
ExpressionReturn TypeOperational -SemanticsAssertion/ -Pre-/Post-condition
--rX& 

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<X>::typeConvertible to -bidirectional_traversal_tag  
- -
-
-

Random Access Traversal Iterators [lib.random.access.traversal.iterators]

-

A class or built-in type X models the Random Access Traversal -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.

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Random Access Traversal Iterator Requirements (in addition to Bidirectional Traversal Iterator)
ExpressionReturn TypeOperational SemanticsAssertion/ -Precondition
r += nX&
-{
-  Distance m = n;
-  if (m >= 0)
-    while (m--)
-      ++r;
-  else
-    while (m++)
-      --r;
-  return r;
-}
-
-
 
a + n, n + aX{ X tmp = a; return tmp -+= n; } 
r -= nX&return r += -n 
a - nX{ X tmp = a; return tmp --= n; } 
b - aDistancea < b ?  distance(a,b) -: -distance(b,a)pre: there exists a -value n of -Distance such that -a + n == b. b -== a + (b - a).
a[n]convertible to T*(a + n)pre: a is a Readable -Iterator
a[n] = vconvertible to T*(a + n) = vpre: a is a Writable -Iterator
a < bconvertible to boolb - a > 0< is a total -ordering relation
a > bconvertible to boolb < a> is a total -ordering relation
a >= bconvertible to bool!(a < b) 
a <= bconvertible to bool!(a > b) 
iterator_traversal<X>::typeConvertible to -random_access_traversal_tag  
- -
-
-

Interoperable Iterators [lib.interoperable.iterators]

-

A class or built-in type X that models Single Pass Iterator is -interoperable with a class or built-in type Y that also models -Single Pass Iterator if the following expressions are valid and -respect the stated semantics. In the tables below, x is an object -of type X, y is an object of type Y, Distance is -iterator_traits<Y>::difference_type, and n represents a -constant object of type Distance.

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeAssertion/Precondition/Postcondition
y = xYpost: y == x
Y(x)Ypost: Y(x) == x
x == yconvertible to bool== is an equivalence relation over its domain.
y == xconvertible to bool== is an equivalence relation over its domain.
x != yconvertible to boolbool(a==b) != bool(a!=b) over its domain.
y != xconvertible to boolbool(a==b) != bool(a!=b) over its domain.
-

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

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpressionReturn TypeOperational SemanticsAssertion/ Precondition
x < yconvertible to booly - x > 0< is a total ordering relation
y < xconvertible to boolx - y > 0< is a total ordering relation
x > yconvertible to booly < x> is a total ordering relation
y > xconvertible to boolx < y> is a total ordering relation
x >= yconvertible to bool!(x < y) 
y >= xconvertible to bool!(y < x) 
x <= yconvertible to bool!(x > y) 
y <= xconvertible to bool!(y > x) 
y - xDistancedistance(Y(x),y)pre: there exists a value n of -Distance such that x + n == y. -y == x + (y - x).
x - yDistancedistance(y,Y(x))pre: there exists a value n of -Distance such that y + n == x. -x == y + (x - y).
-
-
-
-
-

Addition to [lib.iterator.synopsis]

-
-// lib.iterator.traits, traits and tags
-template <class Iterator> struct is_readable_iterator;
-template <class Iterator> struct iterator_traversal;
-
-struct incrementable_traversal_tag { };
-struct single_pass_traversal_tag : incrementable_traversal_tag { };
-struct forward_traversal_tag : single_pass_traversal_tag { };
-struct bidirectional_traversal_tag : forward_traversal_tag { };
-struct random_access_traversal_tag : bidirectional_traversal_tag { };
-
-
-
-

Addition to [lib.iterator.traits]

-

The is_readable_iterator class -template satisfies the UnaryTypeTrait requirements.

-

Given an iterator type X, is_readable_iterator<X>::value -yields true if, for an object a of type X, *a is -convertible to iterator_traits<X>::value_type, and false -otherwise.

-

iterator_traversal<X>::type is

-
-category-to-traversal(iterator_traits<X>::iterator_category) 
-
-

where category-to-traversal is defined as follows

-
-category-to-traversal(C) =
-    if (C is convertible to incrementable_traversal_tag)
-        return C;
-    else if (C is convertible to random_access_iterator_tag)
-        return random_access_traversal_tag;
-    else if (C is convertible to bidirectional_iterator_tag)
-        return bidirectional_traversal_tag;
-    else if (C is convertible to forward_iterator_tag)
-        return forward_traversal_tag;
-    else if (C is convertible to input_iterator_tag)
-        return single_pass_traversal_tag;
-    else if (C is convertible to output_iterator_tag)
-        return incrementable_traversal_tag;
-    else
-        the program is ill-formed
-
-
-
-
-

Footnotes

-

The UnaryTypeTrait concept is defined in n1519; the LWG is -considering adding the requirement that specializations are derived -from their nested ::type.

- -
-
- - - - diff --git a/doc/new-iter-concepts.pdf b/doc/new-iter-concepts.pdf deleted file mode 100755 index 2118e6c..0000000 --- a/doc/new-iter-concepts.pdf +++ /dev/null @@ -1,3463 +0,0 @@ -%PDF-1.3 -1 0 obj -<< -/Type /Catalog -/Pages 2 0 R -/Outlines 135 0 R -/Names 211 0 R -/PageMode /UseOutlines -/URI << -/Base () ->> -/ViewerPreferences << ->> -/OpenAction 316 0 R -/PTEX.Fullbanner (This is pdfTeX, Version 3.14159-1.10b) ->> -endobj -2 0 obj -<< -/Type /Pages -/Kids [ 3 0 R 52 0 R 78 0 R 90 0 R 93 0 R 98 0 R 102 0 R 112 0 R 115 0 R 122 0 R 126 0 R ] -/Count 11 ->> -endobj -3 0 obj -<< -/Type /Page -/Annots [ 4 0 R 5 0 R 6 0 R 7 0 R 8 0 R 9 0 R 10 0 R 11 0 R 12 0 R 13 0 R 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R 31 0 R ] -/Resources 32 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 51 0 R ->> -endobj -4 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 180.927 641.879 302.191 652.719 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (mailto:dave@boost-consulting.com) ->> ->> -endobj -5 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 306.275 641.879 376.361 652.719 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (mailto:jsiek@osl.iu.edu) ->> ->> -endobj -6 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 380.446 641.879 479.603 652.719 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (mailto:witt@styleadvisor.com) ->> ->> -endobj -7 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 180.927 629.924 258.292 640.763 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.boost-consulting.com) ->> ->> -endobj -8 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 346.305 629.924 430.231 640.763 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.osl.iu.edu) ->> ->> -endobj -9 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 434.257 629.924 493.561 640.763 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.styleadvisor.com) ->> ->> -endobj -10 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 180.927 617.969 229.684 628.619 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.styleadvisor.com) ->> ->> -endobj -11 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 98.32 460.535 147.863 469.252 ] -/Subtype /Link -/A << -/S /GoTo -/D (motivation) ->> ->> -endobj -12 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 98.32 438.677 205.128 449.516 ] -/Subtype /Link -/A << -/S /GoTo -/D (impact-on-the-standard) ->> ->> -endobj -13 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 120.238 418.194 381.305 430.054 ] -/Subtype /Link -/A << -/S /GoTo -/D (possible-but-not-proposed-changes-to-the-working-paper) ->> ->> -endobj -14 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 138.868 402.811 300.151 413.651 ] -/Subtype /Link -/A << -/S /GoTo -/D (changes-to-algorithm-requirements) ->> ->> -endobj -15 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 138.868 388.864 197.198 399.514 ] -/Subtype /Link -/A << -/S /GoTo -/D (deprecations) ->> ->> -endobj -16 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 138.868 376.849 203.505 384.928 ] -/Subtype /Link -/A << -/S /GoTo -/D (vector-bool) ->> ->> -endobj -17 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 98.32 354.991 129.532 365.641 ] -/Subtype /Link -/A << -/S /GoTo -/D (design) ->> ->> -endobj -18 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 98.32 335.065 163.843 345.905 ] -/Subtype /Link -/A << -/S /GoTo -/D (proposed-text) ->> ->> -endobj -19 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 120.238 314.582 286.84 326.443 ] -/Subtype /Link -/A << -/S /GoTo -/D (addition-to-lib-iterator-requirements) ->> ->> -endobj -20 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 138.868 298.642 386.446 310.502 ] -/Subtype /Link -/A << -/S /GoTo -/D (iterator-value-access-concepts-lib-iterator-value-access) ->> ->> -endobj -21 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 284.694 337.022 296.555 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterators-lib-readable-iterators) ->> ->> -endobj -22 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 270.746 333.564 282.607 ] -/Subtype /Link -/A << -/S /GoTo -/D (writable-iterators-lib-writable-iterators) ->> ->> -endobj -23 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 256.799 351.308 268.659 ] -/Subtype /Link -/A << -/S /GoTo -/D (swappable-iterators-lib-swappable-iterators) ->> ->> -endobj -24 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 242.851 314.317 254.712 ] -/Subtype /Link -/A << -/S /GoTo -/D (lvalue-iterators-lib-lvalue-iterators) ->> ->> -endobj -25 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 138.868 228.903 356.319 240.764 ] -/Subtype /Link -/A << -/S /GoTo -/D (iterator-traversal-concepts-lib-iterator-traversal) ->> ->> -endobj -26 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 214.956 382.52 226.816 ] -/Subtype /Link -/A << -/S /GoTo -/D (incrementable-iterators-lib-incrementable-iterators) ->> ->> -endobj -27 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 201.008 354.675 212.868 ] -/Subtype /Link -/A << -/S /GoTo -/D (single-pass-iterators-lib-single-pass-iterators) ->> ->> -endobj -28 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 187.06 413.116 198.921 ] -/Subtype /Link -/A << -/S /GoTo -/D (forward-traversal-iterators-lib-forward-traversal-iterators) ->> ->> -endobj -29 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 173.113 453.911 184.973 ] -/Subtype /Link -/A << -/S /GoTo -/D (bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators) ->> ->> -endobj -30 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 159.165 474.634 171.025 ] -/Subtype /Link -/A << -/S /GoTo -/D (random-access-traversal-iterators-lib-random-access-traversal-iterators) ->> ->> -endobj -31 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 155.804 145.217 375.367 157.078 ] -/Subtype /Link -/A << -/S /GoTo -/D (interoperable-iterators-lib-interoperable-iterators) ->> ->> -endobj -32 0 obj -<< -/Font << -/F43 33 0 R -/F48 38 0 R -/F8 42 0 R -/F55 46 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -33 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 34 0 R -/FirstChar 67 -/LastChar 119 -/Widths 35 0 R -/BaseFont /ASUCBA+CMR17 -/FontDescriptor 36 0 R ->> -endobj -34 0 obj -<< -/Type /Encoding -/Differences [ 0 /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega /ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /suppress /exclam /quotedblright /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /exclamdown /equal /questiondown /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /quotedblleft /bracketright /circumflex /dotaccent /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /endash /emdash /hungarumlaut /tilde /dieresis /suppress 129 /.notdef 160 /space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi 171 /.notdef 173 /Omega /ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /suppress /dieresis 197 /.notdef ] ->> -endobj -35 0 obj -[ 668 0 0 0 0 0 328 0 0 0 0 693 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 459 0 406 0 406 0 0 0 0 0 0 0 0 511 459 511 0 354 359 354 0 0 668 ] -endobj -36 0 obj -<< -/Ascent 694 -/CapHeight 683 -/Descent -195 -/FontName /ASUCBA+CMR17 -/ItalicAngle 0 -/StemV 53 -/XHeight 431 -/FontBBox [ -33 -250 945 749 ] -/Flags 4 -/CharSet (/C/I/N/a/c/e/n/o/p/r/s/t/w) -/FontFile 37 0 R ->> -endobj -37 0 obj -<< -/Length1 933 -/Length2 2950 -/Length3 532 -/Length 3596 -/Filter /FlateDecode ->> -stream -xÚí•y8”}ÛÇ+Ä=e'E¸¬I3CÆX²f2ö²ïÆÌ…јaf4Y²…"»HQˆìe+T²· DÊÚMdË.ÏÔýÜ÷ÝÓýçûþõïuýs}Îóû;Ïïqž¿ã¸¤ÄÌÌå´q$WE"RåàòpU@×ø\€Ëà RRºdCÅ“ˆ§1TP€«¨Àm_w@ÀªŠHU…“)@—äM'ãÝ=¨€Œîñï"e@Û $ã±"`Œ¡z€^ŒX 0'añ •.hÀ¹ï'(À9’/€8yàðX*à -ºã‰èwCh¢ Pþ#Œóõþ3u$S¦†ÉãÃ"ŽD$Ðèš½@†“ÿ S¿Gù&¯ïå¿éiŒž@ÿ€äåíKÉ€1 ’‰¿J­Á?¼ƒ8¼¯×¯Y4CÀcµ‰î€ýÂSPx?g†§b=7 þˆƒDܯ&sûaªmn©«£}â}þÈ™aðDªÝû¯ªßÅ?þ73¦CÆûö0y Î2Þ?¿é¥GÄ’px"ãB(! ™Œ¡C7ƒAJ@Àq ú1 Cå‰$*ãÀ˜ÉEÀD†|_'B€ê~ý eEŠþ›Ôä/blŠù›T(ö/‚3¼AÁ¿ ÄŸ‘%ý„ -Ôû'< @É?¡¥ü„Jý }i?ðŸ#×Ñ!ùÈ)*r -J0@夠|Råâë,‰x_}P‚Á`Ê*J?¢X_2$RÜqÆ6ÿd75BãJNdé òŒb{xâÝ"©Þ—gó[vÒ7gV§ìùKSV®B1åNwšTîñJû:žg[!NUfƒÔ>ä¥ñu - -^ßÛPΑ™ÉvþÝÔ\O¸ FÙó¯2¦sêX­ˆZ“Ûžûˆ©©}–¾úB{6ÔsÏÍkú hÞ«|?"Ÿú,œ£Ô~r8Iü“ð®“û,’È“{«mk£ªÙA!l¹û®á%¿œò¬»¿—šÖ–IÌ}½óᢠ-Òñÿ™–{Eq5,h_bmÜŠ^™:°P²¸óTŸ)î_AˆdOûEù”ô”µ6S4/Ùªe Þw,QB?ó1 då#²&™üºB(¼)‘Ü t!µ)0”€=Ðݨ,qì1¯NÜœ§t4¼ù]ny‰Éï£˼y¸ޱi¾‘Ñ‚&<Â˽Úw ßÛ+Õ’<ðÔ…ý½g1â‚#R€¬ÛÂåÏi–WûŒ”Ÿ¼}(3PÚhõUXVÝÛ- ç¿Ø¡nm¦‹ïZ2ÙõI¡Ò8Ãæ_¿á(ªXfúM¤ž;O9“§NSËI™ÿHžFa?†:'u{ÒûÙ§0`≡ÊT(O -Fà…”\õ_ÎÜаË*VÒë¡bú d×´tìcjuySHÂÇŠõ‹ -ý$ã—¯ÙeiˆB—5Ù'¢Uî}H….-×Ëyi4ݵP1ãøÂ'-k!{xÅzUh>k2;7'¿]LH|õù²F…™™‡´ðÓ=Ñe€¿‹zVIlU%x¦²D‰éP-3¸ ¡>dó®ï´¶_G>5Ko×[S~§=<½*·¡ÍúIøð‰Àâ‡3ÑO‡Ð^üdž‚*;}¼–šð×3·Ùx¦‰÷tDÂ]Ÿù•êÇG9P&ªÙË‘Vë½1r®|·ºû½/Ë—žyÈïÏíWv|`²I`†q¼¨â(†Î‚>!Ž.©xfAé§lf«ïâ+mÖwˆÆe4NÝôл·¶bcl÷t…¯d >ò‰O’HE+<ÊtÝÆÑ/s•Ëì&®L^­»éÿʳéiiøzÕ|ZlÕ:wE¯”zÏô˜ŽöSŽ¥Ìa­Êúª®Œª¹j.ÉM‹OŸ“¶è§Rv=Âï*ÇkpjL”ðvó5(ê+ñz””cÚGŒÅ‹‰Ñ¶a“FíÞ©i¹Á¡Óå‹A«j©mYÖ¤ôÊf·W¡”VÙêühžuëŶDµÈZ) Q?šé’äuÁΤùešècvAaä«™9‰¤…yÖÐÍ0çT=QY¯ÚÁ%{÷ŒÁH£¨=ªR·D×¥"磌ʃþp¾2Óñ7XñÕ{Fû»9XqØvì…?4<}gGä·Â˜uéº3Š+Áw—˜›a¾þ¢ògE‹^¦ã±-'Ì…™{‚ßÉtÅÂ×§Hy¯¾Ä’”îÄÍ-ª?é$e.òH)1—jÙ& ·ú ög{p¾ÏHª:å{ÒÓÏ| -< IÈ7Ʊ±9íÌ~Epì]¼•Âu4bè‹û cd¥èèGôtGÆ›Šì£Y´·ÖŽ-Ѧ"3þ³cðÒs“¤˜4ÎäÉ&ñ4Qþ HÍDçÇOeˉ7ç˜(6°ùè¨A–ÃVj“ÖJc4nMoÏÆÀhÕ:Ì“ø~åJº¶ôx¤Øu °ê[Û1u‘ó]KxáæFç(õGDç3ÊT5T°«¥Þ>éÏOæB]aË—æ;eF Š7^¡JÔH\ö9¯¡åHjÉÚ OKöu/÷} ¹-.44yîö´»|Õ{ys×ñµ{[íœ3M϶aÒï4²qvBê—Zü¸ãe.ͯ „74˜ÕYÒn”:´öŒª¸¯˜ÎC^Ý2ùƪÔä›íö7ë÷Gæ¡9‹û‘Ì7b±Ë†_’ dçÞÕxÓ)R÷²Ní¸×Õ7o=בȑݱßH½Š»s–Ú–xU˜ã¤-@M½D³ÚªFµJ¿®ö6Ú>,âÆÁ¶,a_°K;>R$Ëš¯î¿â´p­8«øÌ—B~5x/y÷úÅ“q%ýïE¦í6¹õJe©çÊ\Þ=Y¹«½å§éŽÍ#Ò²Ã7U¦ÈÕ³×F¿ @P²i­úC”Ÿ$ë Ý€FD}æg¡Ç/%V½¦bÛ -Ã…mšÛ eûº!’é‡>Wç$BBN7÷É ²ã›8Ž`‘ïã -¬-Ëxiq>Ó¿»Yøìkð6>ÉÔ{ßj%Åß¹rãĺ„ËýÌʃŠÊ"µ°±îClꯕ@oß·ô'¶g¬ŸÿŒÌÍý8á€bbruÈ3?nà1¼‘‘Í/CKy ›Y=0w:3-ñ<ûZS_•ŠsZ `§)j3g¬ñáíÛá™o*­¦ b©i¢šeêÅOóZ@Ÿ>•{Ší5õ°Œî±úMØÐ–Z4¢ižg¥`¶;bp,ÀÚ–."|„•£^ÛØ™“ ÕRÙâI²£x]p ã#¬©Ý<Â¥ëÞ ·Ç^"Ìg•Ö9½o¹/bŠÚEs È#»– -ïÛû…©Æ¼!WÜMcè -kçÝ{éªìÈØ”£S)¿µ6–é' I®×;×ü^rÙ¼Ñ(# "lÀÉ•š¿ÿW|¼¢ÿ\cYKT-“¹{‰Ûùƒã®{ÊÜk`âœH³ÓáÌé<õ‚½»MÕÐÐ…boá´ÔŸ”Õ[¾+W®K,·Í¥ya\*Iל¤{Y›Z{ùjó®‹8ä–í¾ðmûÖ£%ÒÏ¡Á*/Î>ÂW å••L -ö' “[Ç>Mök:®ê7pd›ÓÓ/#FäŠUgÊgdpÒœhбä+ê]á½ü‘\ŽÛñÙœg¹ÇLðÙË^E2EU>,ƼO+÷P8²Õ fl#rNê µá1µõéÞôQóªdîÑ»,é|×3‹%OÑ tÙ©ú~j?6îö§¹ð7K—TEEõ?í6åð|ò” -¢{r›}*/ÖØ}Ô£‹˜ Fìö2Å"Û¶ç[z+ŽÍ’Ù¼¦ lÔL¹áêcHãæLG_^Ö¸!ãr££¥mý¢{ª]œ„wÈQêº× ¼“x5Ó¥äxüµlYȾšŽþ"‘ÞB -Íýí1b¾`áñ²Á"ÏuÙ+›‚ìÒ­RF?ÏŽãˆ[K Í£Ò«]¬‹ÖtW0ȳ_Éè9ÏÕ >4}Ùõy³ùïüêK%­Br¤ÈäÊýã¿Ö,­ Ïkœ¯“¦+êMS¯lÝqŽYúR'Dá±×W³—PeÐæ…ýÈÿø?QK1d*É C>ù7>C÷endstream -endobj -38 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 34 0 R -/FirstChar 40 -/LastChar 122 -/Widths 39 0 R -/BaseFont /RXNCDH+CMBX10 -/FontDescriptor 40 0 R ->> -endobj -39 0 obj -[ 447 447 0 0 319 383 319 575 0 0 575 0 0 0 0 0 0 0 319 0 0 0 0 0 0 869 818 831 882 756 724 0 0 436 0 0 692 0 900 864 786 0 862 639 800 0 869 1189 0 0 0 319 0 319 0 0 0 559 639 511 639 527 351 575 639 319 0 0 319 958 639 575 639 607 474 454 447 639 607 831 607 607 511 ] -endobj -40 0 obj -<< -/Ascent 694 -/CapHeight 686 -/Descent -194 -/FontName /RXNCDH+CMBX10 -/ItalicAngle 0 -/StemV 114 -/XHeight 444 -/FontBBox [ -301 -250 1164 946 ] -/Flags 4 -/CharSet (/parenleft/parenright/comma/hyphen/period/slash/two/colon/A/B/C/D/E/F/I/L/N/O/P/R/S/T/V/W/bracketleft/bracketright/a/b/c/d/e/f/g/h/i/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) -/FontFile 41 0 R ->> -endobj -41 0 obj -<< -/Length1 1533 -/Length2 9126 -/Length3 532 -/Length 10025 -/Filter /FlateDecode ->> -stream -xÚí—UX\Û¶­qw'XáÜÝ!¸»[áNáî Ü îw înÁCp— §ÖÚû¬äìóxïÓýnU=Ì¿1ZkÕǘó«¢&WQg³p2J;9‚˜Ø˜ÙøŠâ:l¬6fVVq$jj W )ÈÆÉQÒä°ññ±¤fà ð‡Ÿ‹“Ÿ•‰ áäìíjce ÐIÐÿ5‰ ætµ17u(š‚¬` sS{€º“¹ äÍ ³·¨ýµÂ  tºz-˜‘ØØ6æ €ÐÊÆ‰å¯L²Ž–Nž•-Üÿ{Èèê û;&=ÒÂÉÑÞ`´DbQr»ÁYþoÄúOqiw{{%S‡¿äÿîÔÿ7u°±÷þ÷ 'gwРèdtuüÏ©ÚÀ…w²ÿ_6² S{s1G+{ €õ_%7i/ …Š ÈÜ`ijïü»t´øÏàÆý€EMGIBRæí¿÷ôïASG†·ó?²Íþ›Ù~3¸;®6^}Vp{ÙÀÁïÿ¾2ü3)Gs' G+;7ÀÔÕÕÔ |zÀÄðeØ8Z½@/pbfG'x Ü€¥“+Ò_ÊÉ -`q6u:Ú-A ý«Êöïê¿¶ïŸ2'€ÅÜÉÁÁôw… Àbííl tü]â¯ﲓÅï€ÅÍÞÔÍúŸ -Øäéô›yÿR¶wú-à VûM`QñßÖ“øM൒¿‰À"õñ€}¤€Eö75~XEé7U”ÿ!^°ŠÊoboìokªÿ&p‡4~ØAë7SkÿC|à›¹ššÛAÿ£õ|ÿÔÿgóÁwËïÆóãšý&p\óˆœ×â[ÿ@p~Ë?lhõ‚¿õÞ›?lkÿ‚}~#øŒ³8þ`_§?ìëü‚}]þ@°¯ëöuûÁýà^¸ÿàT 8•çod§òúÁ©¼ÿ@p*Ÿ¿ñßÄââN^¾Làþ1±ƒO,8'€“ÛÿÎÔt´qqÊJ‚5++ø4þU5wwß> ¿œà'ij¥ øyzÍ‘–œÌÂlÓ#J¤>O•Á2@Š[5Å+ÕwÏv ‡.%@Ú‘waبÓy,ÏÄFÛ‡Ý'ó|"r‹j÷S—> v‰OŸÙ÷0ÙÏôi!Ò¹ÌTôÞs¦¸ =Bokœ»>æ‚TžÙ-MÖ-øt>x”¯B'©q¿FÑ£ïÑГÆÍ£#i¯^GÃA®†‘îRúž3rÝ#9f}24À6¡ùíê…S»;Öãg„¼¤cˆs¸èh·7ïAȨ+'D"!þ-› wû|±„!ì@G»*`‹Î@ªW¢küÁ´J,±àÞLôDŒcï¾ë€\F6ûtèÉJ¥ÿñãè -•tølÍÏJºU 9Üœ¹ÝYµ7×ÂJgCF"é¬GFN4–z|1L—tp “¹#ZZ|H¸¡~rÇ<¢Kn“gÌTÑ’#ØÒIÅ!ºŠS6o»ÈðúÇ¿$ö£I>wÞÁ``´«kë_Ò²ܹxsVºèõ r{7… ‹Jï "-¡MßjÑÔ*qL®8Ö…öK>š!šêw»½Àv<ÈcÞ ÚÍ…>Gð=ü˜¢Ò—æ]0Ò|+9¥Çp÷Hí»`“\ú©%l[iZ*ÛWLYþ5<6é‰kÜ.=¯2\ub—Ì4Q±ÏVZ#¿VãñL3ë =Ñ€Ð~Y U×#g»¶¬Áûîñ³šweƒõªNšyÚ®›“ïVº‰¢½H¿¦ØìLÍ+~|ü~u²mæíiÛŠËI*¾ÏíìÒéô½F\¶0 óÁ8jãÕ_8Ó˜¡î–Q<@ À‚´"ÞÖèü¡Žœ³øQ‹<[ç]÷ Z„9Ö²ùw¬MÔ¥ŒÒ%D§ †ìÏ’ -ôÊ]åÚ›ÃSÄÒW­,BÄ8Ǭ£÷ÂÚôÝ ¹ K ØI W:Ú_½rg·ëȃřLµ¯êÉ?n¦ ™DÇ~u'UÏîy»å!"ül!«žáî”à]…°Š÷¡;2Ê܈, #qØÝ -5ÇÇë%COa†³¬ñE¼íWnÕ‚—Ð3M »š4Ó2J®Y)Îú±Ep3PIJéiÏ"vO·’Ôĉ ¼|ÀYJ!Qdbª—a$ÿ ‹N¹Pœ§UëzDå1^_»Vè“‘Z-D*GžM­ÛQí¤ µdÖGº\dPœnÒSõåÒ G?+I5ýøq>ëwÈ#‹õdbàb5Æ­Ž,f$€°á%Ÿ‰§k˜<6¿‡Lædêaëá}éƒÕ]LvÙϬL5?ÝLq]S®R[s‡µ:GV0Ñ,µ½-ŒT±ƒŽg1µÊù¶é;&R®éDº}U6úºM{Ð~^Ì†Ô Dá×EލL“ÙgÌf¢)z•bõ«~“sd5ú†XÄmj«õa«.Q¤ì““£Óå‚)ª;¦òîæËÑ È™ïóVô¨’¤7Uƒ˜Åꈥe¤íãû0Ÿ“^HRÉ¡»‘;?ªÁ¯¹UeÔ/ ®Ó-]×lý£ Ÿ¯ÏÊûéúGÏiñ6´¯Ö^(.î½uòœë(’ì\,0zÉ·|·¹ñ"@ÈJèæ!y&ÛwAý6òF\C§A™€K˜“gY1c¢&ßR»Ó‡ª¦¸oƒ ýÙ³$£YS÷6Ò\pÅK.(Á¥/X¡Ï|!,Á×Âwä0O±ê Ð>Ô)åû% +ì9î<<ø6È)ŸíäKÄ•û]¨±©ª ±`8Ùß(à*ê‰òàèÞÒaßÄ%ÝA÷kTBÞa±x¿¹é—4­¡?Õ¦‹8ÓõÀùŽìÛ¡×Á]†4åIŠíœëݵ;ËÃÖ‡„b»°exÉ"£¨àdq÷T¿¿úmmƒ-剦Ó÷óK[Ô P+·íu‚ær•¡Ðú‘yiµïgN»”T?ã]•d¬8× ¨Yû§¦Êð5hôã=lv¨ß04) -AGhq†s§©æ×ºÃ²îà9Þ0‹ÙUÝ£’,¥Iúr¤‘r'5#!ÃŽ9$B£ @è¯wf+ž—ÌŽó‰I•·#'UG‰û2'4R¼š´ìÁò‘ûà¿¢OÝ_›¾QMŸ -N7•)W -ø€=`Ê\ú:6ÊÖ+ôiÕïˆHX£AŸK ijãÈÛÓxìe9n ÓƒY?_ºZž¨Ì×—˜rȘ«Ä΂{kuÏ“fú¡êÐÇb_hè˜ó0vó2ò™1-np' W¼ªv€M7¸6ÞMtÀ±w~NíÙÕQ3C8©¤‹adF)›„EâÁ‰ËG^ÏnAp0é»8ÊüÐàƒ*ù$bÞ¨«TP[ ´á’I¥0â¬LÒ‰Yêîz¬ÀaôÃÁ}Ô˜¦¬„U•<"4òœ3Mh‚luèdi !a]â”6G]“4µ1Ç+å~´Év‰;æ)‚ýbl¹{iÄKbA–»ò€Ïªp~õp:•Úùx<~?²¸ºœFÇšþ¹žƒŽù©W%Eëº5Ü=RãEÚõ¬"Û—䌚œÙïäßyw£!}…v÷jI'r œ‰SVp›¯çîÚÌû7^ -ö6²üs§ˆ:9´2pv¶coŒ{¦¤yzA÷MÄwìxP·ðùú@D¥ ÖLÅeç y -ÒÓ¯D”o#±öö ³rš.‘K"ýxµæ–QÃ2â#*>É·# -çýŒ%"j§(1zLcý5àê $Üdm¡ê×ÂN¹Ê7êGÎCp“ñV¦G ¡ËÓÖs_,Éø,…q(ª ‹ -9ÄÏ­¶¿@ƒG«¹‚/õʬ3¹™Àá´»mP[Ò_èÌŸS Q5:&•—¢p“ „4µ«Ø=8àçýªÈ ¢Ó”À‰Þ­\êþzÉ1”IÏ»Þ3TweäoqÀsòÃu!Õ^8°Ï¡?Þ†2ƉŒIŸ²‡o¥ƒÉlF ‹(ª4·AeœX´×,Aýú ŒÞX9È9½µ©êgˆ ö·ðž–‘°ïžÌ›‚‘³VB﫫̲¦ Eô.7t–å5ÿ;²X€®våvF58½ I$ž¶é–"yL„K%ÕØk_<èÏÚ¨õ¡1.Ôùn™K À¥ w"&i:‹a[O²†­©­„Ë5ír]P‹üýK¶*íN±øi4Ÿ]ž“^a‡¡T«…ß[A¬ œ×nös„h©LšÖšÆx"í¢ -€îèŽh l`Ú„ñ_^[&*™x–W•ÿµÐ[hZí0iD]•Žo«Pȹ¡d'kå;JŬ^±,%]HM«Þ.‰õw?ò‹FÈûßßêe£Ëç|Ã8­ô·‘^êV¿ g5Ã+_ûµWð -ÝžÜXÃ>ËÒ(õè'ôÅSºmÉnk.P0Ä:+'7¢%x$«—ڀܡò|ÝyÅ£s^;· `½ñ{Åÿ’C¨Î&Y_úâeÀC-@——Ùðša©æ{ŽŒòl×Ù"kÓ¨Cõh¥RËMXuø`îµÐgZÇ–1™šXH€›¿2Û¶9Ž´¿s¿•oèwÎuWˬZÊ­w݈~‹ʱÏû+®¥îÉÜ?­äm $y²:æôól%Š‘¦Ä%,› ¬ï#½*Õé{—`q[4Ô%‰:’ÊÀ"rðbßcf‡{¦®?`’L„’Y—<ìÄ¢%= ©Lí^­ûb>#®á§H"¸OÔ«ç/[·SFœHâžs¡-ÞK!Aj:¯ši2o,ÊÂbŤö¼)=Âæà®iõd¶¥úÂß®ˆJ·Nê‹|-½Ýòñ`Q¥<Úq‡9Ä÷Sj·ìØ]kÌPLjm…‚qñ!ÜÙ¤¢«Ä)¬M¡h+‘¼Á|jJ†8îH@‰(óž`b®çãšýÞ¼i!B¹WIÏë¶4Lã»qch¢>-÷þ>óÑ\ùÓfgÀëk—WŸ¹U'ÓCôÚ°ËÍjŽMQ{iAB­¡ÑLÿîdvò -È¡ï•зGŸ Vbî¢=Ëþ -!¿PÓ*í¡ê¤çaDá'ukÝ–$r|æžJðº”òåF˜f™rî€ÜšÂý“å3ô³žÔØ/Ô‘A=X…äKd·ñPÔx=2SÓEÆôš¼™Ãq²|öY¿·$Nck™‚„Û bW}O¯'gúìýÏ9„SÖ -jïqY7'p×s¢ -Ì£.ØSª–ÁGìܨý*w  [*Xà…¬ö„ˆ&±!›R+"9F°È–¥l¥fdl›äì¶ –C², !aµâO|µ¬©N|T¡kQ=åæ*ÜêÅßZ[ûqi(­/¿N¥ˆ ƒy$½™)*6Æíá-ÁïV…L±EH4O‚ï|µk<ìöæ­Á TÝ4÷xX­nÜJêý¬€îî]7s,Ù]|ÁbX@ŠJˆCwßað2ºì•ÆG×w÷}Ÿs<) Ö|Û´J‹Îó–ä8†Û -µDÝ·‹NóbÒzŒ%•ͱü+Ÿä(óVøNHx×÷Ù[¡Ò«0–<„¿Ê#·7Dô!¹j~ìk'—–‹Š•J3F.õÎõÇx×¥¡Ío½1%³§ Z>SpØ4^ç`º¹Ð% ÿAZ¾€ÉÖ -ð†™ÐdC Å3º”);‚ÌdÄo"’N[am¶;nZ1r:ýCŠ»¯.ª<»¨­`ñ}à‰vè¬æ=Ž&]xYçÌ/”MïHñ6Ó÷¾É—õx7 äÛ1Ai½é• å¦šg(^Kß•×cíÿÉ«M™Z4_ûf]•¶/R™>_ÏèæWÇ‘Ê"$ÑÏAìðOež"ŸެÜçÕw"’ë—]RkÇû?cIñ4ÕáÛyBÀ¹ÌöM{µB7…”Ÿ—9ï¯|N«Óv¹Û<- èRFù8:˶@‰=V':ô‚ ÊÖµ¹ÆºùŒ*‡ÚÁ2œíivûrðé=që)Ⱦf¯+#ÊëÑ·;Sn3÷1`­"Þu Øäf¿öá%ÖîvvHDiðXm|ÿJ;Kw;²LY.¶ÿs…A”è³–f޽âzeuBz³¶Ûa÷–²#-L•ˆ|¶ËØ}jp?|†>DÆ‹$±¸½‡ì.ݲá<9#M6=Œ~á/D*MÄÝ ¢žÒ/®‹У¯ËRéòO­}SÖù•«Ã!žWÞ@g7¨ºJ,ù"1µè ±~Ýåy wÒW!»/[%/åÙqðœvF10 þ/ÝoXQntHwú;>ÑímúŽó/cQŒøMr¼ÖÜ™kƒÞPY\vE)«ZÓîÝ}†[§syPÏtO%íëÑ5¥¶]#•´()"+ìp­yÄ ú3L~rw¤Èwl#>°åÆ4» Ü cÁ3ßO÷ê.<¢–Ò­+µQ½^:xbžü>s•ƇOñA…ŽÐÎ5ÃH„ZMŸ^›à:* *M|ì«{nVTîž´\ LkU63\0™.ó퉣@’вƒ?ðá£\–1‚ù}erO$²6T „t¤TqMm6¿ö¦V™‰œö/ylÛ7xŽrÝñ×ÔÆTtNè†0*nÛGÙÈb·Äø"=ÝÈ£?|ϸRŽmøJ±CÈ©>_HQŒŸÌ«BÊtÓ_Ÿ ÜY;SIq¥åçw 0§õy°èÙ®‹BóŒU+6™Ø1A±©¶Ê\'ªöŠ[Ùè|F3õ Ä -}“QaÊ_ZöCãýâØ*s8J‘å3NÅÓ…ú$?ïçuB«í1Fbõ¢{sñ—‡i¤w¨ó4× 5#J¼k¿-ˆ½Ž:•{-L;ŸeÝvÕÈ, ¢[ùÍ‹ë‡vl#Ûz¹ÞØCp´¥ö³ˆyWÄãć³˜¥\ mÅ‚é¤r¼Ã=hÑ9ôaP¯¡ÎÑÆE¢œ["(éW{íD-‰²¥Cœåâ&±’WµßÇÍHçþˆ§¦}KnÊKXòuº½ïº?Eiä‹|о?»‹r°Ãºu èèØoÿát^˜PÎJ–´wú)£iRN0„ªÍއõ8ÿ'öî|[ö›…"é £Üá&MlÌwU¾È·Õ©—‘Â"Ü[òÊ5ctùíq”¿²f$RŸÉŠ_˜VÝmbwñØnå*¼‚.­<Ãáa•¡»¸âLká3ÐäËÔäkóSmÆ{|y~­#µ êø@Ï1å~ì;¯—œý#X]Îþ³œ&ø‡ö\•£/%Û­ßTÆüSª÷$+°!³k¡;bÑ$)>,Ý+Èùq‘TÚ?Ž!>q ‹'ÃqMM¥þØK)…eŽ/Úšo¡Ž¹™×Hƒz5&Š:îf[AZ}-þâ¨6›ÑôµÆ‹(+ÏG½V´ñ‡4âzê¥.PþÀwtH£k{“‰„z¡êŠÔqx¤Õ›)5—Œ&p‘}ƒ‘k»Ç§ZôvC¼ÐuÄ?1«ù´xí -=wbàœëIÜÎÖ kÊø¡cvÅERDÉ3*;‡ú4«5dÎUrÂñ†6çëÍðì¹¼ˆ”¾Ø³ËÕ…/£HÁG17iàL®)4z™èësÖW¢«n¸"4úµDÝë¡ëÇ‚Ãðˆ¯ÒŸï °Ì6›1èeÓz±ïZÊ©—Éí7­=‡…íËdT稗ú1ì—õæœvÈP¦M"ìLŒ4âyf%qÑ‚\#VoYïç½ÉMžÛ43=¹DÜ5Ÿd#Ì×Å"®â8ǽíÊ<¢8¿3}säÔ<¨¬~ñ±5^Ò-xøî´¤siH·óª¥<­™åÐÔ™uäqÓ]ƒWð&« o®ÀÖTY9!¯y²ˆ†’ERŸj˜ìuE-†ðy­R ôûÛé&îq½a@ÒT줴–záOÁXÿ–±¸òâ3Êì^^ž2`ôÝ#µ‰õ‚ý%qQnZÿš [x‚ Ë/U ç“}E<6<<{>JÅu)ÒbŒ=D¶KŽý†FëaÕ \›E)òýóWÃÍ -UÉ–Ÿ÷s>wõfµkïPÙPŠú’$é¸q&rŽí}"ŠQòÝ\=LÚLj¤&ѳýÙ KßBŠ:rÅú«—¾Tðî$¥–›.j6¿ OÂljú˜Ã‰È&»Å·mKß= IV+…_PPà¢Q±ŸzxGly>,{Ñ•ÿ––{ŸóvácTÑ/™ïWâœ~_¿- ç’“Ñ®¸é=½*ä³êº7´Ë¿Ûà œ@œfgSÜ5waÂPœ#2á–w•ŒKs©Í÷DOQöhõSz¢ñ£1’¤øÒä\¢uhùÝœÁ¢X¬À69Nì°|Ð|à¾WÛXÒU À!4J’ø’RcŒH -å» £õQlÇ"άÇo•êE;“hQ24!òÖ@ì,M¸Iº0s6"SY¸[6›flª"6Ú«ÊÏŸø\:že¡œL>m–³!<°¶¥ã…‹þn±ÛÙ´Õ°£%2™¨}P Uuˆ -«à_:õ6‡½~¹2»ØÊÇñÄ"3¡8Ò-I­}cÝC²m#y^Í âé‹1ä,¼?®XLÞÁ{5–;NŠ<|Oç¬ð&…‰u—ÑÖ´5båE±õ ~ÍÍOŠ;aìXIõ7ÈŠ‹/«³©ÉEЍ¬î·þ±ãU:JªŸ»¬ŠÆ“a -¡y‰cÞ½ -sE´Âò¿µo47Þ{Ìô…Jº¨$žXäb“–°A63R!þQM„—5ÿ]yB­s"›×QmìfÄÝ6â¬%áÑ•`\Õåïe3>Åzkt¹Ãµ9B¬ú¦öõ_D&rg%µ?õq¡Pͨ´q#ÈLƒ˜«¯züœÐ×:§?®ç¾jg Óî!S|˜/m+A1«7µÀ>·è'lmõ6WÙú²ÕÌ‚r[Kì¿ÁᦊvQŸƒ(ìû&bÝõ&T]!?iÕѪlÆW~}§À?'(qU@Çz®)w²…boe*žx$Áh þuíÇ _V÷³@jVm5ð"d`K­¡Ô·$SÈÂŽf¡ˆõÆtr’ÿgq—«Ç2-ly:‘¸»¤?Ëm”çxu¯Á±;´) ! HèÅ5ÀûÆ$Î2“„{ÝŸúJ;©ôt$|ð«µYc},DPdßÛŒ' n¿”öÿ@ŽfãÁì¾+ôxYœèyÀW„Lvùtr[ Bt¤šØfÀ«<Ñr„§"›‡%Ì¥µ’qúZdö¼@×·@os¥¡j{õÕÒ´/0߈3 ±:§¶’3ð½éÑ“5A\7´™ò¶`(ÄDFŒ2N»:b|>I/3w=?=’ ¤„k1Ä’‡ý ¿KÉ~ñÉxã žÚ©»úiàˆn¦+ÑŠa£›î9¿Tk™„ج=:Ö âª‰Ÿõÿð…ôÿþŸ0·šº‚œL]íþ çendstream -endobj -42 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 34 0 R -/FirstChar 12 -/LastChar 122 -/Widths 43 0 R -/BaseFont /RLNIHK+CMR10 -/FontDescriptor 44 0 R ->> -endobj -43 0 obj -[ 556 556 833 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500 0 0 0 0 278 389 389 0 778 278 333 278 500 500 500 500 500 500 500 500 500 500 500 278 278 0 778 0 0 778 750 708 722 764 681 653 785 750 361 514 0 625 917 750 778 681 0 736 556 722 750 750 1028 0 0 611 278 500 278 0 0 0 500 556 444 556 444 306 500 556 278 306 528 278 833 556 500 556 528 392 394 389 556 528 722 528 528 444 ] -endobj -44 0 obj -<< -/Ascent 694 -/CapHeight 683 -/Descent -194 -/FontName /RLNIHK+CMR10 -/ItalicAngle 0 -/StemV 69 -/XHeight 431 -/FontBBox [ -251 -250 1009 969 ] -/Flags 4 -/CharSet (/fi/fl/ffi/quotedblright/quoteright/parenleft/parenright/plus/comma/hyphen/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/equal/at/A/B/C/D/E/F/G/H/I/J/L/M/N/O/P/R/S/T/U/V/W/Z/bracketleft/quotedblleft/bracketright/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z) -/FontFile 45 0 R ->> -endobj -45 0 obj -<< -/Length1 1992 -/Length2 14226 -/Length3 532 -/Length 15322 -/Filter /FlateDecode ->> -stream -xÚí·eTÞ¶ö‹Cq—b¡¸»)^¼¸;ww/îîîîÒâîî)îîúæ¿Ï9»Ýçýxï§;n’‘‘ß\s­çYsIr9EzA# ˜µ#=3óg€°Œ3€™‰Ižœ\بïhfc-¢ïü `ææfˆ @@¯ÏìlŸÙYàÉÂ6¶nöf&¦Ž*aê’8‚V@{3C}k€Œ¾£)Ð -4†¡¾%@ÑÆÐ èèÆ´´(üÓàtÚ;à™™Ff†Ž ‰™5<ã?–$¬mœÿ6r²ýŸ&g ½È€ê_6© “F6Ö–n# 1<£¬ H òòÿ†­ÿ=¸˜“¥¥¬¾Õ?ÃÿS¨ÿ«YßÊÌÒí¿l¬lö# ½õÿNUþ—7 ‘™“Õÿn•pÔ·43´6±˜þ+dæ fæ -4’3s44ë[:ÿZýo ÊýË£‚´¬„¸í­é¿Úäôͬ•Ülÿ=ê?Éÿbæ? ªŽ½™+@“ T^fP"èù?Ÿ´ÿ—–¨µ¡‘™µ €… oo¯ïÚ= bx0̬€® +È0#ƒµ#¨ T/€±=ü? ÊÌ`46û'ö_È -BË?È¿šYAlçdã42°ü¯•ýw ÷·üg˜ Àh«o´¶ÿeþïèÿJ‰ÛZ:9ü €ä m¬¬ôÿDØŒ¦n¶¦@ë?!P/¬ÑŸ'€ÑÁRßÁôO„ Àè´·ùùµ±þ›ÙAF]þ´³ƒ,:šÚÿÊø§R6NöÿÔÊÌù¯ ]вý›Af€Îy-#ð?æÌ²jmö·®ælióW'2ûÏ(È ÐÎIÿÏbq€äõÿŒÌRüC e¡?RþC I‘?’ý7q‚ê"ö‡@¢_ÿ¨"âT‰?2#ù‡@êÒ¤.ó‡@겤þíßÄR—ûC =…?ÒSüC =¥?š»ò©«ü!ºê¿‰¤ ñ‡@ó3°×7´:þdžݺÿÞ÷ÿÙÀúïÿ¹—AwãŸmË š£ÁÍÑðÏcY0ú ÿYØ¿ðŸm÷‚MþBдMÿBмÿ:ÌL ‰›ÿ… O!ÈÔ_G äÊê‚î+Fë¿äÊæ/¹²ý A®ìþB+û¿ðŸsð‚\9þ… WN!È•ó_råòY@®\ÿB+·¿äÊý_øßÇBB6®ô, s zcú§êÜnn¯ÿÌT¶6³sJˆ€î&&NÐêþ5t²ÝUŽÿú]öÿÃÆf ¯ Ðh¿¼`cÈhžÜTê-š?UM.dÒ#[ß5ÛŽ° nY4"eG³^§öTž†¼½Gìò‚ïÖæ)?.vîg“2ÿ¶ç¬·—æÞНv•&ã¶kûé>àågÓÜÍ ;ø·™õÑÒõ‚þÌ‹ã\9*¥}Ø_$`ݚΠÝéœjbi–ÊÁßë(XIPSìJCØ‚×\Pâ Ö&¼ÍƒáZhW/mڜПòárâß´î±¢Ñ ÛˆY¶h0ö¿œ”£¢Ô¾÷ U ¤Lí{Ð+p -#YAÕ™îEu§/p&DCdœÏéZÛÔH^É9´×‹vtYiuM $— -™.âòm*")áÜߎIÜymRñ>d›¾çž(ñ޹‘*ZÔÐ$H­æ¤8ýiéS˜îÌÈ7ʽá?Ù~Ix÷pHÓô*r€7ÛF}2¢~ñþf€€Ò7À+w˜…“ÕH$-Õ§€cÏH%pù[(Ê¡zSKCn6BMæeFF ³“} ÍÊp]@¡¸R±I0ÏÛoÇ/Á5p‚Ý_ëKnW"|ð§²çˆâr\ƒᨎ6ëÆ´#cä!¡“Z´Ë-–NK8‹/|ªÞl:¡~­^¤œäƒ·T™¢¡¤p&íú]Â`JÈoh:A±ä1½æ7:ip5î'Ó”w“Âä|L}yÀÍ´kY½I”ûq”qÙêÙ98–$5þµÉèuHZ¤¾¬Šé /ã@µ¿ýØë…R# .Š¸Ù†uv¶1nrýÂs¾´Ü® DaT´‚T¡¨}‡7[dÌ °2Ôbê²8¦t°¥Þý¡ÆÔz&@ÖËb>sýíkãWî†òJãÔûiœ#iÉN«2°ÔõWö$-C#7ÿð+³“!wZ‚ˆJKצ]ýØäÚÁ–E§; üCõé;v1~;“,Ÿo¢6.R4o×K<Œá©o(?Dê'±Š0¾å掻òñ7KNìœÒÍ¥EŒ·–ïƒ,*av7 Øf`_ü‡ç–bvàqz«*F='À˜3a\ʬš7Éäc¢“Ì\Ú#"a_Ûo¦ÔDd½¼b]#R=; EcLð¤<òÇn”^ŠÒü3ó,D¿#grjuÛZ¶7QMê‘gÖèZk¬˜?s -+BÏÑ4aÆY¼Šl N‹@Ÿ¾#`J¤ÏÐ;¸)¼½1“ôÌ™ç ¢šâ—&#}¸<ú–«b‘´E$)š'¹rbxG=à<›""‘û˜Ò‹[òÆ15Œ[DŽÂÓùƒ˜ßø]ÑœEøËC;µébÆåç©ÍñyŞ·óO"Ü’³Ü÷†·Å‚y©Y-HÆjpHm5nCk\9 !•ÐÞ8ʵeý8caBaBF5ûЕÂ}Žs"÷©¢öTQŽýÄd?õ r¸Êý<¿¶8Äêã»Ä…“Ky( º´9NÁ—®<ëã9QJ[ÁHÍ | uéšÐ<Œ¨ù« ó„om¦`]xóµïñù¨ŒxÉI'ȯÝåv3ª—3§W‘¼+E¥1ÄdîÞµçH¹ÝÜw«Äl•QºÀ¹­p8ä`ë^­)¨4èÞ¬‹“€ydÃ~¼–§Ü_ê3ˆ¡ß£™gÖ¯=Z[X¿É¡ ³2þÞ~‰ ’;rÃ.¦x$«^úÆ(„õì¦ÛG8ù ÓºMHMôµLª¥KËÅlƒùð#Ê(Ïէž9ßãîcn=êñ=¬Ê|“Jû©ReîÙ4®#ÄüI4Ò{ظIfͲü𶦑x9òk^ޤ•…œÊÛÀAüQBê]Ò#)¿÷ ¬k€À§Ÿ9¥âüG]^jh&4HÆx±ŽþÛ?8éçvu] ?ï}¿&þye"/xý,¢:F“P{_W3©„ð3$¸iÝNgUð¸uJERÌþ–Û#‘ú#ÁÉ®u_ÆhèTuK n37ûþ®«a²ÚóJ½¼ÛV©¤xÖoJ屨LIÑ1Ò°>CfÈî‚Ã&×´ë §0É€C þZóþü›.÷ó¤[ÕMcÖ;?Rí;¬&¡rº!³‰F@~ŒJ—ËÑÞÕýôÚ)BS ä7xóz&RJpKuHõ RßFÙ;!ð×\‰~ü<‘-m.á›wè^ñT® üe¢¨[ªWtT=Ýâïâ|´ -úâÛ#Å¢”­WbÝë$ûG 1MË0ã¸,}íYïÛŸóªà,É(ÚHBƒ ã[3‚ÙS±Ž›­ì ÊŒÝ×%”¦jûR>õˆEÔ½å©D‘®ö€6åbw’ §ÁE†nïSQÕ¹j} §à¼6-å/Íö•3bï -QLJÊ¢éÛ\Ø© G?Ç“8ê†k5ÆÊN¨ç€¼N0Žºh>}¤_& hºáŒy ,ÿYÀ×BÔµrJª·‚UwmáÁð14KwÓˆ¼áUòxßÊœuÕF#NÔYÊ“×îc!ð<ó3½T}ß -eèyöûãJÕÜüî£[˜ ó^ „ÿTÛØã¦âÇ—#ЇØlΫ/¬ªŸ†û1‰žãÄk¨žtüBÈ×.ñÊ+«Ïy‹n[q©HÈYÇi=ý °(Zø]rqþj7RÃÖ_#9ĉÙj£ Ó5¼ö›íhrõ,9ƒMÈÜ«xQÊ$:J’/‘ûøèùÀÊw`…Yê‹›6ÕvGÞâe0£‰FÍèuiU¿ Ò ˆåÒ@Ë2 `Þ•lr² ?•¤, =§=Ín%ÇuÊËçô±CÇÙ½Û6ù×§©Dˆ£†Ný®KkOAŒë#æ~3WÿIµnÚÔß øM!ZøJžÓT½›aÎg®o©¯•ä3Û´ˆþEÐÝdÝ–ÈWɺœÝ!‹9Q£ÆÑ·ßä—´õ¢ Qª¡C"ž‰Máóó.j²³8¾†Tt‡ïvu‘~Y$¬öùG;/3â‘á%{'ê9bÓ«§tíœqàAi,u¸ë̸0¡gruQ34*>¦Ž;‘áJPŽÛ• |þóÕ·´’q0ùpÏ{â†W;öF›þt‹$$u0¯ué -FÜ‘ -»¹½¡†~€‹ÓzÂÇ)˜Rñ>ÛׯPxWÀ›øÇ"ýài½Qœúùfè­ò3­óÜ­…E!¦a:#l,–uH±~%\¢æïnh¶“6(Zú/쨕˜·ëÂŒÿ˜âòÀœ«µÝýq 7;w÷K@K“OÄ:+ÇÆ%šTŽ]à`n~~·És¦xìAY´–sb¦‹8¾Nj)¦Åfí´š¤(Jmå}Îò³‚}Àh)ÁEBÂ|4Òš1JûdWòÇo‰hî#¶(¨Âr¨¨ö5Ë¿Rf†ö«™í\ùÇIM*êéâÀºÍÏ£ß8:Æ<{p‘X‚.Y|éXx'Êlý)F kH¢oDNJË „2Ûç¤~:ÜY/siNt þÀ´( hx}I37ZÒ; sŸKñ!㉫<çóªÆ™Š ™–e`މUü:6ú)ý¾R6™?an±?êÚ\„ʺ¤—°6£<7;P¬ê½r·ÉSîÑw¼Åù£µâÀo&ºC—.’^-³µˆ8¢ñR‘ÏÁ÷En_ºÇ[–uê3ÕyàÕœ*g^1§(Šø¦½:½‡ä—”•ÃjµµÙe z…gC…š<‘ñÈ Jßt ® Rÿ¨Ad‚Fñx"iä!E*!…1XÜîj¥<†S^ [w«¦9bì8°±hÈ ½»ž„ÖÏÒ5ÍrœNù+Èž5âM¼u%íl›öã36IE¯_™Žc‚—vôÈ`²Å2ñ1 ý>X›  šo~„JÎå™é?ܶ•cPÛMü ¶³³¤}YTé54ù¹>Rá»uGêÎþ€”§z…hÎÃãÒ퀩øÐÌ ·ˆø«­¦—#oÆ­ÊtTîr9. -5åïŒS× Žmî£íû¹‰Ût´X1°K«éÅÈ›¦ë|ãã}i‘å{.ÖÆ ä’@iŸ€FjE+=ñ˜ë&OÓecMúÅë]CŒ¥¬†…§>ŠSX AÌ;ΤJ  Â¿1 -á‰ê>}|1mc œ”mñoóà -wFÒõIq.W–¸3‡qìÙ.ÕOs•loCVÿ‰rÕb‡–OÃ,ÆqµÛp•-Ånè†åïå<Äèˆ3wjD«0&ü¸…¼4N€!9÷‹Ê¤¢ežÍø:VB‹H–Å—eòc¶Ù7\²O܉ b›x8f¦¢è‡RDg¾i6šh€Ü|n·²§Ùg×]úóÙs…¼JŠÁÎsñŠœ>Õo¨4Üõ¿“kÓÑ ¨zÅ\ÐUkì'Æ8ƒð‘3&®©ñ[df±t$ Ÿ˜¦óÏx(ý'9…åõ›Ë*¨UzÜU -C6O<ºOµÀØJIYvá/úÏ‚,àYwÂR*!bV££…ÄNîê`Èl‰’Õ£îwEáòÁ§©óÚ› :;b ‚ X^£è)°½” ÷÷ z‰‚ p'gÛÅ„ìè}æ T`]’3þÚO5|2bØ3ÅÌoq«®?ïÿÆßÚ<§çòT"iÝø« -–ÝÿGt,ùsæ²"Üw„ÂÃl÷5A‚Ìɋ׸EKñï÷$NÛÅ §)Š(ò'·‘N–k6¥¨¸=ž¸üαÒR]ÈŠ’ÙKô×r±W>S˜ªJ¾ƒ¥ð}…åæå®âOE*g”°‰­òPss½xÞ ͯäÇ>'-­œ¹=€´Â!1Qù¥áQ£~ÂÚášœ[2(¼è‘ -¼æ£Í¸ÓQ¯…› ½Bø­¯Öa\3ãX­Nùr+ì6âxo4#*¥àcyIÒgcQCd¥‘¬]žS¾†±†8ðó6À?ó4€—±Xã0ºFФܾPøÅïEHÑ\!„0‘—ë[²£}‘ /ìÃ÷ˆ'ÚJdJŒ™Yojºö¾Õ/é©D¶Ap{”Ú…Žóâ5*4î -€°«¦†ŸÃŒÑb²Õ6,Gï3ŸÚ… jJäòycÛCu Zr+½àBç1Õ¶Ú¼TÜF¿þ¸§˜Pé&W²ˆf!t/ÇÓ<ƼŸåÆQáûDZœ’èÉî5\Íýa¸Ò¥¥@’7—æÒ«RÏ C£Åø¹ -ìª(â·ð[È÷‘<íöîS>äôÔi()÷ÌŸœ¿ö è)ˆA%G‹a³>>$… ‡\Oû€q/>ßèxïèË,Õp{dí½»jn¾ÌÛú`\ÌðnùŠ=d|ÛÏ’R NÍ,®ôÞKpXóåñºÚ‡äx‰Ýõ ÒÊôšDÈ’YyÙ¿&¢>®¾0d’BåkÊEÀ¨ð¸FÓ '?«ÐQRìç>üšš‘Þæ5þi*1eQ?pgƒhn`ß“ ÉŸöƒˆ™gÕþLíRiR ù– 3ÃýbT„ÒEà@²Ðœ˜Ú/Ö -Þ””A$Ü@±2éÆ{:SÅÀw&¸«:yð€Büæí}è£^Þ‚æùñŽÚ%ŽrT¢OÊ.ÄË% -§n‡÷>Ü_©·±ˆìì [?À½g ¿’'šJºãcN &öù¡×zÄ»_¥Ù?µ`ws¯ž"3["¹ÏR[¹ù^¬™Ù×9 ¶­`•K$bzÛdã0¼´¦}žp¢«ºÔêŽãÙ½ðßòjûjM=ÂP³Óòl›® ¾¦]d‹QœŠñyQ©s‰Î(C§ú¡ôw<ÉÖ"ÁŠ„ßö;ö¢„fµÉËmb‡¥ÁWj¾·NS·©5t>KêâyȘ-:/õ’[ì@ u+*UyÄÈŒ ÕyƦ| -|´àùi—!ÝY¸Ê`RcW}€£î ˆ] …?â1åUdÞP|ßÔœŠ0¼ÝGê@õŸå«¢O ö[?°æ\‡´­ÅµÃЯƒ™ QRR’—CîÍ>”;¯gzí.MÚqù…”xó€ uB–há] {ôzA3™‹M‘5’@õ9Ç#ûÓz=6¢"ât>E|ÏV&KñpL.G‚ÌËò mei#ëSŠÈæ•^Cµ6ª Õ:E T‹ÂhÁ.ðÛ;}†mÔ¾l±Ýè F'­Ÿ~IÙôL~&@—ˆñ­Ð×Y˜¥î“Gõ—7ÿ:ÒqjB¨ä‚¶lô¼xD…\¢ïàLaxÚXBîoׂF°ð¡HÂU¢iì9“¿ÕiÐÑ¿¸=Û¶í²³v{ué‘GÐØ”ˆ"FÛô*Šÿ¬·Ð<º*:ã12o‡³~\ºPü3M p­¬}ñTiÌåYä)Üê6<Û<4$Q‰%‹9J/²T.` M|‘ÒKJ€l ‹¿KI ûC:·X©L—&Î-Ÿš$ô°YËc´ê&ŸùÎ+HoA¾=L½/–¢ñÂs(2CÙü¢¼à…éîoUù230Ì¢z¯Q‹¦ÂÞ†Â÷b;hŽ]þÕPÂ!¨œT™J$Ð![ŠŸ¹!ÜÐJ¢#ó„Ëa³Ð2„ÁîÊ¿`ækQˆ¹Çgg]bd“ÚL;á-HþülLW%p[e)‡íK¼LÂg˜Å¬1>#4 öy¦ðSøåw_ŸE±Ú;Yç#ØÀŠt‰èO®)òX<ñ°çæÊ ºÃÓ¨hAc=#ÁÇtÂ_²D‹q¿ÛÔåž7Æ¥Íïöôw¹ÆJM -¿÷ý"B¾c©{] -Söy[5waa°ï,&Ã}œk)»Ð!mÁ¦/&Ï«NÜî׎Te—gO]økíRPÊ<Û,=)I"“$سxgißðufy=øÔ©xÈ[¤‹Ó™‘;:õ 5XxÞeé‹¢h­¯ŸWS¡°žj3+9èK>wv)Hôï )ØŽWÀíÚek›ó1R½]/”œ³Ÿ´½~0¬ÈÛÐŽ ‹¹”á <Ô¦Ž~³÷\äF _¦M=4_N¥Ë3Ã3 ÿ¸$ì¾²X#8°ƒ¬” ZŠÇ¹?~lðëàùÎÊ«V;¦eF½-³?¥}è³3Çråsâyû­²*°^–¾:{ÚúÑv°ªà Û~߸HbÚ ƒ\×PGô> "e—ûKrüA ï!ß’OH­`t7ãkª}E†ãL×ó8×¾™¿n"¼ÈŦâL£W¥SÈáx{1ö¬ÿÏÒU®.ˆ›Îã¡m¦Ï×O¹¯àë´KòD‰t»ýÍ^€ü«½è²|Iˆ¢ßI×rÎÍzÔÊ:‡ú ß…Å¿XŠtÍUÂçÿŽÛüö›gßÑz ´¤cÁyU}&+ä«nûÑ -ôV&\{Ml°Á[ÈÝXµ­p·T=“2ÇDö´úê.Â¥´ò~mj'ŠÔÈY×=ž4a^Ä¡Ož“²röò-äw³ÒúÓû"œì–ÃÀÙ,$¯âh9øw”à%k9Ü–5¥ÚÍЉŒ¼‡lÊ=pûˆ¡IS.E2—ŸÓ³8ª§$!ÖØuºcžÆt®¶Sù6ãðò-3WØJåÕ0ß#ZMî -SlA`¢{Ôj~ß+žÚˆ[ý òZvne‡¹w¿{çý¬eŒn(`vtÛ¤2Ò»•¿lÜC£§IÆh°À®xw—Mº*Êv*ST!ðþ” -â¢V榆®ípP-ŸÉ˜+zê(Qɶ$HV=½ßU€Éü -%ÅâFdh^•¨R$küV2‚¯q£çZ{_ Xüê|FGN´«ª²9oÀªÖ;Ó#È}Åæ²¥Œ¤BèšÜ¿&ñXv¯è5BœÚÔÑeûTñ‰ì'ë/¸íRQÚ"ÔHÉ6O^Et¾| x‚­DR'óòÒj‹»7OVôïu{‡Ô—ÒéF@)aYDa ô›ÚŽ­¸ÔÜt_ÔšäB>WŽƒ€#õ.m þ½¹@…›545—ÇÆŠõÂú„€+k^Ç+£…“ô|Ž)‘Æê$¹l¼Úßo~ëÂò‡<„Ôbc=#×Ûx®ÑÏ6³^_d: 4¤í'ÌÞþùG—x]Ý&{* WUCñk[è„Ú¼jŒ€¬‘£çð±s˜óÓœu£HaYaÞ9׭˨Øë²!@ ÊNZô°>P)`x7?æÚ÷Qs¯:Å?¶Wg{D– ¸­¡Öa™l$¡ã¥óm#¬¿l¬‡£iTžÑ*Þ°Ÿ¬ õx ho)‘ÀÝ]âÖò(Bœ +ÔwΑi®'r‹`ÉIƒ"èçÚ[°îFFõSG3NXàéæÛ>ù…‰)QÊ|1ïû ÕÕQH>H!ðž³ZˆJ ŽpËæûªH´†ÐkάùaOž…«Ú ?5œÅ§MDfrCiUQi“ŽÃJ gÃJZ 5ŠõÅ‘\”^u¼ùËvÏÁ½ TÒ÷"ìêwÀl ‰~3A9ÕÉ'Þ™,”µÌ«mÒÜqX–Þ5ŠL׳Ša…p=¤qé)_ÿ†v‚°¦O}}\¦çÕR½Æ*zí¡îÓŸ—¤iq)¸ÒÛ¶¶v Çícµe~ªÛø¶‹Ý¸—±ÓÆ“ðÓOˆ_\dÖ5ÿH–Å*ßì&Å%—ö[î;iC&Üâ/I%ˆËõjn®Ÿ¡^öã3ƒÑ> ¼AòY1]°#aì=*Y Ư¤ANÔ ®aBKðÄ$mÍí=òP‚Ç66Èšj0£"ÒŒ?úGÅdÏÜ™Þi­¨ri{Ž`¤ômK´3oñ‹Ž ×Í[ôÏØ·ë?¿hŽê†„5`é$ vkYïw­¯j´bL™…ÁÉâñ¯ôôR®xMŒå¥Åu,ovÎ\‘«- o^Ì# 3§)¸!éeÑÊWi¡ò×j*ĄCì¤!¬êFf/\è=ÃìÇôÇÝÚ‡úÎtß2`qCš§òµ†ÐX:u¯ ®øÅ …ÂßèºHg}èk…>=¯Û2íýs‡ÿ&9ѤtEµ ‘´)—¥Zxw¾Øuç’¦ø¢‹·ŠNýh¦ºwö½CÏZ¥8ÒæÃ‰+¥fPn)¥Æ4Ôȧ‹âCïKMŒÏ“¸ôz´÷ØÐÓöê‹@çÉW¯ÇV©Í™Iæ&XdÏˆÎØã=x$ó,Bu!ÏXŽ’ßßë%²cwdR‰\ÊÃô4gõ¬xçj9/Àv¿ÑÁý)µåBÃÀŠÆôÛæo´ëïõKÄu…ÃŒ"¥¢Š‹î÷ ÔJ®Ë=SÝñÁÐÆà²-L`^ÕtpYÐ`FÃi‘ÃhœÊ³¹;@-ݽxußG.3jf«¸Ö_»üý -kæ3„Œ“{õåï[._>úǽ¼c¹¶#ñæ¼Rîœà¡f5=#Ùo26š¶ås„XÌËO]öwˆ¹·íO»ô/£CïºÅRù#©Íä@ÐÅížÑZCXŠÈÈ"Nˆ”…’›Á€UL|§ÚøyGˆ˜hu`ºRõ ô#×dêˈAH¸¸{tM™†yÜ2Ü0f9‡ÌÂKàû§á+7îZGO~Ú fƒšd™Ý¢¹YÝ ¹~J6‹TaG²z変…ýôç_6Ší3ûš˜šÝ€^kZŠ ÿÃñ±Ii“9nçJèqöéw%,݂Ӈ âTÙÌiÆY7À}ä¦CX¥ÇÆ/ó·Gg—àHxõx©DŸ´œÏe,H¸G¢âi\àC×/4Âi=ý1k¹Wç7YC5.W÷.M‚ ³E}fudÇLTxÆ þê¿à¾Ën¿Mew{fð½ÅUgšÕ+h>Uàfkߤx1J«hÒ œiQœhiØ®YÇIµ53ÏŒ56èGÝÝjèY~¡ÌTËÛھģ!y¬fAÛ&ìÂU†%¿QÚ8"×¥4óä‹ÃŠvòÃËa3–œÛÏw~/ÕæÅξŽ#u¢vrébf)Þc;wçuÓºô‚áœ*9£Ëtúõ ÌÂrsúµ“¨b-&»×‘@î²ï “¼’Yû`=\bE"ŒÌ'Öy÷Ó®Ö=aåWÞ`ñˆùØ÷ÏWVÝÜé¢Ã”ÎÛý Ö¥%g´h–v œ>`FÙGÅÐF(¡yú^,þÈtì_ôüe4Ê}iñoÅ-4&Ζò D-þ%`ߘÃyåÑѪàG—ê/9צ›§Ä›û3¤Ê•äñé¨Ë`ž&ø’åz½oQuhGdõºq¤ ‘[ÍÄ—­ Z·ü[ëTNfž’ËX󮈌ÅΟ…4EЮ}…¬®hoúÙ~³ èkŸƒ¬- ¦´Ú¦9G^V Yóƒw˜ØÛg0z5(ú&cŸîWo9iJ”7Ë"êƒíûlj=ú_1Ý?†¨çŽN8Ð àhäòCé˜ÕÓ4 ïëõVÂÜÊŽßRwŒuÈÒd?6õ‰ñ>‡èhSo‰4±ó 5?Ln\£ ÑÛŽó½}ÛX,ªü*:M ߬ùZ$¿áéìñÛ ÆPN°s£cšþ‘r²fN!±ÁG« »m¾tÞ Ë¨Vý¨¹²è€uŒ­pgžš×á0óÐû–‰þ*¿5l”R9 ۨݹÉ3ùmv‰sG}æ›O68”ª@jv1Û¯«7»œ“ÍA<Š|2r€vox5qöl‡îƧÊ#“¾ÃI‡=¶v“+äÊdlßý¦¸‰6—]ÁœÓÁ¶œdNPun¾;éI½@Ö,LFpBÇc˜° SþþéŒÒ†a›ïAZV²€ë;Ò8A¤ù¼¤ÚÑ9„Ë­ K¤ÄfjÍ…#¸coŒ#UÇ£ÚDî™ú:ŠÓ<×ÐÇdë®´¥BωÝgµD(à"Œ*t÷¢—á³5ƒ¸ÓðÎÞÌK+;ò`Âþ#f=&tõÅf¶½64½²—˜~”ñÁb;<]ZÍж{Çdóò¼Å4#¬*Fôã]t¨Ç².YûÑrˆª-¢_ç%ç|D*Éiro(c.¾A“ ºÀìb}ÿ‚èqåjë€C’g´$ZôöK¼T§^EYØ…‘õ>uÕrQda›hMʹѺ¥Ï³M±öécVÞ'áÈ -}6FD¥ÒñQ4¡êàpžÜ¡r—Ô+Þo‘W§.>¾'ˆ8•U‰»ó"qlkŠi#umu«]¸fyãu…˜Ô•Ö|‘àÓνßSvàì9Õ~#²=gá¡uyL­¹ñBÚCÎÂqU°(%ziš‡ËlÁ½wWêVQ9&[³’p|Ö÷O`ªÈP¥ºSªwDÍCéÂuvh¥À©Nhß0§Š$1PCÑ£åç‡ã$ï±:7–]òîé+wx0¬®Ðjܽ<ñvô#D=~‰läE’­:ó†Êô­…§A¹L¾E éq@œ;!x»ªr(ïÄÔ¸¨Î½ò“X’ï.éøÀM€iì;Ê4~Ëì}(},˜±mºÖ2͇ÃÚy ±\ÙKÕ}q(<ŽqÓÿV\¢QOk5ÃÄÖâ·ÚÇs7JÍË>ºüÁÁZð—Ð[‰Ø9N¸@ʘÍɲ³ªáìtò#oiSÑqù—áç<|b÷ÆïÃkeÎnÄÓX_"ÔÑlƒ–«Õþæ‚#«–=6€;::‡%Q|aé_¿Dø=VÉÈéÔéD²ãOÍïd9ÃÈÔÁrWæã(ÕLkûÄãà¥ûٴΣ½\r§^¬ß”èï[èˆ?Æ‘hö— ôwüŒ¿ËëUÌ!»R]% - -¥QÄ+ëMשޝa<¥x®NFdꂊÕn™L‰˜d~|œh­sÁm)DQÅ =u-z€×Nµ1’‰ÚÄ mZ©ƒ‰Ÿ4Zr夾Í+¶]o Aü²gŒÑ©AµoÿÌ«§fïH¬A€­`-»E<©)±0ø1¯Òc•;:¬DGrÌÏ7e{Bf.D—ÌÃ- ›+˜.Y‡­ÚŒmÖ°vƾ¬Œ1VM52Ô,›é)ûï%òï?¨7‰O§u\wäËÍ)õyYêóMÞ^ó¨m²s Ë)jî¯(kz,¸›÷еNåo. -¢%‚fY¤aÇ·uðåÇħã·Oå90¸8‘ÉâÀÓ›K1€ï>{¡¯Ùñ-Gz,UêÓà”X”>ƒpK•û&ÞÔCïH½Ÿ¼ýšPîQWOðòø¼‚]º‹*{—ìÔ¨CW)¯‚ø.›<õ‚l„R¤û¸÷Ìsª1ys Zî‚÷÷ Ï/&ëM勨€‘Ÿ56ÔÌ”“W™¹_ìU:Œ .B³ÛJ,¦$§HÄÄ%]V।H6ùù»Ëùj?ü°cº63™äoP+õ¦½è#“oàâEíó ©ðEV“…”}d_'ç„/yÏ(@5ÿqVÜý² Í¿SC:÷ºåÍKð=4%ÜXEçDx:¥È|æ×1=Ç´¶ô+ßáPO5Y¸,=bv]ÂG¦˜@õ"L¼GÙª—_ª’bkf8·EF'z%0ûŸ7Ö>¾› ÐV›’%±x(±#‰½3ŒJ–²çлÃslÕr߀}uf{ ÒoQ×8ê†úZæC‚‰4E¼OE‘Õˆ|%Fì:á¤èShyKPƒÍIƒ¡Xgº¿' J‘6aGb_K¤¿¶»RT–5KÆÐ ™â8²Qž³ðòl¾Âw‚µ´î³ðÎÜ”A×ÎøìÒzªÄÔ·¨dªWG-¾óúždYSe\&ãVNV˜;Tö™&YrÊrÌ/z‹Z؃¾ó‹Ó¸»u…h;SùàÍÌÔ7ŽÝ¨óò­tS^nݺÁK½ß氀ϊEGž¸*…@tN¢Ñ$%¿S%m÷¢8#¾ßp"§YŠ[ꟛ8Ú7˜¨H¡û²UX?ŸæEº@'Þóñv(L„PÂÀËâÅô`B_i‹'èÖÜ>BŽ;ë|4 ýÊ÷n||zã.p<­qÃñ5G×’èG¼nÿ(Ù¯ÐBíkTñ/P°à ¿:ŽZJÞ|ÕyÄÇ€k¿Þã]vL iu-.;çà\ø -OÙc {ç¯ëÀ…{ó¦é|¬t—.B(F0mÒH‡{Yéá"^8%òG™Ög×s GJ-ç,»&Lç°œ¹× ƒP`½*²ôX… Í!%®‚Ÿ-À–; ÷eù=ÐÙ¡ðS«–é ù9>!aÜÆa@ÔüÔ9Äb¼Ù‚eIÇgêÀì¾â€Çú¹´Ÿ3·Ì_4¹Ä-Ë÷uGç|°ãK -šW1ÞšAÐÕÚdo²SmàX•ÎO¿LÈ4#þ&OHKã‹Èt»Š‹º -øPÍ5‹›Ÿruž´û²^ýb²ü’ØË!Ý‚¨8/æ’ÚXxUØïÛi!‚1Ú©ÕáÛ“þbY›"È*Ç6£-”LUùòÁõ‡ÏÀ5™>Æ¿ŸŠw^§—K£G G„{È•ìÏú6Hë9•­”–ÒzÂ2Ì–u¸"èÒëE«E¾ê+êÒØw ÅbUÜgC×ÖIÉc¨tPù÷¥†~ÔeJ^ Ðz -oæ%n~Q} åM;óÃ:é™yYÚÊ7zÃVÎ]ÇÖ³‚„©„¢Ó¬;UF)iëÕ <#BÐ`-âzµ_€k_|¸0Ô•ŸÅ w*F|¤]&¤«ù§ë&åw•c´Ðâd‡ÏÓÓvy´‘Lï3¾[ÍBégúáÅsmÄS¨aFdw,Á¹–~hAbŠÎDš¤ö²ÜÛ;{Z/±Œê¼Ã=éK\ÓrIqª{€±º?´íÙ»ËüÈ;!z]0$yˆ²j}¤C²r…K|1S¶]À-ÿâ6ÿûQå]Rº­,yl¸ÊúW\&΃í-¾ádú;™¶ÍhG4c»çÖ~bÓÐ]»€üòO-’RsÚF(Ó÷%·XjÒÁªÕ˜G—³ùAAîÚåC­lùÇýì%p¡ÎĤ™Ó •ëñ&CŠŸq#а¾– àüN®ž—cjŽ‘®c¸ŒôÕÕsó-]1ñ…ó£ aþ^éS‹&ÝÒTœa¿ä7eªÒƒBp¼Ÿ–²yZʔڹ&O?؉5>0ÿÖüšúrd³²UÌÆ£e±Rá9½!ö”b½û·œ:Ìùµ†Y+âJ¢¨2 ùñãÌÓŸaŸd)¿9 u f&àD¤(<|O²Ö˨eTÔþ 5owsç† 9½9ôŽAŽ”ÛG¾‘0¡G¨é›&öƒ‰#[ýkd{ê§3˜Kî•Èt ¡JÆL GXpåÍ× Nèk–:½Œ©°—ÉË݇|(O(ÄV-c,WÛI~O\ûñË’ jü~Ñc!â `õÊÚêÚ¿«Ô½ÀÿjT*ÕŸÍ€¦o~¡zcºÑ,87è)Ä*£Ø$XWÇÐ|ËëŽÅ3ŠC}t‚6ppÂa0âݸÍ`¬Ñçäí+³AljgIë'õz†º m0¿nvx®kÉ)î]C²ü°XƒGcµ'‹<'hÐÐ?'¹&#§¨×îÝâ%¼ùy@YUd/Ü%MŸPûdõ5¹Ø4‚Öi²9{Þw{vnˆÚ¥`Ç“&wtT:mö} I´Žñœ©zíR7{{–‡rk£#CßÖà]¸‚“H'糧cWäè… ½³[^Ä„’Á+Ñ!ÃHÐEu9žq†µ¬¯UÕªŠêÚ‰uSu¦‹6Q8¹)n$.7Åâ¿cD_‡1a¯*¿‘¹Ý|€?NúŽÔW)Öç§å4C­ûJáNWú‘ôG–órªÇ*B¦Où¤H̤Q/§ýçUê{·`OtdFpsa†Èº¹¨tª³bÔn;˜fJçé*DÎ(±g»Ÿ¬à!ú,ó=^V,'t¶É0é |vÕdAÛ'ÝÁŒõi|£øiQ„717+ë÷Òšû™$c­VJjÕ =æÙ®ÕÆûÐ&£øé›ª.6‚4÷ç¯[îcǘ·}þ'ƒ÷‹av¶<Ô­t‹põ’Â"òî)è‰i'Árï ¨8‡Ö…Û¥X;+Ç™W)ÜôdÐbÎù˜IÕÊ^nZ¸ëÇ: -/»½F¯ë_Sckᦹ6Ñý$ø`ªŸ¢2#ÜÕæÏÔIóßûËa ( ëï%IÑÊ6:]áêbÓt:S›‹.Ç$à8ƒ;µ£De^Äaߟï ]Ö1GÜW7^ð„ÆT3ôŒ¶ïÃÛ:îôï_IvKæWun˜{(o×¼è't•4‹ U[ï·;ZTÈ);…αØÊxpgJ1ŒÌ8ƒupÌotm;°Xã+#3oScÉZ+Ü$–:ùiwb¶mßUàÎç1Q2Ê%¾Ô{'ËwPçÇ} Ï˳xv­é¹T¶ã‹"/ï€Ò¨Á87ÁÅ›µŒtõ@Ÿ¨ÂíVÅ3o5*«¼ r™Ç)ÒA[¬°±Oê2nX§ec¢-¬A–i)¶¦ˆk]ð’<ºUá¡Ñï¹^ôhD<\ãRe¶)¾W¦œò*#ðSÌ1ºq…\öýÄ)vW›`½ãÆn LqzÚŒ_€ìÔžQŸ¸2Iž~Bm\ðác'̯£Ä1LåµHvc_¤`鯛F. .™qµgõ×óËÏ")˜Ú¿éfÎòë}³áÜfìûœšRpëôaç€4p£c1ò"tn¯?FT+£ài›u]rd#qò)®$ÂÖbó›–£$S€ôZ‚ƒ¬B€>Uú-%>”¨ä|ˆxº’¼æt®u2†àd‡³§e-$‘¢§Ý”ÿAµôP8ˆsÄ&¦žòmik±§Ÿ¼Tƒí«0ýæØ *©wÍtÁÊqô¶C”ŽyÖ*mPV j¬;ͱäe%^¢µw³0ð‰E „WâÌ(“°ÍÙ–U3ÀZ Nj<¡á¨æ3qÒõWâÌMpÓŸ°K¼)Kô¤F“TÞÛ|’• #*ÁÍ?’C• ø[ÇH¾±â áKì‹ô;E>ßœV øfÓ1ö¿fZÁcs{2ý?|ÀÿÿübCK ¾½£•¾½üÿÁ ŒJendstream -endobj -46 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 47 0 R -/FirstChar 33 -/LastChar 125 -/Widths 48 0 R -/BaseFont /KHZNEN+CMTT10 -/FontDescriptor 49 0 R ->> -endobj -47 0 obj -<< -/Type /Encoding -/Differences [ 0 /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega /arrowup /arrowdown /quotesingle /exclamdown /questiondown /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /visiblespace /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /dieresis /visiblespace 129 /.notdef 160 /space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi 171 /.notdef 173 /Omega /arrowup /arrowdown /quotesingle /exclamdown /questiondown /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /visiblespace /dieresis 197 /.notdef ] ->> -endobj -48 0 obj -[ 525 0 0 0 0 525 0 525 525 525 525 525 525 525 525 525 0 0 0 0 0 0 0 0 0 525 525 525 525 525 525 0 0 0 525 525 0 0 0 0 525 0 0 0 0 0 0 0 0 525 0 525 525 0 0 525 525 0 525 0 525 0 525 0 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 0 525 ] -endobj -49 0 obj -<< -/Ascent 611 -/CapHeight 611 -/Descent -222 -/FontName /KHZNEN+CMTT10 -/ItalicAngle 0 -/StemV 69 -/XHeight 431 -/FontBBox [ -4 -235 731 800 ] -/Flags 4 -/CharSet (/exclam/ampersand/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/colon/semicolon/less/equal/greater/question/C/D/I/R/T/U/X/Y/bracketleft/bracketright/underscore/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/braceright) -/FontFile 50 0 R ->> -endobj -50 0 obj -<< -/Length1 1697 -/Length2 9338 -/Length3 532 -/Length 10328 -/Filter /FlateDecode ->> -stream -xÚí”UXÊÖ¦q×Öhpw î®Á­Ñ††F\ Ü]‚ww·àî!¸%Lï}ο“særæjžéî‹~¿ªZõ­µªŠ–RM“EÜl”;º²p°r$•µ´8جìì´´’ ™«-ØQÊÌ(ààˆ;Aœ¼vAnN؃ v‚Bl­m\ô’ Mâˆ;!¶fŽe3W ,†…  ¶°ºBYâ @ã¯.   â´dÅààXÚZ¸ÌÖ¶Žly’w´øþ%[º9ýÏ;â3 ÿÛ&fÒì‚,Vl*`Øn@˜—ÿ¶þ;¸Œ¤bæðWø¿+õ¿›9Ø‚ ÿžvprsBÊ`K Äñ¿§êÿeNhiëæðߣò®f [ qGkÀþ/ÉÖEÆÖh©fëjap…¸ÿ–Ž–ÿíV¹¿°)Êé«H«0ý»©ª™Ù:ºjAþ‰ú×ì¿™ã7Ãʱõ°ÃêË›ûþÏ?£ÿÚLÚÑliëh àäá˜A fP ØñÀ›`ëh ô=a†ÙXÁ®°%XMÞ¬ÀŒ¿:ÊÅ`ƒ ƒÌþÒÿ%ñØÌœ`=6ƒ¥ö?*7;€ÍÉ t­\«ÿVÿÕèdNXXém]ì‹°­œ@n.¿n›ØÁÁì·Â`³:ÙK¼°U°@à?¬ðØ\@f.6¿˜e/ üÀÃÿWhøwØ" ƒíª¼°¬@@—ßžxa Ý`§ò–‹õ_×vþÑ`©8»]þºš¿E˜-Éßs õñÁÈÿCü°¿ V­ß+öo‚EÑûM°ÞþC0«æ3 { ëôD€ëý?»" í; 0ø[†ùþÝØŽæ¿ ¶£Å?ÄÁ+—åøW±þ@XZV ̇õKÓæ„™±ýam¶ûažìÿ@˜)Ðsõû¼rÀ®›ãsþa®œþÀ¿Z÷Â\Aþ@˜+—?æÊõ„¹rûa®Üÿ@˜+ßÈ såùÂ\Aÿ@˜+¯?ðß=þG'98yþ-ÿnäÿþÔHH€=½Y¸,œ\<°ƒÆàggÿŸÓ´maÇU^ -ÀÃÎÎÎÏÅù·já]\׿wØ#ö?le {ñ€@O ÆÂ,ØB(È.±.ä‹tîD12#¼„u}´JuÇ·VÌÀùxPÁ¢3ãj•Þ}I -Î.ò.…Ç#‰KxË;õQ™ïþÎÑI3¿vÝMwS¼IôÎS”¡;NT7G¸ÍuÓ—Ç<ðªS«Ã_âÞæõ¦Ÿõe«ÑKií¡.SÂu¸×t¦ñòéɤ€´Cƒ«è¸(5𒜿|à]ñÀ‹ûŒ´2ècŠÖÀ´ôÜâöì>-+ö— ÜÊÇN‰Œùúq;‘ÐbþC)뻕OF¯pÕíl´æ©åÉå§›šoÛ'64›*;¡pÓ›èæŒ£Ä{ýJô¨.º'¨%2ØHG‚Òõ¥Êxö.ˆerÁ윅җ/ãÄRUO€Lúy‰¯‹jð½žÈÇÉkñê‚_&L´ÙÔ[†…×»˜KW¤cÏ¥:UŽqôß)ôP¾%…o‘Ðýõì+×eûa ÚþxâsåÙc§œžÎí úì#ÚmÚrÂúžôk - û÷â‡vXA+¯5ãó‹Ð6Xø3')÷m“¡¾4_âdY³qÊ=ЭÑÛ°ñ‹§Ø_ä“A0„ð¦ÖK#:³Šûc¸¹­/àdÏb>'î4,ɘh·êÝ#5t?“Ü íË«M\naK@9Ó„…=Òãæ)v׌ƒÕ™C ¿4=Õðá™èÁa‘@ÔkÇŽFßFÏNOä%6…÷ùàÙ¯!NG¼ªð«QC_ïmº³8žÅèòŽ•Ìï(¥¥´5’o £(ù¾o›‚±u\>LE•ñœ+yPdoÇEaqÑë¹y'þ´ÂŒh®îÎDí#¦`›“j)òqæ΋»&vÕ"¨ëzKÇF¹kuö£ ÈK¢9i¿þbì>#bWŠü_àOí¦´#¯¥Ûч£Óó­ ñ¡'ŠÆÐSwÕÆ!g÷™îÁçW>ú¡Õ8ÛUeÝg{\r¯4sœ˜ -µ˜Q(]£ÙÇéçû„´¾Ô0qí-PÅ)ð;s~³ Wøaš[1pÁ—šÇÇ´¹w(_ÜäV~Ú»²1ßn#',Bùú™_I#™Öˆ‚'k dƒÃs`ù ÅØÞs¡û9ÉP©š¦ ç@ŽH©iÝ¡ûŠ@,×ɵŽh§Îf"±=­«v‡fÊÞâ^Å’•‰ä…?›=²:Ã…Ò’•vkZÇ­ú‚¬@ -„Rp–IŽë¢Lœ–½iËÝÉsׄ“J'/ܘ2™ƒOê<àX5–\ãÓÝP¦”£ÖEøÂ<J[ߤÀ Ã5U=>k€†Ám²«¹¶(~h;ý@ªËd+aÆôGz<æzíû·7Yè#qÏ¥?£l/Øî”dÌFCÛ&!Ñø( $»![g•M¿ûIß„¼,5â’_…Ü -–?âi~/¢ÔQº«Õœ92s¦¬7I +¶¢»§}ìð -„æb ¤!w°ï]¶ø/¸åL=lY@­rœ}Ri(˜Êá§×ëò¡½:ðM/¾•€=WõITõñ”ÉÊ¢^]¹0Vß#Æ 0C&F;’Yßw£<ÇNÈ’Ù¨±Ôk‡&Ë=‰ý ¼iÜúì`Öéð€·6ÌŒˆñ"ÝY~)}ODb¶PÝÿ™“8‚Bžò×›‹O¶8M­T#ûåן¼%E18áØg“·bùXŒŠÏßá›2ÏÞÃéQ˜:â{»¾Nhf÷°×Æ!œ]7Ô¥Yü:ML^½Aßï‡9Â\áÛ„ÔAw†R¦Î$Ñ£'ùp<ç´L¦q†u½œ\¦Yéã´¶âà¼TkÞå -ËDc¯–~<´)GïÞ +¤õ'¾À•‚iAЭ»?>ÛûƒYˆÅÅe#(úèü‚˜ÌËÛ5ÚzÖàMŸŒÃÍW°BA›fÄñ³o‡ý7W<ºu²8nb]*êdO«Ñ _‰ç¿mÓ«Q$ÆîÔë±U¶<ÂëC;‹`WªÖˆ¬Äßåžhä/ʹ`Yr gðqE‰'bΓ’œ¨Eäzœ(/Åi^†ë¨õT{A›Ã<Ã(çäérÝ/¢ Ë÷½WóJy Ä?yÛb‡¿¿›Icž™tËóGQ hÒ%b‘×)»`±êΩVv¶¶ƒU Ѝ#µ´*íD j*+Ûç©æÑ[Q{³P²"Æ¥9§qÔ½.P#=j´¥VaTÈà}úF˜Å]ô\²zÿfBÖécàû–ÖøÚš#±@þ( Ø¥ê^Ìîlªñ±ú„‡³QÅp[`÷éÇCguªŽy‰y¾n·0}1dé&–̉ö•é@¬^”ߨFÎîÔûÝâj¨Eo˜‚w:“%½²%ÔåñsØù¦ÒâAÒÚÌ.CŒ(ÑWË´)”pïªutH G7ó¸öð˜÷u¿Šæ{{äܧ äžçI\p\Ž…QQEÖ”–‘ù •‹ÔáÀ´¯:«”W:›³“.HeÏœ%ØÇúëÆêVJ%…ÉÖM»\N"+ÆÒÛÉnÏ$¦Û|ŠGX¦¨d¨aƒ‹ÛE.TgÍžŽGmc]Ñ,êä18žÅD4u±ÉlÒÎäíi‹5Ñœi›ãÐ7_£üzãá«IþLçWɺBò¨ÞZ¯ -WìªàuŒ’›­ÖM· -ÐÅhhtÒvú`@dºÌ˜ôLáÅ+¹›0 Ç1Æ·Ïóö+?vÐÇ ’‰$až¥ÝÚRž ïì— ÖåõӺxPß kýôBüMÛÕº±ûÛî¢ Á4’vÇ£¬ªFQ:Ï‘µP溑W×™ð±FÎyrçÞPõÑÊVN””ëñd¾o`,âã]ôX˧†š®Ìø^¯e*ÔòçDsÛè¡È«ƒ?_óJý"“«â^ v$6Rž­¶Ðîí¼Ø™!§/•9°~¢¡q‘¬±`< Áˆý¦œ2šˆÅƒc~P»öù'Ÿ®M¡Pp1-&͉¯ ç§¯d‡Žy¢z -;·» ïAªŒ0d\Ú½ ÐLÆŠ÷ÀëÑ/–Ru4¬jË%Lì^ìçmÅûl$úZ&¶ çŠï3îI5|*3Å>ò )Ú ¢ÕuÓ¿QE¦xC[¬²üâ–Š&ü8=,µÆ—yllŒBSÑ] biS¹ù‚,Ä/Gn°ûG>¿@Íi\Ê—¤’ÏZn}Ÿœ>ÃõÍ«76äÂQPS¼{`ö:ÉLé¡×t ¦CZNÓÇÞ‚èw?¿ÞZ 1þÕ‘äoÑ6ˆç-u¢h<”Éð}'~¶¥ÕðN+Ý ^=¢‘Dø«©z¢¸â8XÚ¡ªÎ ]K³-Os¹ —ä &·ˆ¯ÖºaÞ‹¯lžù8ä_ªõ³QG¢¬ÿq„‘Ç߈±‡X[¡åQ -÷¾_ôZXCØ )@•3J›‚Ñy®y‹¤›IÚNROƒ°ñ‰Î²ƒñÞFÞ듕ɬ¿È!;«úÂPÙ­Y?£Ž§®ø,öÖ¬ñ©Ïq¡RBhayKJÖ„o#D6sÁêžF±>;5ÌrQ =Á‚(צ|ùò—‡RÕ[4ÑVí+Uuþcš.(ÛCîæsmœ§Ïˆ4ËúøÕæçǪo¥‹)»·dlP™DJwš~"xÓ÷4C…cãÝŒªó@Çú%IR*¡œ”‹¶ÞBíÙÉæý!Ô -HÌ$ H|$[q}|œ]óþIâ#šb/¡í}ó™ì?9„E':Ûfh4Êçßì@g›šzIPlÕ{FH?é!H9麰k\ÕÍ\GMÇ×Ó>Ãd`Q¨>ÝñÐ>s+„˜7Qƒ–ˆBÅ0/Ä^ÿBÌk‚»ÚçÉ?Êíã¡Yq|…»‡ˆ ¾i‹òdÄ{“W2)ˆÈ„gyˆ.7’y„Wcuñâ‹­X™¶$í‰6hÑ"ôU·=Y`8\Û|y~ý/zÙ‹p´;ŠêUF‹ ¥ ÌøÕ†/L&4ø®v%h©kéÛ¯®w<\"îQTû…®7;£²Ql[íàžÜK’<¾í-TŸG´gf)ï?ä_”`ªäðž -®›Îܮވ‚bNÉ€Cìb&<Ý5eï"Õ7Ý?a.%òÐVÈ×·W*´uSô¨[}ûa®ÅNx i¶ÑîûJNÃM*xPšè%OÀÁŽq!†uýmUt¾H=ïgÈ0JXÏ8Ÿõe‡öá1 ŸJÁzþåç´­7ÔnT£¢ˆ¼’Ô쪘Û.Æ?»HíønÞ5´vbpõ@º\JuZââ:þòñ%ÒC¡Ÿ·½šðèË›‚)÷(h—‹ÿâ‚Ã÷ƒ XvÕ÷ã¤=Ž˜ðýb™i‚žˆÈÞQÞ"Á†îxúL¥1÷YI2®Ý𤴌ÀˆR°\£Jvw89¶ë]èîdÐ_žåÉÛÑ*;൦„s¯Ò´ç„˜xRO©%ÂSµQSèºUEKüIà'•õ²—¶ËóÖÓÚÓ•C;)ÒºŠÑä1þIç¿P÷E Šðè€ÕSCÝÖ¯8^„Áx a~„–hgI³—»wiÁ>DN &èVSæg(…ÄÃÎ=RÏ㦮9ÖTȞɧeiY\}d¡v¶œ), Ëìï -GW>¢#UËÏul+UafƒÞŸ`9[d«J>ÿlq”íUÒ{—1±÷nߺ6L;j[g?ƒ??nbtÕZ3q°DËtNú௾2Ábí¸“U„OؘrÄ®e`gâ$ú³=…z0…e7»ºH0اËjÁuÜ[Ý@J4Ò;·6¢Ñ±6YUîS+i„fI!ŸAßBg -ª†K6J°ÙÉ!HfU·¤,hC;Ñe,já\ðyÄm—S=€ù˜¤GÅ‘3nðŒœ‚3r:Xéqh£ `ß }‰–u?‚^;”I^ðÝÆ“¸Ý4»ë‚ÕS5—Ñ-¬4Ì^ƒI£4 —‡½“L“³J8­š¯àödV¥ÛJçXÿ?˜ñ™I-1ÓIN„v©rTZ¤o(shF3ªy,ñúÛ4CvzÍóó†šc<^x}Û¡Ø‹7Úl¿2;¦´Hmg°F&Æ -„ÞŒ$uõÈñ4Œj°íïæˆç€wiÌu9¢WYñ3¶f2É4¯ù’Yqdk݈‰²µÔ -ÄÔÖ^êøJ‚N%g‹Ø!ÍEÏaZ¾C¯õÈ„üÔï¶ú¦[G Žˆþ„õ™eþÎïßÕÞ›{|’Î$L»4ݭ̹ôÚæNìNCN’œÃRá¨÷”£¯Ä “¨ÊÉèø®á¢t£7®× ¢ryhsÞ2Á$®„S-ãtS(aòjêE‹!gþî…X×Pó¶lyª¿6ç8ýÜÆ Ë„ü3óâӺȈþiïÑ©ÉÔv…¹Â2¤ˆ×x;ØqTæyÌ…úÊN+®7ãD·±ç+kSvð1ud…ËQ¡–ˆª‰’ñ›$¹—×;öÆ^Ù¥*áϦ´Æ@i|*äû£ÆóÌÑÊ“R\«k¼({݇“ø“ ƒLQ7Ìn Ó.Ø›nêf÷ã÷ ·sñë,ýu½gù™7r¦tUŽ×,gÌÅY>Åß_“£ĵ~aÉ1¾û–i‘³å¼ŒÕ+-áç;]еF>;ÄSíK¼t -–ü èß"hîøº@‚¢“þD¦P¿Òíð ±µlæ‹”×€DôÝGì³i¿†(ÿ ÙÇÅÐÅ\Ó2ÐéÄ€TD·M¯I“{³EPØ?ðêõ!g²“µBਥ }(Jù> -a´ÊŸ!ÑŠh?os:£Í1á•$Š»zØlkMÈj>nѧߋ`y#yéö›w–gnIo‡rCQî[œH§s›?æŠ\vP.ŽÌL€©\)5räe'•#>â¶¾òF£-Ú¼LmÔ͵O>Ö±¬)h‘sÙ5o+/osõ·¼è¸k o[†Ò[VÓ ›b -¦BcUmsú‚=åÝÜÆÄKŸ†ÚG4¹ß=™ç&GR‘Šdß Ôx‘·÷¬zÆ7˜Ža:»ÈÙ§‡ÖvÊU P¼Zû7ÇìÛ÷IeODí§Úñe«®êeÕ¼±›“‰zDãvãAd}IÆì]1DûèQ:ùB7ÛfÁ˜â‡T‘A”XHÓ…qGV÷ãí™ÝÉ´b^LN›Ô èŠa>ë× êÏúÙgý*iœ9U7QAFسZáLíYU5ÙƒkÍåÞ´_©Ûò^½Š -„' º¾X÷ž5ðk¤Z"½Dz×&Umt?ûØ/bŽJõñòy³Ù×d:àŒž&Ç׎ܫZ¬EÕ¢¥cJ9!ÿ&÷©t—m$yTÔNï­±š[ú pÀpï‡Yë{–ôä£Ë6F9{SCü7“7™A&á‹7™'!rñ»Ù+"îÉOÏPЙüîïBXõ—áŽÏ§ÐÔ*6WWâqÈU<Û]¶1Cýø4N7„õ>Õ<$Å1 #^ÊÝ)–05}NË¶Š‡…dÒHVåݾ)ä]K8>Å|ªþ˜àE±Ç7m÷œŽ\ì‹ÐŽŸÅÓ—d^UK ‹3¤ãó?™u ¾”îùif_Šò^¿— 8ßQ‚Ì·US0å‡X@¾Z™ipç̸o¨‹ÎÖä>\°?¹‘Œ%êQøŽg8\ öLUa‰ê²<†ï›äûé=kš¦ _ naÖŒp4FL¦±Cß“Ñ+)ç‡Ó0³a‹%ïd&† B>5îÙ×>šøÐÖVvK(‰ý©¥¿ƒIù 5–Ò½¡smؘ÷ö‡ÄQ(•#¾hÓ«á’aarÔï+Ü^—&¯˜}Slj»l»ñÄCãF.®ò'^ÛK=íйÆèl~C'ç¯æ ¸ôí¦ÌŒâ0SÅß«¤ßå0 < "¨ Ìq­k+ÄqřÛ† i+AK˜Ušò‘¶û*ü⃄zYõ¿Îe™q€ õ¯íI™ÔÚƒ‡Ò·P¹T?•ˆ1Š>e\Ø¥lÊsh‹C0hç“JGf˨¶ çÚ‚å“ÔåQä ˆ“‰ê’@T4Ü—3Q=)ü,7ÑKr@îd 1·™žÆéµ°cJ©]á6~€T²Yf9ŸÌÔ’”&zGY L(íJ¨¶®Õ¤‹Òƒ_â  B=:„Ëæðù§g†ÍY·Pîi¼è²k4 Í›Í²>t:ÌÈA)ÃÞ:ü>Œ&â—äv&q(’|·v«7.t3¡"‹&<±»ø5 -ë«u.Æb$ÊÁ46º!—v†l—ÎŒv*† 1¡HÖùéÔsívˆú#ßqGxšJ¥Ÿé†ïIh4Å^~gY ô”[‹qdò8âÓ˜‰EŽãïsDÑö†ýR7º=pvØmÈoçÝŽ,€O{í¤ÐÍx„äTx*HÚ4Ù*r¥({mò¹m… -"úUÄ&„lyV[T£NWù,VÜ¡ƒ•Û^‚„L¶ “©5ß5 cäb ¥]ß ,˜§–ºÄaV9íVh!íðq¤8;š=+^1Þ£Á×y7ÿŒ°"q Òöe¢ÅÜ`Å4d½\jEÁ¾ªAAaZtW\ù9Û3£ž¥q¯“ͲÁq±ëàÓ[XŸÀ!ÕùÁ,tOÙ!½b¹K‚ák’Ý"šz)2Ú„ÉPMe¥=϶ݸV&Å7‘õ˨¯´k12SE!V´Šb“³Úá­p;òoˆS 6ª#íËøy}.èÔ,eØÔI:–bÉp’mßMªš„q h´ÆJfµ™ü†/½™›½²æ4¹IÂ3ÕΧiMqá‹~”9ÌÓ#¼?žñ™½û.ËxýðFþk…¨ç±­Is˜-÷›ãl"ú[F»24D³È7¬ýZAŃ`ÓÖœMo{«Ü~€£õÈꌜ%YÕ[—g ¼xC ó׿`:nàúœ}¤àécA‹á|iQ’~Ùk0*¯'ÓL€aÙ± ?âœ5ô­C%ýçÚî?³ àðfµƒÒ#ï -ºÝr„»«›“ǧ»îšrZá«f - wQõõ¦>K¦k`ÙñêæÉ‘Dâ¿ßòÏ‹ó>NE§ßuþ.+dæÐJœr»Ó[Goí.œ>A±¦/Bh©t‡”©æ(ÏÉË=·üI7‘zY\~Ùø6õgèÔÂ΂ƒ:Ó܇ï–öX"-WŠeU<«»´Ì$f%÷ðKµ úˆ¦\쨞e¤J¸©Îþd©ü…'U=SñÆ-[ßÄ’µ¥­Ç@¯W{ÎÙm“šË\^4›nø4Üu;¼kÀÿ¬ª)ñæàÕÓû5*¾ØÁ¦Š­:#øøè¢¬ÜˆSî6¨“6‚+Çb¾¹$Ó#>W´hìo›|³dĨ#Õ–º#¢€Æ,çÃðúÍÌEÖŠ»¬2MY=‰æôÛØ±afxè|P,ç›w¯ùäâP6{Äd‡bE¯ëéêgòmб¤^M\>³tÍBåv -úâC-O»ª«e رXx]ú:¶bM3'ô¬ÕðØTŸ~xˆ æÓ½KÈ=˸ˆ Û¡Ä‚eÍXåqÙ9eÐå¸>ë×>ÃqYµV–§gŠ©Éüœ±%¥×*Ô¡¦#ÚU»±Ó\ùdEßLA/¤–ÂÙØa§´ò™õ[|‰¼3Ïs Ôå—Î ›•ÔÄbu Ø¥½î úQ]Âl1EØW¨¥²u“쇯†ånW¬µÒE¹ÊsõŽÏ+¿Å¼“CöN¼~;ù‘ã©·{S!›Z„B±sâ1îàVý³“ªsrsì—cÒ%8d͈(AöÌû¼ª–*0Ã3¹[yzø„Èü¹ú§túˆûY…'RÚÝ—ÒízÙe†¤QÜÓö2 u"¾4­)Ñ’]öGeŽ¿ËŸbþæ•=õ’Ò8Ć4XÙ³R$~T^uòáÛWÁùÐ¥MVÑ,qn+ŽÆˆèÌaÀë3¦ó]õhî).6 L/ë°%Ò…Ïq¥"ɲ Ü2qïÛ"9ÙË:¬¸j3uŸÕŒ¸FyðêZ‚ãºo€iHä7¹Y=?=|ðY³q“šÒîlæ{†Ú*gyLšP_nÐAÏð9?·Hnõ2Éä?o÷ãàŽÉŽöX Ðîb"WêàìDÉ,ÛÙ?ï™!°Nböz·_‰IñÊýŒi@Ö%5Œù*U\¾ÞFjÓ·@déµv<©kù{ðú’‘²)¢|}Žtª ï -Šà";Í“Zyì{Úòt»¤Ê\Æé -Ádk¼Ä×…D±¨”+Yñ1'w–+Ñdìâ€R0»ŠahÅnEÔ‡Á³œ™-à/qªw·Ç6XŒý[´û¨a„‘§{Î/jä´OO¯K1ñÈ« üu~TªSB§é_0´0·¶ëPÜ„”~%ÑAæJæŽp]‹Ú¼U®žsΘQbÚ1”8QöPvæ;-þÓö­´Ô¼ -B1ºpøÕ™žü †)>Êò ß@÷ÞfÃÝÓJßž˜ù“Í£HƒÎ¤›m% ‹Bï¥áhvÉ„…!î¨BW>ÿ¾·5UzžÛFs~R˵ -° ¬!´ -¿ |'Æ^6:‡ŸÍ>ðF³ý)J³õÃûYSã´u'W(gè¶Ë97‘ ïJ?‘Cù#d §TÄ$t÷XÉá—ºÉ[žOn“ÓÆœ÷9,<ò8ž5òB2EƒûÄŒ„\ú×i`.ßàO¤¯Äo5—ÉTñ’q#5æ8)I±,œ™ŒÚ¥Íå4LYÖx‡ò%¦:Ým7߃>þ˜˜óL²B-Ûó -ì8Õ«ÆŠû´i«ååšÜ#—§mƒÎQÓî`Š3§ãÚH—†ÓÍô…hNʶ‹&ép§,å$O@ GŸCPÜGÁÀªÇ’Ûž×ÓQ¸4¾¤+¡%¥¹ÙkS"18êSŽÆ½1y:$ÙSoÈæÎ‘­;±Ÿ*„ÚÔÉ î Õ‹§OîíÔ¸¬;+²ÏÎ-lÙ˜Þû<âfÍ.'9ÅGøÕ{xt‡O•TpT·ûó`_–p£òµÌÝi`Çd­–F®vV«ƒ_}7zº °FÝ“ Ûoéj2€F¿Nšðy›ãQáàmw&ÞwÔalz&W$øKfs¼Ï®¨Ïl†hJh0Fò½`°yp~ES;Ç…Ï –Ç!Ó×htj -à' Åå&ÆÓå“9w˜B®Ð«Û®_&¢fÙª J=‘>¿ºú˜ìƪI£ÄK²ô=n ÔD~!úY»šÇ–å„N‡™´ÃãÒQ:¤Yú-ÞIü -§[&Ñ•›,`™fÄØ»yXÜBÝÇ›÷ûÐ=ÝæÝ°ëšì*U«ãól6]aÞQâv>‡Öìë‚ò -µ÷‰qMö´¸áÚ>_V=QȘµ¾j;S^9C.Òò)VÅ ¨£Àl©G÷~!»5äâ³9ü†œè–<›¹6ãWŸ^ïݲöôd”‰×Ÿâ¯Î ˆ¹òâ{¿'ÌŸF#‚öŒÎlF>4hÆš‰‘ÓöhZ§Êѳàé‘GeS<€Ù÷ë®×)èÖØY?&ü<䡺ðæW˜ b›pŸÅ¶õÑ—S¿§DYd!µüAúÂ^‚ƒ–@#OË뮳å?úž$FÊÙLúþzö»÷4ï+ipBUFë½wíX½Ü‹_”õ"–sÝv$±„bU$F„@ùLsÞgÛáœÔ˜£¬Yå -ËØ/ÛyäN¾ÄO$BÔjÛˆ(-ÏyÙŒ]cܪMe¸v[õeMÉcï-ÞrôyÇkè^ÛlRñÒOÝû/-ßgD×äº.¿®ä,¼ˆ>$š’ÆÛ«šT+êi—¸6;奊ÝbÐp­-¬„Îô$ËF­Õ¦_ã†oÈ1Ó•ð_ŸY`=KßÙ •Å?ûÀ"ZðulU'n Wv):êq -”½øf€Pd²«”\ÄbAÞûmþ³…%5ûÿáãÿø"€hq;˜Aì1þz¦’endstream -endobj -51 0 obj -<< -/Filter /FlateDecode -/Length 2677 ->> -stream -xœ½ZmsãÆ þî_Áo•'§Í¾“ì´^Ü^ç2iÚ^Üv¦I>èdZwe:¢×ùõÅîbI\ò䳬Éä,’à.ðx¬ôó™È8ü'²\3ÍË,/Jf­ÉÖÛ3žmàÿ¿´Z[¦MŸ—Š[fàÅ¥-Y® -*3’•B3ÅáC.JVÊÜ uyöå­2‘3)Lvy}&á¡,T….¯Î¾ÏßVçn7ž-ÞžÃb‹}µ[…µÿ³óáÃ…¿ 7oý¿ëê.H6çÙÙå×g¾l•*ËÌ,/XjÌ©¢K"´/2ÐÔ*§¼à’åBdÖX–[Ê¿¾û ªíP—/ßוeÒhØ.¼÷[°Is¥³ÅŸü;`0²øÅ_|ôÿ^9³•„=ÞÇe`ØiµmüßWQèkY¡j–{ŒO¿#ëV?õß¼DÝ·«ÆßRÙâßD|ÿE›(&K´j)+EÛnr{ìWë}ˆM.(*C/Š––*³Z³‚cº» ~xG¥—DÜ{’:r°bØújàYRô7þ¥´Þ¢¥{Z7“åºQØ„ ¸!x}$Aºa!VëíØ<ˆk&JÓ7o”ˆAfΨá:Á¨W© !sy žQz~ëþŠaëÿdz!ଛ#@Ý“;ÕU¼5Ò=7LÙO€…2³Ö™ BEëƒÁBéÙ­+†­©Öbå"ÍEâ# °j¢\ÑÔ;‚`2Òt^@®ÙYð¢ÌÈ‚$*É -£Ð„¿ŽÚ„\ -Ñÿñ×ÕþcKc -°P¦Êâ -À ¥€N|’z&|ÕK𥒸ŒV›OåùXui 7JÛW}X;QfNáá:mÄ‚–ÀLoocÅhUBôWQäŸp-ãÃÈo;š¤]¨Ò@羺æ€(=gÏpECwH·Õ­×]ÇêõØf„¯pM´ì›ÕûD´Kh5”™>ÊÌ):\g’*´2¾†Q”žÝz°bØú?Øñ| Ä°‹H½nšz‰ÊA`)¦”Àêlp5ÆâØ´}Ñš%ÂX/yf%gE™æŽ(³$BÓÜV©£MØí«?H͸éõMFš2[HÎ5X¶ä"Ýš„÷ú¶KŠ P¤Ââ®xÈ…ñæªjÞß]ÍÛ¦ Ù×E,l>¼\ùe¤ÅªÇØ®ÌÁÓ|"]k××ñSp0†ÿÞâ -¬Wê•OðþUjZ™Q™‡p½ê´[·Ýs[wÃ>×Aƒ]¼¾<Ï k_TÝ’®ûA¼TÁ¸Ê@ßREV7^AHÕwULn¬W{ <+ü‡Üûã:¼²Ñî4ŒB_øë/âÛH -+Jƒ«]ÛEû… (nÇe¶ª~Óù̉ÝÍ{}÷.’PC8ÑŽŸRÅ èº õ}$·P¦=v|Ð9¢ÊwãwDº°ñ°úÌȯâ‡TØ‘èrܢ˯¶Yµô»‹0ìd™¿ÜÒyw«¿'b”`éÍY…îÂìðHÌÿ¸‰áà§ŠTÊÎD!{)+­²®”ß 8³EeƒlºÊb(“CÙæ±!‡ÎgAhQ%Œ¸l²ú™ÜöÏƃ2Œù®b’uF_–L Ûn…sòû£NYDm½Ou{fÊrVÕe”éAKLb  WèÀ$JŠÉÜ -ÏeìŸÚ¬G#ñ…O’÷݃q€E·ÞE™8Aö™¸‰‹Qò[íãK{¢sÕÝv|Þ´¯Ò(rO;Û¨^Œé+4Š3®‡ôN%ÛV´këîÞ¶y%"µ>@Œ.Ý1ʘ󴫯«òJ²ç¡}:, -þæ4–ä:^n‘¹»×q¯¦jõ„6 Š÷½F -ª¿ŸTýÙÿ¹'–E"èCÒjçÂ&YˆMMùŠn½íx@½ØNR™Ó¨}Ýs@1­zõ±­ëØ1öUùu•ˆ¤vÍ®ºÌg}gôž;wy©€­KTjr˜cü T«èºJW%h§X!K׿±"òAÿ³×b8ìÆëà¢P¦®ãeêܫДÈÉÚ -UòPNnV">š4Œ—d“!Q¢H”&ÿ5ØB!ƒØ1¶õZçïÐùÌØµÌ%Ó¦€Pw&Ϧh:4ñîPcÆt”¦¿ÝÞuâ¨n#j˜ô>¿#±=уŽ&*®™€‰rã*2…³±H¡dY©&ðCIH(“J»i4I˜¢J”þh¬nÚ+ßôùaAžÝ÷•Û6ÂlÕU«°`€ó‡ó(|ñ‚½©äQ§¸¤Õ -{€ÙÖÝ ¢½–x|DÈ™rYÜ—8à)ÏÝ,j`èMºQ1 sâsÜ]Na¹a¹NºEPûí|ýÉ2%ß¹â',~£´€Œ„ù6ë¬gEžC6x“Íü…áTî«¡2Ý`¢L¡gæj=Q#GÌYB[ËeF63'` ´>oÇ´°.´i­ÏŒÍG™`þ/1ÕBÃ$H µxüŽBMþ !ö‡YJf Lj:ã°§)(ʸœ©'(Ð ¤ÉMª`‚êFµ¯¥¬3P-d>[ Žgž5Ê$…DûP¢­)⮺þãa€•à×<#;°Ê7s>^-T¢`Ü–sÅ0Šàx{Eª~zÀ¢ýCK«ß“À§u”ôÌsF©æàÁãÇDš®çíLK¦™ÕÌŠÓ”2i/dÚ ‘|P;·éaÛaÿ¯‡8QÝ÷›‚×íôì®.êðuIb.–Û¨Çb?ÝS‡aëé”I¸H‹4ÀK ·Ú0S˜Ù†ùç8É@“{ÀºEr¬Q 8è]üîr•l'ýw8öñTäÊ»¯¿ÍÞIâ®,ãÀkÄÞqj@õ&; îÐH5qîåqGީ׸w{1?<ìÈש½žå hlgcÚ’å\Ïv‰Gs†åLÉÁaZŒ_Ç~¹{Yo4q7²YjËç8ÅÀ$dFÀHüJŒ{Í7¯GsжL©ô<œ‚Á)ß$Ùøˆ.¸™æü§”Ž$ô§;“&&'ó»ogO27HÈP5[¸Qâ ºý#>íÿB Qé¾ » §Àòe*7=€ŸÖþ&óÄ€³TÖA”H(ò¦< wA¯§õ\!Aô‚›n*Ç_2å—'ìýœl*3Rg™D‹%˜µ§á1î~ef„´¸ôN³Z]³{Œ3¹-£Å¦ižUa€ ò2#ˆ$RG±Bœ¦÷%gFçÓž‰Á3oz§Ž± w?Rx:Õê79í·kúÎH§§Þ3Ü«…i2‚êØ»¹dÒØ“£È-›iéÂcüÝ ý>­7t÷¾rÂÂÔùïs-?3Iß“ûOPö´Q`$+![øÇ?ðçs#N“âV2k’G}(€ãmïËŸz›>[ø,·Sè?.èGNèâx\uØ%¬Ës}'ëŠÓNF®êÚŽjpîQxñNè‰*<§î˜­r‘œÆÌ\:Ìd¶4nÂK'.~ݽ, ñä`&KÃð:J¼ÅX#ã~a -ýW·RÜìgÿ}¿·’endstream -endobj -52 0 obj -<< -/Type /Page -/Annots [ 53 0 R 54 0 R 55 0 R 56 0 R 57 0 R 58 0 R 59 0 R 60 0 R 61 0 R ] -/Resources 62 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 77 0 R ->> -endobj -53 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 120.238 758.283 266.716 770.143 ] -/Subtype /Link -/A << -/S /GoTo -/D (addition-to-lib-iterator-synopsis) ->> ->> -endobj -54 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 120.238 742.343 254.183 754.203 ] -/Subtype /Link -/A << -/S /GoTo -/D (addition-to-lib-iterator-traits) ->> ->> -endobj -55 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 98.32 724.908 142.802 733.625 ] -/Subtype /Link -/A << -/S /GoTo -/D (footnotes) ->> ->> -endobj -56 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 350.487 502.363 391.303 514.224 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#200) ->> ->> -endobj -57 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 291.737 478.054 332.554 489.915 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#299) ->> ->> -endobj -58 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 341.422 426.248 377.075 438.109 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#96) ->> ->> -endobj -59 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 414.904 366.473 495.958 378.333 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.boost.org/libs/utility/transform_iterator.htm) ->> ->> -endobj -60 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 358.346 307.255 450.498 318.094 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.boost.org/libs/graph/doc/table_of_contents.html) ->> ->> -endobj -61 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 240.457 259.434 353.744 270.273 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://www.boost.org/libs/utility/MultiPassInputIterator.html) ->> ->> -endobj -62 0 obj -<< -/Font << -/F8 42 0 R -/F59 63 0 R -/F64 67 0 R -/F48 38 0 R -/F55 46 0 R -/F14 72 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -63 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 34 0 R -/FirstChar 40 -/LastChar 121 -/Widths 64 0 R -/BaseFont /XXCWMQ+CMBX12 -/FontDescriptor 65 0 R ->> -endobj -64 0 obj -[ 438 438 0 0 0 0 313 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 850 0 813 862 0 707 0 0 419 0 0 0 1067 0 0 769 0 0 625 782 0 0 1162 0 0 0 313 0 313 0 0 0 547 625 500 625 513 0 563 625 313 0 594 313 938 625 563 625 594 459 444 438 625 594 0 594 594 ] -endobj -65 0 obj -<< -/Ascent 694 -/CapHeight 686 -/Descent -194 -/FontName /XXCWMQ+CMBX12 -/ItalicAngle 0 -/StemV 109 -/XHeight 444 -/FontBBox [ -53 -251 1139 750 ] -/Flags 4 -/CharSet (/parenleft/parenright/period/A/C/D/F/I/M/P/S/T/W/bracketleft/bracketright/a/b/c/d/e/g/h/i/k/l/m/n/o/p/q/r/s/t/u/v/x/y) -/FontFile 66 0 R ->> -endobj -66 0 obj -<< -/Length1 1325 -/Length2 6207 -/Length3 532 -/Length 7020 -/Filter /FlateDecode ->> -stream -xÚí•e\”[Ûö ÉiIa@Z!†–‘ %‡F†é’P†!¥¤Ó D%¥;DRº»žÙ{ß÷Ö{ßß÷Óó{®ùrýÏu®ó8®u®µ†‹]W_@Ñi UC"ЂÂÒ@em%ca ° ˆ”‹KµBÃ+4T(,%% TtµŠ€€ÂâÒ¢bÒ`1R. 2Òɳ³Gy•ùþH’*:BQ0ˆ¨m…¶‡:bk@¬à@}$E{áp Þ3\€zP(êÔFTXhƒ ÖP;‚TèG[$P⯰«Ó¿‡žAQ.XS@^¬I> Ö¢ ÷Ú@mI…tX-(ÖÉÿSÿ,®æ -‡ëX9þQþÏUú¯q+GÜã_HG'W4ÔFÚ@Qˆ¦Aÿ2§„„ÿ—ŒÚ -ƒ("ìàP è¯ÌE æµÑ…¡!ö@[+¸ ôÏ8aóO ØeûÓ€±±²‘öÃÛÿê矃ºV0ÚÀÃéï²dÿÉ¿»:(˜;ð1HÆ&bÿ~3û‡˜*‚´!°,´B¡¬Í&~{ioÓóÈòHs3Áƒ|Þô4ªûˆºÂÏ,?|Þõ6Æ$²äÜúñ[ªðcøî«”!ž½;è'˜Òz§‰Ò¡ôÓ“ÄŒb…êa÷%ÈaᵟsØ q*¢Ê¸}{«¦³êì-MuY»³GXì5Õ¯>„>—Ù˜}?x=²¶˜DvK˜›aízo -çÕ}QÍàñ×#Áª%ï}1¬.Q×>UË- µm¤äÐå^|! 1óal½+~\)°Tü®}N”³Ê#ÊmÙyKUªp‡Æw…ª±”:Ø[åË«ûêÇ$£>Z»žâþ‡÷Š5"UÅ™OfÙÊ yæ»=ÈAAvšrÜ|H9|æ'†fœÆFáa˶Ùm£ -ïŠ*xz•È„OŒBî¾ÑÚžäÊ£sf˜éD” z}Ř˜'å¸Ýšâžé”·ï§ï+_âQd|lj°%_¤Œfå£0uÂé¶£þ”Ì5æ •3SbÛ|˜œ3@€KcÛí‘ ó6sz&ÎÁ*¢­l®!_u ›•”ö -Êÿ'»Å%§p5ÈOP°™ìJxÕk‹€ ß,î"£mO9o¯ùëƒUkä pmDþø©Ø=1Ú‹üù©t¸zºÜf2Õßb‹SêŠø¬I¤p"Ð7ï°wx UÚ$œàÊÉâ‰Sb|z¨Jˆa6Ãub àˆÀ§9÷²­„ÔyOŸ¶†Ë6(Õ $ån`ô‰íi#Ú?vèyJ£¿yo¹‡S鳩P¾SX„äÆuÖzŠ$Åš• -•ik¶’êQ“ÏÖ¦Iñ^­¦½oyÅ&ÀY}±ô"PhÅúšá€ëªk·[@!J¥|toR2yBs3£„44OïFzË‹HcÂßW^.F3¨¡ +ò¸É÷¡^o"g»]Þ±‰|ª» Îy¶_ã ³ ÔšÎ$ÁÄ(gGR9©Ge±˜ã\®±_٠ܸñð³C2?fyÐèí0šVe™õ‰ñ :/Ò¤á>ïž*_’ú¨¡M… é­ Ý_í1©ä%B*’þ¸//(«Æ$­£ÿé£å¡Bg}Ã[œT"©Kï­oÒ~9‹-ûrvd±â·Ý9ÍU/4ÔMfpŸ5(Ie¡ÑCÍÄon·zѧ½à± ÷Ü\zÜ«YBÚtJ*x^»®xHº Šé[ýðIç.;aL±—ÝO©Ú²¬;£} ¶›/ß–Ô‰Xj¤ÓîJ²UCY´çÂDé¬8H*4(c+VY†ã³Õ‹ˆ‚¦“Í*î½p|íóYFBH,Óê>dâþ^ *Cøvª¥BŸL™²úI£ˆÿðéðÄdÕk¾jÀŽxuAŠ%Wß>ñ›tΗêòÇôWβ]úsZÝåʦ€…-QþæÆå?·zË “R›}HnCßäšrÕ?#-'mK™`;`AÍ¥%@È>)u1¬¢-må;K›ñáY>€ïXŒ¬‚æd ¶.Ë[r?}ù‚?_YÓ¤4 5ŽÜ‹[mf¨¢ –ntâÏv³öb“‹³ûв·Ç¥æ˜4©ç€h¥y¡\¸ЕšBÖ¢a®4÷БòÄ¢Ícˆ>Ó0emGbqô »ÑüŘ´/qT|•ªVÚŠCß1p“´Èo½4ÁqóÓ×ñ¨b7gq¿‡ÖÚïíŽßÛÍ(ÿX¾“J=OÑXïµS>!ÖeÔHSÈ›zBëZ6ß¾E¢U^ ¯s³ð íåÝyãÉO®gý^¸ -V¤<×'ÁpÞݦñGŽÝÐ5E"Þ jÞORø%”^¡ÞoÚ£7ÄžN]Ë R±>˜C&x¹òó5“¤Ìè–ðz`ý™]¶›x÷¨mÍ1ŠñzYÓd4¼ìó-ÌÁ0ó9ë§Rþí X©¯0ôG“Äûé‹#™ÚŠ[Wˆõ-F#°©ƒé d\[Eâó“Àgnu§UÄ_ÏŠŽÍ±DV¶»:V5Ö–³ÙêEèˆÛšy0Ï1\>K[NÅüTîqRØù¶¢¬jAÇæ-½!›=q܉·ÆÔ¢×oØêZ×ù5ì*&˜ãlw.óÁ76mÊ–)ͽ9ò7è"ôúÜå·¿$åáP½¶Û¸v¦7‚|8'Z_mƒ”Ô Ú½'êSJädAOt?a·Î¥_n>Q¶ è›tþŽ‹ã-~Ð+zz1ÓaìËlK‘¤\ y`ÎjsSßœµAþ¥3â¶a1ÕûÓ"ƒFY!ÜGøJÁ&Êq¦ H!W‚âM“àƒiW$T5E•Ïã¦bdôô¯ßËϾŒæ9)5Œv8Al!ìPhSýéR€À•ÅùƤôY!™‘jÒ´ -ÝAˆL»aü6¯ãËŽ©ÆÛ2ö}],¥$ i¢;η DÆ ®Åö\‰ipâæÔCÑ‹×,ÃЉ~÷LøSQ y²T‡N´¸¬T"VOŽë|j^‚¿MÕZ7Œ_©f-Íu|uF¸]¢Ÿµýž;4mÓÀ#”ï Þ—>RS7'8@©Ðý`@•}ç8Þ6MÄ6,_ªÉLð¬2ì‘–øPÒçK^×éðgø°Å#$që|Þ‚Âuÿj+õI¯¹­JçšoE‰t5t±Øa‰8^…»€Ö¶ˆHu«棲g@yº«+JêiŸï-¬¸&;üMo¸ª .ê„•É™Oݹ³¡Ô!ö2ý«[g©|™Êî ñ<ó<ÈAÐ5’á¸ã@¤­¿æ»«ÎíVuVȪë‘{f§]¥¥Â•ˆ3o–Ä8€ésJ+=ý$þZSe§ÿžò}LN|s9Oƒ™þ\̺Õ4)â{ÎWº`üÈæ&3óíJŒqù²mÉzŸíÂ÷üãÏc˜eÛ“ë™3Jk'þª#¬i¶j&p<¼¾ÂûV¹Â}Âw¯K—ÚׂŽDõ.ˆšÏ{e¯T48," ß¹ù÷ß«âg½m#H˜!d`é]Ì6>¿×.³RÕ« Ë[%²5]}TFw-_ÖƒÀõ³Ã#9ãTÆÝÆv즓¥Žùb þëk"v"WŽú|sŽÛÍ„R›¢DWE›¦ £±Ë‘*CJÅD$¾kíWʣ͗*V÷'züÛÔ­¤|^¤tZdÓ³v…\ùChö}Z6„åÝVûo®p?TVˆ­t¼ž®JÛ)[ã»ÙÉ'ûX_jH 4Uº ¡ÏU+_‘y|ìàLÅí«°4fÖzÀAYQYkOûŒŸeÌ-çÕAÇз.I '+]99ÂÇ.BT«ža.q¤òêJPðšû¾*3Îxÿ\WšIóë;!mÈB¦“„êi‰¸šx¸OP@€Z„Dè‡ðž\µº÷ˆ6)˜á $ß»:×8©¦›n >U¶M‘•‡Ÿ?Ö–×eVyIéøš‚4‡À×2UßÒÐ;¥g…Þ`aRMÒ¸@àËwKÂ3Ž)£*²åªÊŒÝ‚¸Ç -Å?647•Åí¾ÍI†5ì3½eý  å¾ö@´V-eȸeÌ— ÌhÇþè(öAH~©¸¾6ëûa2WÂÏá’ úÕ®ø8b¼YBê¡21è‰å[âSÛÚá]hýŠd«’)÷΃Èbzô»únC˜LŽƒR]á;)ü¡‰o”–1áù›ÝÃÏöÖrŽQt&ƒ9ÃÍ+:`»|ãBn§‘ÂÙêŒAüàÐãî§½‘ \Aoˆþ¨Ãô ‡øó˜X÷R¯eÆ;ÃÄy.¦è‚è²Î«,ˆ-5Oœ"·+]NS²'¿ËÞDZg’îG*|~~WÔT 2XµU¤ä7Štc«(³²L×3Ó:Ê [­– I¤„P] -Îm­Š0pvŽ&0%û´Ý!{¹µ¿áéKÛhÐúži*HÔzñðb¬×*¤DÇjý¼àùR]ÖÜJŒeš–È39ù9¯lG‘_÷/Yrqê?_¦ZÓ>§~ÎÄ(»,[+í~ÊŒã¾O(´gÑ`ÔºE ¯yóAâüt`ëÛÛn±žÛü¥ÒËÓû±ê×÷Æ.´(îñqTåjr\ÞGc\Èù«K‹—î"מè-®£ÕN. i‚\yùëÀÐÙ%÷eD à‰ªc•ŒG…ù8˹ÒC/ê[i‚p‰ÞŽZë»R£â_¨#Ä@ržß?—=°S™žºË`7c£·Ð¿Uã\[µr¤ù–ûdús++œ4\ö2¾o)‡’Ê­á–uFQ°‘?§Þnµ+uŒ*TwШDðúá ?VãöûÚD¢çÏX®3âÕ—T‚BM³´«s,q#p †& œÕí$í(`\é„’ꔳAGkË|y=Ét#·< ¢±ÿ©Òs·Y?KmLžÉg2tû°Ü'[Ó»º¬IÐ3“àH:š/mv",Â1…·èÖšZå[éý`¾ÃÜW š3¯’ýößÞB£úáûÏW—Y?Î['˜Â¶0âÛÝÉò£…žšIÔdóÄÉuT í×{ÏyìúRH~:ÿl®÷(1{™%cûá6s˜S—Hn\5ă<ÅY¤ì)müBýt‚‘Vìeúá°ÝÎŽ¡8תoÂSAQ0å@0àÅ5‰öù™Ü¥W4žýAª/¯ÑÓðp{¦¼ x¹–T2𮌃°ç‚’ÀKãqÙ”½–<·ÖQ£{Úþr‡{j/ÝmŸè $:F±sÏ¢¤¢0”d‹3¹]%ihºcñÇÏ4š»_NPïÌ Ð¯’b@¯™¾¢ÇjÄ_ùY漢 oŒå¥|”á«Ö ¾”X/¼kKVrãþ¼ÄÙí˸îC‚¶‹“ ÖÅ’BR«µuÒŧÛU–‘¼ø¼t„^ð]¯yॢ@€9»ÅøÛ|0T»Bž'£;H¨­uý꣌ڛ3£cU"û.ñ(‚—ó~ ¥™uÙ}†ç—ù‚Ã#W¸UVü©>›ò¦·ºÃ;ü?êKªâR¤Î=-5º“¶r‹fóí­dÑ#ÚÍ\‹‘åOX6#o ˆNŽ“Äß_§c¤^©G¶žÑÝ›Kúš‡ÉùæKïËÃèQmÜ A3¦’1Ðú|Hÿ¯ÀÿŠ8Ô -…F:Z¡Hÿ ¬)¤endstream -endobj -67 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 68 0 R -/FirstChar 45 -/LastChar 121 -/Widths 69 0 R -/BaseFont /MJEACS+CMTI10 -/FontDescriptor 70 0 R ->> -endobj -68 0 obj -<< -/Type /Encoding -/Differences [ 0 /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega /ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /suppress /exclam /quotedblright /numbersign /sterling /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /exclamdown /equal /questiondown /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /quotedblleft /bracketright /circumflex /dotaccent /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /endash /emdash /hungarumlaut /tilde /dieresis /suppress 129 /.notdef 160 /space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi 171 /.notdef 173 /Omega /ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /suppress /dieresis 197 /.notdef ] ->> -endobj -69 0 obj -[ 358 0 0 0 0 0 0 0 0 0 0 0 0 307 0 0 0 0 0 0 743 704 0 0 0 653 0 0 386 0 0 627 0 743 0 678 0 729 562 716 0 0 999 0 0 0 0 0 0 0 0 0 511 460 460 511 460 307 460 511 307 0 0 256 818 562 511 511 0 422 409 332 537 460 664 0 486 ] -endobj -70 0 obj -<< -/Ascent 694 -/CapHeight 683 -/Descent -194 -/FontName /MJEACS+CMTI10 -/ItalicAngle -14 -/StemV 68 -/XHeight 431 -/FontBBox [ -163 -250 1146 969 ] -/Flags 4 -/CharSet (/hyphen/colon/A/B/F/I/L/N/P/R/S/T/W/a/b/c/d/e/f/g/h/i/l/m/n/o/p/r/s/t/u/v/w/y) -/FontFile 71 0 R ->> -endobj -71 0 obj -<< -/Length1 1260 -/Length2 8064 -/Length3 532 -/Length 8858 -/Filter /FlateDecode ->> -stream -xÚí—e\[]׿qw-hqI‚[q-îN±AwJ ÅŠw-îÅ]‹CÑâRhq -Å}xîWÚyÞ3Ÿæ79ùpþk¯½®ë¬½ON#½º§¤•“DÎ æÆ æ ¤U´Á ˜ ’Âbd”†CÌÝ N0s7ˆ0,$Ä ƒX<<}…ùø…ÁüXŒi'go8ÔÆÖ À"Íú¯$€¤#µ4‡TÌÝl!ŽO5,ÍZN–Pˆ›7@ÒÁ ù¯®Mˆ+î±âƒVPK7€Ä -ÃþË“"ÌÚ ða+wçÿò€À]ŸLXþ±É -x2iåsðXA¬±€ªNOj'/ÿ7lý{q9wUsÇ•ÿ§SÿcÜÜêàýŸNŽÎîn8@ÅÉ -‡ý{ªä?Ì©@¬ îŽÿ>ªèfîµ”„Ù8@œ`^.ïÄ¡®rP/ˆ•:ÔÍÒ`mîà -ù'Yý»“§þýã¨òJVRZ‹ý?—öŸAus(ÌMÛÛýÉþ‡Áø©Ip¨ÀôÔeðSâÓñ_g&ÿ&& ³t²‚ÂlÜ|üs8ÜÜëi=À €Â¬ ^ˆ×“c ÌÉíi -à©3þk'8Ö¿Ö•—´õv¶…Àþÿ'Ä'Z:98ý‰ð?%Iþ!~Pê¿IÊý!Pñ=e*ÿ¡§ºªÿM‚OóÔÿ7¨ù‡žªhý!^Pû €zÿMO; hþ‡ž,þÐÓuü7AO‚V!„ü…O¬ÿÂ'6á“Û¿ð©пðIÖá/|ÒuüƒO „ý…OºNá“®ó_ø$ÿ Ÿ„\ÿ§~ºý…Oïþ>Ùðø ŸlxþAî']ïðnV))'/_N0?€“›ô/ü!~!ÿÿ=Suq‡(Êø@ ·à?QKw8sûçwâéNø/¶†>Ý<ˆÄkaÎÉRä]rChI€lþ×RTVWêÔ¢w£!u©"\û«"D3ðÆ míoÂB;hAÒ¡RÐÊšo¢AÒoÀW 2O8€K𛦅þËrߨi0ûK¾cføöÝ–s#û¯Åççk¨UÊ»`<ŠÃ”’os÷§öcë Ø)VÏ$a™d·*'BtwÖbGnäò> ’§?,Pô¬LÙ/㦠-Ef« Ϧ¾¼Ã±zYoŒaÓíéô³„«ë¶ñ鹆<æÔSçUqŠŠ\z hì¦ìP‰bèø¥Ñ³ևʴë<¹L†ƒ¿Î”œëâKQò;_QÍ¡l„‚M:2îG(‘‘w¦w@ÌcÂ71Ø3ÖÅ;Ãx.V:Ÿ¹ofxƒÝ>Ì䎈KŒÐ™ÚP°“åÌ?€®ŽÉÎëG‰±”ГŽÐ´¥€-:» ™(r*)>}S=7¡Ø„\:ã¾ÁùJ=\/7ÉuªN²q¢¥›LÉv‹›IBÞ’½˜RèM¿Nætûy ÿîÓ…ñJxz‘š¡j€µx®Íð›mØTeLåúnòý'ëÆ[kT¬ -îÜ—~,A÷/#WžÐS6:ñÀî.xËêgÂÌ. 9 -Ì0c¡l«—Móí–~ÓGÍ3mêV+ÍÏY³*<ŽØ£3&˘*Þî²¸Ô ó¬‰QELZ‘ä0ýèë1jï’`oqvŽ¥¥EÝÅá¯fá†Êú9—Wëî_ã¿PéúÔ:£³ai4'Ô«;ý±­Nsƒi±Û¸|+ëh40¢HR¿¬‡×ÏΙR«r²Kã¬ÑÝ<­5I4V™c9ÛscÕpãpbMäÖ¾Ñ^¬ü‰7ãùÞŸ¢m*:­Þ£zãË=¶Ù7Q½Kí6ôý¡Nw*vnÙÌTAóƾê…()6ÂŽñK'Õ;¼á£p¸˜Ã¡Ö¦ÍWKÎcÛÊãÿ[=!‘š‚ޤ+3î’ Ì½¾þ;""[Ž¿ÃCRM -ÁÌÒlIj3Ô+fs[Ĩiú7:°SPœW½Y‘åÄPÇ3T¦}Q/ü—*íØÆžôÑR¢ñ×Ê„P¥&Mϲ¦8 -ì@yø»ÞÇF¤ž0W qýèöNCnîRhÍž`˜˜Õ^½ÄóÃ…Ö„m/Ü£Ož¥dYÖeþ¡èu˜æYÞ¿¥&4>+Ç­”û©û-1ïEÀgvÈr¤¬U+DLê˜Ëä'¾i·×Ñ€`R›H¢•ÌÒ:ö"“1È;6…Ë%¨µ¿Åíbå†+ºëŸh]}×Û¢Nã fñ èXx†D5aåmqÑW=§Ø1¬Bë -©ñ‹uîÏÚRÿI¤–¯QeîNhv1N‰öì¡D:yòWɺåÀnyˆèðöË_ân‚»ôí3œÄÒ¤ *ÝìyÎÔÇ!yèæ¶nßhÌPÏá^JFz‘¢æu‡ -½bˆœK…µ(·È“åÕ—b|;® c‘ˆ9Ôšžu ˜^žøHP¼d];ªwMôx†_°Õ·AÓ·¾ áµ›ªWJ[Ki6+ÒIðTjvTÜ/ÄxàÂs™þú}f Í¢˜ž_%m)ÝŽ€6õj NußxâáµVí Ï™gº<‚Ü¥l;Ça3Ö!LŠÓ)Ð5š|ëèÕ•1û|?æ.ò ½«G¶~`ÁaYŽì}àòȃ ¢ŸyEoÑKËÅ›®¯ýî¹Ï.¶QuôÔ?U - $…’ÚõŽ!àxàÕ˜"<®iËSÙ"0?W¹EE‚- í…ׄ¯=GV[7€íì•1´gówŸ¾bØüÂI‰÷ -û’pç{¿7|é'ÝÎåQ8ÛòáUu²ò×°mÜÀp’°é]S%qTñ ´Âž·ñ¡_ I{¬ˆÞ8N ëu›t¤ßÙúÞÇás+)ì)6É?!YÞ/ÊüħîÇ´bŸìm ÑÞá*6)SSÌ­Tü$«€+f¯Úì<ªÕºA?;Ìù¦Íê*dYQpüòAªß)©ŸÛMNbÑ?P¢ùÌþ¢ÅºŸ"–¬þÇÛ\bå9z¥ÞÙ{š@&z5|éò -T¥ -%žñ€:Wÿ•^3ýýúRYí«—ºeêÂŽS‚øº!i@Ëý.8šöË4\ôXiÕ0ù÷ä:·ÐÆ~©ÕÙ¯ñ ¯NŽ xÏ$|ñ :(Eöxµâ&“L+=ðêäÁï}0ùj”@ÄäHü·ˆè:¾„Å+WZ\¨§=ÑAÚ‡š¼Ï -=Zü—GdCÑIŸ-ƒ}"ƉÝòÈÓh }ø‚P^ßQãÛÊ•ÎåT0C{’iÓC™\ÞQÚæN1O¿ÅnFØ~#S\bw ÛL´°Q -NoNgÒLQZélÃéÊt­<«£ºE§äÂ=°m" ßZ &¾ÂÐPêµ}Ñ»;à0Çw£%2ÙÝÔíú·ÇKÎÒV€õ2©ÜƒF&T6-Î-ÈÍö5 EÏnš™ï¡á¨âæî1õ~»(9]¦§àƒ})}ú‡Ÿø°ú•Ô”¶ ëŽ@Þ®Ðl4î¹Mm¾ÙªÿV½'GI>§Ý+¦°gZ‰c@}¬$+Rõоü;ZÚâ#¤XʱΠ-ºÞj‰*Í@‹žJ ù4%Ño(œȷ{Ö¯UxnT›¢/v.é•m Á‘‹"ü ‡w|Ÿ€†Ë¬ï –1ºê­*Äü9syg8~ÎY¿žæár~Là«\ß ñ¶|Þ$´ÙIíùð{Pâý{²¸ß6¦ïÊöαf\’îø;› „}R´Ç|;¿KZQh&â1DqUàOk\7ÈS7©¼ãUM$¤ðÜÖ½ÈêçlZ<Û"xí´¥˜jj>(@+3yj^ðâp;È@a¦/¿+$ÌV¿k¹p=´a~É&Üe/TÊȽ()yJ=ž´Uƒ¬œ$)Íî¯,§ò.<ì½LΈv1Y7± Ö[Є6 âcGÑ\dÐÈ_„l,PÀýýÆÛ>{/£+Æ)°-ƒP(9Í^ ËÃwVgSPF š0-]E+›÷´§„ÍS2i5• v­¶ G›”¶¸bbeñ‹rõyGÅã(@xj6Âù¬w™ß­KÉ!^'•¿ƒÛFˆ™¿ÈzÁX.­zõwYáyLxþ>a¼úV÷¸©äËê þr©²ŒñÇÈ'¦xð³âa†aCMåÜô¯Q%~aZU|e“¨#)úã¤)Zv»zår}ëSßå…-G¸ôû¨r™’¿ªÆ’“£új½OŒš0ÇËÙê†.O›ùÌñÅõúðRªM5죛åp_¥ÓÜ‹8Ÿcîaü<…Ÿß5épXÝ,1£Z=äÓ×ûj/Nðî\®Eš€Á$g/ 5îxõ ‰ºv%¼ßR³ˆh¹V‚玺å}¯í&ïòo«éÝšÍߘת®´óe9JŸ-[ pªiCSW::ꡈËiuë)z(˜ºCÌh¸ÁFk‘$+³/ª Åi ó› bú1“ 7Ó…}ŒAÑ”ZȧÈÍêðÑž„d§^®ÀÁÇp[Àø>ÞvÜ;¥š¢ª±r459‘wwȇ;J'V;Š_'DÊ´„|x…®Øî4Òx "¯—å-ªÄv"÷È­5±5„_“’¼Ø÷ì¯Ñꪜ|C¸¶帥Ü"ðèLøÈo4‹­|Û+l™ñíêTÕŒ¯¹º}ÌóÖ%Þ@ö^ös«Um¥?T…oÍùe$¾Ä‹ X|ÄœuÖºµ@LÇ-gã!m ƒÄ愆ç ~׋LÏ;2Wǽ°ýíÛY èÞ@ûýZ- l\¦ ‡‚êržóeØøTà¹Ìþª¥úá·1 -© ÍüÜ!“Ê Õ­w’5ާ’½ùoáwÞ¤ÍqýË -¿YFõ•ª¥ƒÖà«£¬B,bu¨Ê:¾¾úiþ¨s÷ƒ§Së‡m}Æ %În ݧNO‘}Ú±ŠØîûáœYÉ©™RL›b¨CXŽõáëI,øc¨`- º„?N‰“A"ÏAæÅg\Oþ—Å!-«$Θ¨æÉdKUVy#µã˜W[Ãc´ìærð4“P -|Xm˜’º»ÅòÂzˆE¢Íyô{µšfW–5ƒU>5äÌÒ…ÅI<â•9Ž“ŠÅË Ýn^ªw¯.ûû óêêT©èÂ>³´¼ùhž_Š[8f{ƒœtË|qÀgˆH™è¸™XË—â–!× §÷?<ý=}“ }"_Áô|¸+÷7e]=Yp_|å•YZ›[Å Nô{i«»ý0D3,aÕaÓ±|j²Ï¨ÁÎJ{¾ç´ÔG#“i –ÄËŒ<Ê•Ø)5É[ã š†Ái©ròÔŒa_õê"/Û½zç’@Ö “/óÐX¡m¦M°H¤ªcºsÑHª˜|´•æëOŸøä4$3•“`g­$ëD8&PÔH9ÒBñèl@å»®±<Y}{.˜îô£«)M5TÙÁùÜöB¦Õ‡ZHxðOô%Œ -è9`Æ_ïFÆ}8f‚ë?Q’{܃ûÖÕòìƒä"üÃá7âò‡b% ‰Bè‰â€‹pjJYÔéüÔêy(k ïÕ@–•Ö«å ¹<<ÐmcŒdW|ÄBòSfÙ²Äsäa[U7b—vadœÒÙ¯c˜ é´Ò{¡'WÎW&[ÛŒþÖfÊ ‰ÁÁ‡ê¯ëŠ1‹»è2¹—ß_‘S³}Öú5ZŠù°Ê˜k[0ƒtlå²÷,êÌÚ îŒ$?'úÓËŸå휯ݚÙ:÷MdØ›ŽÏ\^ZÎsðcKˆíÞÊû€#£4íû<\ÞctÚ‘ð¤ò‰¨Üùï»\G©{ˆd…j Þ}xhbm²­þîr9‹”_ÁÇ1ª ­FŠ/>'(ÑðuÔs\wîªÖÒI'Q–I«3vÐ0ž'áè»B¼ax3â‘*M¢tøy1ZS:(Ë2Ø\¨Me·2ô*C’‰]² ÛYÑ‘IÌv¿ÀÉ•Þ\õ#7áپì>&¥ºðêÊMýà-ý+?­S‘I3àæŽÿxc zCšÜ>æÞ° -Ké6bˆ¢ž!0°'ó aÒ²A/ä‰HpÂ-¶t²õó)¶kydº¹köo@^ðL¿2SºÕhóB 6ºVºìæEœÃ1ÖÈ÷ÑÌl ã|fáÛÝt² GA¥uÜ´CP„Õ´d—Ú±é×v¸œÐÙ®iñ³jÒ{EÒ/ Q2ówÌGîãœÐuŸÃÏA¢üÆoP-?`—Òf‹®QãJ ããØå¯ºtIáÑ#¢J]µ>[ª]QÈà×6/?ö*ÙÀÍœQ¿´¢½¥ëÒ{ßꢨ±¥naY ½÷Ñ;gÑfTígÌÒ½î³ðQp)=ó½³ ä©‘âwïè2G#tvvÛAÆM_…[±O×N§Ð£…Ó§†i׌Oi«uüŸµ~l?4Uí9n8Í\TaoORuÆŒb6cãehäÍú7Y¸Ä -²F£|nF-G©À·Êü+„ÓWÜB⬭îçK¨ß§Âª;+Jr4Õ(]yŽ÷d¥q’‡X›¦G÷AåÞ”Ðc¸TÓ6ž¶ÀCßÍm¶‘u@Gëëò¢ÂIãZÌ™Çô%åKóù;ííê‘fpŸÇ|a -[Í¢ï E—öÄ3Ï)ø²ÛtÃV']œ~ÎøpÆXêµd-ûâkH?R݃W¡\KK -Ã"dÒ½еÁxwÒ‰kå\áˆQÈ=£p" Í~ÞéÈŠlDâqùÞ):p+ôýÚSƒv=“aKm““‘ZB -2‘oºÌ[l$žÊ©¹S£Ãކ$ „¯JEK,£¦sø>, |ÅK sö³ëó›ûI4ɯYp´ý«(÷·`[ä)‡ ¡väËÎ.¿œÌÁ(î2¾Ü2QŒ§ü÷ÜšÉ×ír:•õúèQJÒIìG%Ô¿.=™ØQå?´(²å Ñ[ÈD\çås† Ñ(I_,•„)´Zd¾´EfòpؽSÉž²º@-ÃnW‡)hÚH+(¿Í]÷2c²þ9É€¯›øeIéÕhçÇ!×Úmr,Òµ·?^²¾·÷ˆèø¬$W£SõÞ€ã}u úÚó{rß¹‘ˆ”‡p§K !ÖFÍÑ\ƒž¾+Wƽ)3œyÒ¿¸ò¦;(&™å¤xFgÝ5¶«ªÇØzû‹j—€–Äò›ôšwh0–qÉ~“¶!–Hñíã i”TÛ Eso±ðò…VLXÚO:2c+¾ jóÐA¤ÂGŸªV£È·,Vžá ò5±”QÂA úlËÈ %€p^›çKsB´ÎE–Ce_šeuW•6Ïì~9ѸҜ²¾tN"Ìý¾V_` h/áE+¾œZNºHÚ}ë'~2žHhWø}™llæÑA -Íë6È[Çùy-yÑQ¶gÌ”(r9«gq™¸Ð•å {ytú¼ˆW•ªå)ãÕ«èF -jR\˜p«ö×÷5ß•®ÈÞçþ€h„µ$´¨ÑœÆbºu{ØÎÓlC½(Ÿ‘ÁgÏüH]O÷-†Ó>>äi‹$òzÙ™JÅü|Ž~ ¶[—)$ˆòúc©ˆíÝšÔh˜í6Ï€Éú´ÞòŽ"†dQ·®³áº°ý2ãNŽuƒÝ÷dy*> -endobj -73 0 obj -<< -/Type /Encoding -/Differences [ 0 /minus /periodcentered /multiply /asteriskmath /divide /diamondmath /plusminus /minusplus /circleplus /circleminus /circlemultiply /circledivide /circledot /circlecopyrt /openbullet /bullet /equivasymptotic /equivalence /reflexsubset /reflexsuperset /lessequal /greaterequal /precedesequal /followsequal /similar /approxequal /propersubset /propersuperset /lessmuch /greatermuch /precedes /follows /arrowleft /arrowright /arrowup /arrowdown /arrowboth /arrownortheast /arrowsoutheast /similarequal /arrowdblleft /arrowdblright /arrowdblup /arrowdbldown /arrowdblboth /arrownorthwest /arrowsouthwest /proportional /prime /infinity /element /owner /triangle /triangleinv /negationslash /mapsto /universal /existential /logicalnot /emptyset /Rfractur /Ifractur /latticetop /perpendicular /aleph /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /union /intersection /unionmulti /logicaland /logicalor /turnstileleft /turnstileright /floorleft /floorright /ceilingleft /ceilingright /braceleft /braceright /angbracketleft /angbracketright /bar /bardbl /arrowbothv /arrowdblbothv /backslash /wreathproduct /radical /coproduct /nabla /integral /unionsq /intersectionsq /subsetsqequal /supersetsqequal /section /dagger /daggerdbl /paragraph /club /diamond /heart /spade /arrowleft 129 /.notdef 161 /minus /periodcentered /multiply /asteriskmath /divide /diamondmath /plusminus /minusplus /circleplus /circleminus 171 /.notdef 173 /circlemultiply /circledivide /circledot /circlecopyrt /openbullet /bullet /equivasymptotic /equivalence /reflexsubset /reflexsuperset /lessequal /greaterequal /precedesequal /followsequal /similar /approxequal /propersubset /propersuperset /lessmuch /greatermuch /precedes /follows /arrowleft /spade 197 /.notdef ] ->> -endobj -74 0 obj -[ 500 ] -endobj -75 0 obj -<< -/Ascent 750 -/CapHeight 683 -/Descent -194 -/FontName /KYBCBQ+CMSY10 -/ItalicAngle -14 -/StemV 85 -/XHeight 431 -/FontBBox [ -29 -960 1116 775 ] -/Flags 4 -/CharSet (/bullet) -/FontFile 76 0 R ->> -endobj -76 0 obj -<< -/Length1 772 -/Length2 576 -/Length3 532 -/Length 1127 -/Filter /FlateDecode ->> -stream -xÚSU ÖuLÉOJuËÏ+Ñ5Ô3´Rpö Ž44P0Ô3àRUu.JM,ÉÌÏsI,IµR0´´4Tp,MW04U00·22°25çRUpÎ/¨,ÊLÏ(QÐpÖ)2WpÌM-ÊLNÌSðM,ÉHÍš‘œ˜£œŸœ™ZR©§à˜“£ÒQ¬”ZœZT–š¢Çeh¨’™\¢”šž™Ç¥r‘g^Z¾‚9D8¥´&U–ZT t”‚Бš -@'¦äçåT*¤¤¦qéûåíJº„ŽB7Ü­4'Ç/1d<8”0äs3s*¡*òs JKR‹|óSR‹òЕ†§B盚’Yš‹.ëY’˜“™ì˜—ž“ª kh¢g`l -‘È,vˬHM È,IÎPHKÌ)N‹§æ¥ ;|`‡è{G:9;jCã,˜™WRYª`€P æ"øÀP*ʬPˆ6Ð300*B+Í2×¼äü”̼t#S3…Ä¢¢ÄJ.` -òLª 2óRR+R+€.Ö×ËË/jQM­BZ~(ZÉI? ´©% q.L89åWTëY*èZš 644S077­EUš—YXšêé¢`j```añYriQQj^ 8 ÆOËljjEj2×ÍkùÉÖ-YÓ·µ­¬s]|a«>çÏk_Þd?±£nvfJm°é¼@Åô’%¯>ÚÚwX<û¢„W²õTá¢-’½~=q_ ¯ÙÚµ`YÄ„Óýz7‚Å+›»¦ñþÓVåy¸0lÆœÖGÒVû‹ÏêTÖ¹ùE¹þϼ”NQ‹÷}¿w[H+h’–’”ùÍìwÅÄ+ï>¿,ÿiGýôã¶ÉïÎÞòñ /vëR¿˜fÇô%ñۮش²‹µŸ9¼òâQ¹DÊÿžýÑod;”ÚU? ^Vñµ«Nºúú©vñK¯{~­ñçäÚ/ëtôî…Ã-Çé÷7¸ï“õ‘9ñØ8ã·Ô m¿i"é÷Œ™6=Û!y:ëIèÆõ†íÿ_°K-­û±,1{Îö)².oª -—ï¶ý*Þ[«ç½mFäû%»s_Û-j(lå¦sÿÏùœ~gغŒ|K·~›¶#£ïµ¾øÓ·&g®]p_ò¸!—GrnM`ìv®^ÿD·l½ŸÞë>Z`.x‹“Yh—ý.Ž#ÁÇ8©¯Øw6O~¡—5“{Þ„U7¶ð807ì™õ…ûk4鹇Wñ»5þô öŒïùfÕŸ”ÛV¼ RÅ—÷mõ‰_A¢ëX¦¼OïjW;[Ã(Ï´ÿÇê¼uï,¥n˜ q(ï»°õÆA®æ…Ëü+Ì»·3z^›"_Õöûÿ‘Ù“O:†~ýUûI¯H$P†kR¦½ÏíÏ-‚©¢áúº×y'y=øØ'sµñó‰BˉêÿcÙWdtDÇ?û:`‡‘µªñ½w¦[K½ð_°È€BÀ5jÀ°0 9'5±¨$?7±(› k)xyendstream -endobj -77 0 obj -<< -/Filter /FlateDecode -/Length 4544 ->> -stream -xœÍkoÇñ»~Ñ­Õ†›Û×Ý^ÐpŠ&MÐW£ýÁ™:ÓjEQáÑvÔ_ßÙ÷ì㎔¬ A™¼›÷Îìò‡ ºjà?ºêM¿êTOÚV®6»‹fµ…ÿ?B´DÈ>W^®£DÊÕšuDõÕñ´%=Ÿ.H¯¨¥¶îÃ×h -s0.V뮥¤ë4ô§/.>þL­zÒ·|õâõ…q/®.¾]={~u ÃŸÙ¿×æï}Þß^®Öœ3ÿto¾òÕ³oÍ×úÊü%¢ñ`þø{@°Ó½ùçÖ¾¾³Ï,‚é»ËÕw«_^üùEX)k%éh¿Šë,øM[FÃáƒ$½ø©ù-$Q|‘ßâ—Âï#z2àUnKN¨jWq•%·;‚èଜµUvÛ7Àî¾'œ¶Àm"mDÝÄCXvv¹R²‘uðïëšã×T.› -JT‘U×í` -šdã ­¦ÊùŽVqÒPé¨úÛ¾ü»Ë,ãÙPj„§ØÐ˜¬¸Ei”Cûâ]Ð¥v9-Ôâ`0ó*7¼þŒ\ÔœƒîmÜ“q»? Ê4ãìDÃ-B*¼r?˜Þ¢!îÅnÔ$© xÏ-ˆ{ ,³$8ˆï½ýg Ô¿Òr…ãf°ÓLa¬Eí8rïŸæPCàÕ5ÒŒíMJǼêæãÆRôÆ.'L³íä"¢”ôÒK~³·3lÆ;lyzœJŒ^(= vŽ7Ö“:¦„ANFxýû­›v¸ñPÎÁNoÖO‚‚µ¹°^Û¶VyK¾Ó–Ñ$™V«)=¨ïÑ?{知"«†€Ï³DuªÄpD*À¾ hƒªžšac©qÿŒˆŽ©F†dð‰Ôà.×Jõà³ËÏ>/Œ·È-[Ž ’‚\vÃmÐ -3ךÃï2•p´§¶…¥·ÓÓs=ëûì¥}úk3ãÆÍ÷»T»Œqñ¨"& ©&óŽ&fUDd^Ÿ™ìlKNÆ çÀS[ñêoÀ&ß,ŽÍч¿µ4ò´ŸöZV\kJ!«ÜnÝÜNVkos$~ã” žp©ÞÜ;¥×|ë?Æd‘Ïæ†Íæ-ŽÜ¿ûÞ›áâÿÆ«ÀÕix´Xú{»ª=J½R›e V-ÎXžÅZ(ªyá(8µýn 3N­Ê÷$Y±ä½³’rSON$V” …¯#)\“â´|ØÝ!Y|ç°Þ{xç)#_¹æ× ¡ãÖÍ–½}S£Ï¿ü‡B6a¼±!Hµ â½Äqè™ôÑxR½~u -kœö~¢íx‹Ç]ûf x@k;éŽl‘‰ìZ'»·h%Ã+Ì}CXšãšèaAÿ‹¨¡\¾J—kDg6lG?Ú:¢>£yòX–•좯 w˜ÚkDsÀÉ¢gÒÖÔ2–$^f®ÄR“"Ùæ„™…T²ûâ! šmÎʶ£¥±rÚ!Ñ ¼+æŽÞ‰Ñ“úhaÎ0cÏk;àå3¤q£çBŠe»T͘—Y‹SÁÝ8½¼ ÎBp°‡÷˜‘7)¾Ç$±9qÃÑÓ0ŸÊÁ^6èv–ÆT…TV0òÉ´¶x"pØ‚{ô ? 6ìýÛH¼F‡ä°±*ÞiÏ÷ðµ×~“hL’NûAǺ/0ï¶adÔ"P4„•ZRw»‰WxÃ7+,ôB;aŒ kŠ4ÒP° “|éý,ýÙî•IÆ«”šývLjbXTޤܕõ‡Ù¾~ù€z¹Nfm}˜¥}A‹Éó÷5ZïMp ÚO‹ÇxS…´yÜJ·¸'¨¿'=ASÛ½C[I×ÃÃ_®ñl¸U(øB«EZ[þ•I–oG϶Õj^ôXEoÏlsp¡ë÷(líÑ_;ÏÍßOÐ߄ɩ:—ø+Ù7…`Ööµ€¢ã´{·Ÿ¬,X,•@ŠÙÊû¬÷Uí6]šâš1 çã&ÿ褒˜fíäZô›Tˆ®¿‰dM]åY#ÿÒ|¥íÇ}¿úÝ@Ìnr§Ö4Ò£ £5© šÿ¶êô¹Á¨ÿwJ•t7íP„îI¿xƒ©c&F}w^ÒŠ^k|ç¥Y¢Gǰ2ee rÞ>­C*Õºm ø•|kŽ}JhžÕÕ>¦Á¤Ûv¸P(bÒ¢êhEÌ”‚(nJÓT;;Ú‰¡ZÎÒÓ 'ÛÞNCdKƒ† /Ô±â«;Úƒå-”0³.;xkd¸áèZˆFOi5¿óEÇÒõãr˜ÆvlIæ…Ïo޵e»‡.’¿öèì¡áœøå–¿÷û -«ˆO¾0ˆ›&ø Géö܈ö! ªO[Ó·ÿˆ h0Û-¶)ºñ‹lšë›&FÚ¬¦:ð–ì|.í6#œÖb¾!yÄ&¶‡Ï"¸:Ñ.p„üÌòú`,â˜N4›**BCc=íùH°é¦%Råg Ÿ''ŸQjÍ[–JÙÐvSžn\»éÖ Ù# ;½ñ0"–·¼bdña¤)‰»óf¤.‡j{—b›1Îè†;$GÏŽ‡Ä‚%>I¾ñ!¡1,hð’£PáøBeÓàóG¼½¸Å_Ðyè^'b÷ìÜ›£ƒWÕÎFpÅ_af¹ ì¿yE¿òç¶z<Â0ŸªMû]øŒW•B#MƒÖÖ<¥Sf){ºé¼p"u´ ë›§k ®ÊaÅU-›÷ -¼¢édãœôJÖë×Ñ-#¬—)ÙË\-î…9%¹˜ßwr K„¤X\ârÄN$›Nk*‚é.6_:gˆNV¶â,; -¨ n;1u½ÿ›ëît„w±.‹1ïP<ª6g61~}ä“ŠÒ ÊS[¹vq+§×5“«ž(óà=rh'7ÑÔôÈ*‡èҲȓ« ™‰[ªÝáµñ*r]­LëæAÆ£ªh8ÑE¦&Ùãelû}¾OYQIî)iÚ¸ÌÀ`Hœl.òÀ[H•Ñ3¼>Xsò>žéó§³qŠ5Ie´T;Μ$+Î6ëá¨e¾þÃbа)d_Ô$ ³Á2FÏÉx¸CÊÜsšf`Ú™9ß7gyçW58Z…V^Ò‡°Ôš-v 6ôimQ´,DæcZψ×~÷V%ôæÍ>xóû -¥mC*õàH}œ§E·~Dlp—WYôăgØ™Yßüñc–f}zÕÅ2¯›I¯`˜×ÛñXÐ5£º.ç¦=Ñnmæ¼îÒ™NŠÏtÚ•È·oÐáq ‘xDý Þåq÷áŽAË= Ü8Z:Â)ÔÅ»üÌÝ»áEµ®/0ASoˆòÊ4sÕe?Üú«Éuz‘¥•Q옯¹6ãkmSM€2dK·˜š9ž ¥jí] -1åy Ð&È»9…dO‰“.,ô—'.RŒ®k®P™ê¶!ísl~h—¯ßý·”“^Ê}%[=‘M¶ˆ<]t0K¤çxâ =ÓòÕÄ驸§îu÷ü!~_;êyµ1oqŸŒÓTmLmåÊÞ(š6xûŒ/…z:M3JÇ–¹(oçCÍ5oH‘û@FÇÒ·Lá2M7i71¦™áã]Eà’êu¢ßëp—×õØLkI Jð½Ÿtá§@òyÕëFKóôqj`Ì€ÖÕÀmÓ—Î]ýä¾ÑˆÛ*3W?õôÔ²ƒƒ³xtQ%\GŠYSp聯y¢†HOºb7WõÆÅ•—J|‡ô <«ø,*PŸ5?¨ÿFÓ\ÛÂl«GL`·ÛviCçMÁeà°3×ežÔ wã€6{ªrQÇIPç6 ·HQz¬`Ö)„\}‡f…‹€/É=ô¸ÍëÏ•Œs`¬Ñ<ÆÇç¥Éªv3ÓLsîd•:–xS¯¦FþɈ¨F»‚=ß#u¹AŸñÞç•®´΀¤²Ž(t‡<B…à¤íUžŠ˜õè-•±k6ÞãWké*©(HSÉž¢RL°Í«Z;GOW¹ÒWœ`0ká-?uÈA¯xq(Ãè~…­ã¦XÍúŸV¸ƒÍ]õÒçN®Ë‡œ½3—àa#¬.o—:˜¥5qÙÖ±lMþüqo¥½qðÞȈù -­Æ;£6ì=W§L£µ‰H ·*ñ¹<Á÷Þ(èmž}ྚIïQö`6Uz沇™ÔŸâFA:žÅe -aŸtÆ€_½ž½ÔV½Óª¡]@ÝnÇ …Sî~uÁŒ ?fþÎaX4M¼ƒ $§¨xK~~czbLg0ÓÌéH3ësUˆ¹S2ÉÕ˜j³SFõÌ)#ûò,go&*zSæiÜöš¯(äô¨‰ Q±¡}mаÀW.-÷–s4ñlŽcðœ¼Y?•õ<¨@Ю‰Ý¬F;µ?ç¬×bw«½Dš $: ¦ÝDWkû¤t±î7‡L ?™óëN—R+GP̸ÄÏéãÕxžÎ¤ÚÖ5&ìÖ?u^[×ÕbzænêþÖÌC™ù¾÷(7Î%ÞPw„ÆôèÃ1%¾t]T,’jÌ3WÒòa ®ø'*®J™lŽè§*ð¯?!—¶hs'~ l^»^ÈðÂÑXTÙL‡F$s}æO]  ™²<¿Ž•5ÄæºW„IµhÓ¤> -endobj -79 0 obj -<< -/Font << -/F59 63 0 R -/F8 42 0 R -/F48 38 0 R -/F11 80 0 R -/F55 46 0 R -/F50 85 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -80 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 81 0 R -/FirstChar 62 -/LastChar 62 -/Widths 82 0 R -/BaseFont /RZAZVV+CMMI10 -/FontDescriptor 83 0 R ->> -endobj -81 0 obj -<< -/Type /Encoding -/Differences [ 0 /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega /alpha /beta /gamma /delta /epsilon1 /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon /phi /chi /psi /omega /epsilon /theta1 /pi1 /rho1 /sigma1 /phi1 /arrowlefttophalf /arrowleftbothalf /arrowrighttophalf /arrowrightbothalf /arrowhookleft /arrowhookright /triangleright /triangleleft /zerooldstyle /oneoldstyle /twooldstyle /threeoldstyle /fouroldstyle /fiveoldstyle /sixoldstyle /sevenoldstyle /eightoldstyle /nineoldstyle /period /comma /less /slash /greater /star /partialdiff /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /flat /natural /sharp /slurbelow /slurabove /lscript /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /dotlessi /dotlessj /weierstrass /vector /tie /psi 129 /.notdef 160 /space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi 171 /.notdef 173 /Omega /alpha /beta /gamma /delta /epsilon1 /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon /phi /chi /psi /tie 197 /.notdef ] ->> -endobj -82 0 obj -[ 778 ] -endobj -83 0 obj -<< -/Ascent 694 -/CapHeight 683 -/Descent -194 -/FontName /RZAZVV+CMMI10 -/ItalicAngle -14 -/StemV 72 -/XHeight 431 -/FontBBox [ -32 -250 1048 750 ] -/Flags 4 -/CharSet (/greater) -/FontFile 84 0 R ->> -endobj -84 0 obj -<< -/Length1 776 -/Length2 1036 -/Length3 532 -/Length 1599 -/Filter /FlateDecode ->> -stream -xÚíRkXUFÅGÊ@¼ZgÓ VÜevaYvpAV7Xâ²¢rIÖ™³01;CÃì¶Û"v5)3 ”Œ¸i -’b)—G5e‘´ ÙÊ ™‰ *&xk@}z¢Ÿõ«§9Î÷½ïyÏ;ïùø¼è8¡§—CM±B±H¬aZŒn¢ŸÆ@KÐÔ| @,—ûƒ—Œ$øT¦ú*¤2„Âè C¤¦±À+L0D’¥2¦£€FǦA§éHGcd-" $I;t"ÄÂLȘ .BÄb€ –ÃT‚B|†<©)= dÚ¸1ã d‚L&g -x ÛÎ$NS¤àPøDÑÜmóòoØ)®2’d”Î0$?œÔßp -´!ÃÈBhh2ÔHêbøÈœâ„Ñ0U³:’À”T* Pì'Býõ‰La†x4Ábi@¯#3ápRøH'\~Ã>|b” ññÞŸvŒÖ«µd@€þÉ®ÅÖ\H a‰¨EÅ‘[OvÉ#. §0'¨T ‘úÃè,7D\%V1 (š4sŽ}DÍrG—Ì - §dè]ý%À'uhÔ¸°8ùûŸ„†Òf«ÐW„)§Œú™]ñWâ"ŠxÍÕó ùH‡»˜‘a ÅÏ—Ò“ZOpÁBh†bo£±ÀU¯nª^]ž^v²b¬ szÁöUÇäì-]=8ñ Só>wÃ5ÇõUb§Kþµˆ/|p½ô¢{µ2ËfóÉiwµ==IPòIܸ^ìjÒ+£›‹š?c(|÷²ýù®ŒïÞfö_0»;òŠXVê~mcùÙ¶û7³ÓWž¸hwތϼ”$í̃ñ¿^ØðÍ`÷ºŒ¶okžšôI¿Û»ûás­é?=] Ï-ÒŒù¾ èÞxT`Öwœ@Ä[ÒŸ·/ùLþRœÂiºÿ™øâàðl¯`Ip]m„¦Ç©ó”@ÞÉ+xªUýöŠü…‹Õ‹n{T”LÄÊ=È ÛÜGÁªÃ †`êК®ª˜·'¦W”},ΨÉãǦ Üçߘõ¾ã­ä»wÏÿþ0×½±³ò¦í½Ø;`KˆÉËûªà8ê>öôZo©.í£Ë¬2dáyçy¹M†oC:²êîhÀù÷oNjÛ±v¦]‚\Q 6ÏÑ$xYkÛ˜nv/=BÍí(½þÛ‘ÆÜ-’WTa‰çSêµg½›+÷,›ïV¹Æ1ÙV«R•ͪu¢Û;C§ò‚ݦNvQ&uiAÚzû¡Vó†î´†¬‰ÒÁ;þ…­÷/}—¿ÈVsm»ÿŒì±—ÞñH_/êÖζôŒ9Q™b9Pù•íØÏM¸6K³)}gyDùjƒ¥O>>¯B^u]<¦8«á–²ö¨¾ˆÙv{E¬ìŸ-hâ/k©ìc]6Dß-M1KCêS ÕµkÀj’Ô¿¼L˜”ú 5x{ìÖmÖVööõ›ñî2DáÜÑÞ)wÏ#?ûáªÛí ŒÎ®áµÇíÔ劂sÇ.òÎw¶ºg-ùâÅàF÷ݾ3/F(qÕk­(¹Ô{ݨŽA>^Wj¨œÄÇ'u5‡êR½ìÓl·¯Õ·¦Q¶ºŒÜÕ*–ÿùý¯Êòã}²»Úçíõ籑wJTÜ‹êjr¶ÃèsŽwnæOëêgÞ*<½P¶¯x=òSItÂí’Á  §oºµ\[wâÇý¾½æab\^ÊT½igGÄKé‘G6„žÑ/du[Ww±jj__„ûzçPKT´Çþ QIÕðæòõ.{ܲšë“¼ÌeßÏÙËÚ:«4eFNÞœ­c,È­qs¯œh¤æ²Ÿî½0pT³í½R[µyÏè}WžËImíéuü`NCò,Ù¨ÖñãÎeN!˜0'öŒ°ç)bëMîä -'a÷!oQË/·±_N½Õ#°ô*ïöÍ)̽øúÅR‡µWO;ÚXØv=䞢:‘Ø®Íóõì8³«¿Dåé»qÿ’‘Çv<¼÷ )&QEñ´¤­ |–`˜RT—Ûôíi¿›ÁVYP¨iJ~ÿS ýQ5¹8[äÂ[ØòòòòOÑø!ÿ ü'0ê–6è˜täŸ'Yendstream -endobj -85 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 81 0 R -/FirstChar 62 -/LastChar 62 -/Widths 86 0 R -/BaseFont /UDBJWS+CMMIB10 -/FontDescriptor 87 0 R ->> -endobj -86 0 obj -[ 894 ] -endobj -87 0 obj -<< -/Ascent 694 -/CapHeight 686 -/Descent -194 -/FontName /UDBJWS+CMMIB10 -/ItalicAngle -14 -/StemV 113 -/XHeight 444 -/FontBBox [ -15 -250 1216 750 ] -/Flags 4 -/CharSet (/greater) -/FontFile 88 0 R ->> -endobj -88 0 obj -<< -/Length1 777 -/Length2 1024 -/Length3 532 -/Length 1586 -/Filter /FlateDecode ->> -stream -xÚíRm8Ti–«Tc]‘"ÕêµÒ2f0>ƪ|/%B©ÆœwÌáÌ9Ó™3 %+¥]­¾FtQZiô½”ò±v¤Ø-Ò®ÖD¬¬«RÒçÚ®½¶~îþÚkÏùsîç¹ßû¹Ïý>fA!6î }œ²á²¹|ààçÁåp8 O -(”À½ä®‹‹#ð—cÀÎpœø<þ xÒDSÀÒ“5FrîH¢B”Jh ¡!„…T"¸c;!ÁPÉxˆ°\.@P!¢a Š3lÇLùá"8½+#réûV<$e´)`9n“h“c‰"†ír‚ži/ÿ†­Å}ä¶\ “ÕGÅÿ¤©œ‚$ HâRÃà;wöÑ?J€¡Bw<ƒÀ†ëÀæ8¼«£2T‘ ”ŠH€Éàxâȇ>èøÆ]Ø®ôòð ±~µãÝ ŠS¡‰R8ÑÇ1÷/L‡D¢ -Îas8\šH¿ï¿"?˜æ Åc€ÏHRÈ —ˆF<°‘ P -´e[6NPô@³ ˆ’1v¯ŽvÀ6flÕè¬èãã_ñð m¸<`cÇ£•í¸ŽÀ‰ÇÙôwâJÝ ‡~^€Çqv²w±¯ -å$ qj|‡è˜ÞcJ' ¡ -·¡ëÖØ‚3_–¦x¹Q6‰%›[xl«º:CUèÊøÅuúäÙ–PhúØ Ã =®Ÿ?¸´ÜñqOnØb›ÑnР7ƒuhoÈä!á@Ä:íFe}í4ɬóîKÏZÝ1Ú_=éÛeý\§Ã&ƒÛ'–Þ¾õúIJ\jó½Ý=ˆyO>#RyqY\Õוóˇ¾Ä¢£¸Ñ8bïSÃ7&µ?·ÆÝÕ+tÙ¡ ÐZš.qè˶xv]¶Í§±»g¯u‹KÚa‰"“ëY²ñêw 3ŸX5çí\{²ÖüÊbfñtøÜZa@÷èäFÙÉÊù>q 9ùíš·Œéå+ž­wœ½åÉ -Ã53ì ŒsÒêô)Ý%ss?ÉgN»y|Ñ-C‘=‹û|.œÌÛ²3,ç›K†¶Ÿ¿}½:}SdM>“mírÿY‡¢÷/9vù“¶èQZÆo¿]š`ªä}_½4Rw}ºà «JpbeX‰v¿¦vbέ{¾Ö=¾kyf³8bSqÄ:]儸Y¯\ª¤™®5±zŸjvÛ…:ìÞ ¯#í*Šv]›–:œX—¬òÐ6k8=°#Kß«ê¥6SK9m½eÛã ïÞÏ ¢ âÔg’W{”Æs”š þ ŸuÍ!^™šþU`t4¹ám¦jw¯_}£Ô¤ÖáB¸êbWŽóÒa¢©&ØXcgÆï+y«Nz”¥Î]ã 6—ÝÑ¿Ä~ê|$³®ç´áAé÷;gzž± ǰtºÁ:ÈJýHÉ/œÉ> -stream -xœí[Koä6¾ûWèhÓ\ñ¡×e$Ø“Sv¦9ì,r[n÷¦åv¬ö8þ÷K²HªH‘ê‡`·›b±ªX¯Š”ç· šåòÍ*ADÞdUݲ,²U‘gkùó“£¢$¢¨ä÷Èä¢`9©Ë2[ ß//þñcÑdT.Êly{a¥””TU¶¼¹øOvùþJ®¿ìõçC«­öWÙ‚W"»Üéñ½Ùå^ï:;þ`Õý ü~¼¹Êþ›-–Âë¬!MÉ•è<[0Jê¼6b—wšx£?É5’ápП»õ´”_†v« ¤B·0õhÇËԮŬ„V -ó|Bœ;;Õý®Ç°‹îŸŒˆ$<Ï.¼Êjá³1Ö€Åðè²L΂9+XvϾƒ”9í>ØàÊ(²êPg°6ØÑ5pYIžUvù«=ÃÀÞèÏÅj×?`‰  ,ßZžÚÒs”’¦(Œçž7þ§Öw[+ÆxedÃB¥uÑoÈkì»^ù‰9‰ƒ2yA•Ãï‘°êTáÆ¨šUT ºWY˜Ÿ`>/ZùxÎ*³áa]º4luÆS/!9uq¼³ÃÁæ»2Á ¤„ŽyZÆÕC•ëPþàYpÓ¿ØÙÐLšr´&:5‚ìºø ãnguiÁ¢!d¹Á;È)›Îg=½±€M½ÉöóÒ‹žK^€¥Ü¿s - ÂsqdBh½2‰r9„{·E¦k+ý°Šå¬Ôô3b¿µŸÀ¾}ÂÕ{Zµ[´äÅÙ#éEe„¨¾§»V­ã0ê¼SÃ’¸2ªj¸á…´"•Ì<`ûËUÆ™­Ôú44Â.ÙŸ/áñ“«ñ÷;kR?<îìîeÜøœ»›ÏW–î°œ)þk˜ì,Žq8vŸ®²†[Þ¿âxZÛ5fg­§M÷˜è.hMxMýîB‹S&=\èKê¢Z+?>6ª)ƒø¶MQšÁÄÞ]¯»aïžu_Á»6Ó¶vÆÔj„&:§©7n+=h±¾sÁlúVZ‘5ˆ¹€EJ ænÞóØ׊0¹YÔ‘M æÄp^ˆ&ˆA¬¦hPfuÕ|tï p>kD5*:W1»½·–Ð+õ=8I<`mܲݭý–År®§Õk±ÕXö´cî‹ ‡.HÕØ(ÿ m¿\ÖJ¯ýöÝvmãaı=,î5‘ÔõC£0<é­§f`Å]q]ï0‚b«õÌËÀ*ÒJkvó± q•ºF»6tºTªnìžPÝp˯m¨›àýœSÒ9Îx¶ŸÕW@5>Ð kF^•d^•T,œ~+S'í€ -Ñ웫É4ˆbH¶¯È¾7£,EÝÚsP¿{ fV+|†òj(»k×aÂceù$X§n|b³{Wbå\‡­Z365E[Ðj–hv¸DË6šûÑž#p`í­”P—81é-Û–z€Çm.mx$Ñ“(áxè35?`už°ß6RPÕ‹ºMÅÕ(ìBG×Bv;[ë¦Ý¥VÛQQA!‚“’9àïp¨øI¤†… ž&ª(ó»cš¨¢Šƒj˘…©'Ÿ;.VjìÝ4º^¨®ŒÚë‡2¦»Æ¹¾ŸD—É?G4À¢ $jI#/éç-f´Å­¹Áçé‚ÎTríº…ç;ÿ\¤áÇôà³™¯fÏ93ªuШ¶«Eœ«rÐİI“Ï71yÓ¹ ¦;Œ¦Cwãô|sx-°Iâ­%6@u­ƒpØO”ǧ.¿m~g¥àjëq@þ8'Ž^Ç5 œû®—ÃgÜ‚ö4éÚð‰«>ò3eE7Ú'ÜÝœ}Lo‰“ØJ]Š) Ñȵ0Ÿn!Ôôµj”޽ZÕ5›AÿŒõsR•¼¨ÍQÊ,%‘ƒåéÍÂhÒš·(vœ€]kZ½hK²ÔÛû×2¼mMMŠ&zÛN¥!$@Ä/Û!íWÈ4×Ã]{1Ú¯‘6¦¥V¼¤lç -Cü\ßm2n­ÿgÍ ,Ü#†)qŽí€–·:÷Û»Yb#þ‚d¹…®itêákÁ-\!JÈ—ŸÕ<£åˆÉ5¢yJïý Iy8Ó¬¢è|p)Áµá ’‚ƒ|tpJ^O<ˆ-ÿ‚ã`ËìÛÌGà}ïæ4ì‘ÄßOg5ž|[È TŽƒVÍ" -SçÓbé^ žÄѱᤨét̉(…£ù8±çz„&-ê€ÁVŸR˜ºÝšj˰¶¨}Ö›KCŸ&OîÝøŠÕX±˜µâ'ÐÃÜ2cÅda5%”ÕG˜±8¶È@(䢢fAνiéIV -¯-=¼ %oÎ/=ãúdé1$Ç”<ëîþ©_Mv–ò@βo±9·sˆGÄ'ØZв·êKxSʦAœh}*8, XÇ»šTÁÁ:Ð¥ÀÛ÷Ÿ³0­=åÁôë"ƒùf}£È(*RˆúüÈ×'#ÃLaá]ýÇmËý$€‚F﯈߯Éç£'w­oXTžSr~~`ë“eHðÛЙCÁ[u†M5ÛÓ4¥ëiLg¨$:C¹Yʶ4UBÎQ~cM}PSÜ*=çOÅÐoöUØ/¦mËjéÕüPj*ã6³Æ]¸>‘å„VeÐ'ž•3q¨oÞ—¸Bë…ñšðmr“••6͹¹‰Ö§rÓ’˜±±‚O;ºÓm” Ò&L”$¯£µkaHˆF«Šß~Zk—þ*/‚8ÕîB]kÔuwÔ03d‘#ËȰE$±N”‘Š1\+ŽÔf ”ΖêO¾©-0¥«FÍ=ýtºMàè¬cçÅ.ÂèOXÉÍ>Æ GÄÈ.Œ€BÈÄ•q:–f±på‚PμR‚/@‘¯èyp5Oü¡ê­¿ß¾ç™-[ŒAÅ·Øâü }ñs3õ‡ÂÞ uià }Åå0ZŸ -cK2 cü²`zÓ æù%AH' šV”Tó=’¤ÚPÀ¦¾ß€Çí_‘¬öü¶8 -oGÁ3¥É£÷K3ø|´6'Âóly QÕu-“—CGAuè:QSÂæ<¡ãp8Šº$´¦¾çplapÄÛïÒ‘T0 1å|(4ÉX2$ÓÉeþUaçCeº®œ°Þ¶4wÇQö4§~¯Ž¢núâ5ø”–75aE<; Åb$ÑÊ!·³¦ TT– èÆ#Æ0ÿg*ìßÿîÑÁendstream -endobj -90 0 obj -<< -/Type /Page -/Parent 2 0 R -/Resources 91 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Contents 92 0 R ->> -endobj -91 0 obj -<< -/Font << -/F8 42 0 R -/F11 80 0 R -/F55 46 0 R -/F48 38 0 R -/F50 85 0 R -/F59 63 0 R -/F14 72 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -92 0 obj -<< -/Filter /FlateDecode -/Length 2362 ->> -stream -xœí[YoÜ6~ß_¡G»¨Xñ”¤)Zh“èCSмvx½‰åþ÷ñÒˆ"¹Z'íSX+‰CÎð›ƒÃ¡ònC‹ -þÑ¢DTmQ7-QJýnS—ð÷³§B!k¸4–’U¤Qª(ÑÏ6ß=mŠ–´Šghá’µ¢¤®‹³óÍ_ÅÉã«Sè~r®¯æþV_·ýz·¿Ñ?ÝõiQ -ÊŠ“_LëÖwæiëš_žèôå©{Sžg¿‚D”N"QZUI˜ƒçOÕ`"ÒÈÆÓ>–ÄY‰5oWf&Ø,­¯½Zf++l’T¬‰˜,–‰2R3†lv¥4`¤­BFÊ©6ÒѼœ‘â,'?¶Ïñù…Ó6Þ·H¯Î@·‡A …ð„”¼j Ð d«ƒå'gŽfa+V@«³Ðß Gþ„œòš?vó¾¾Çî‹î¯OÜø +wCÝ¢?¬cÄV0J¸ŽªišuD“rGòÕuÒV~„ÇÇøËwuס(z¤¿4 ­–e•ïhÚù‹zù0x ËV¯À¤q¤Ç¦{Ð_®ÐË·ˆ^R0»{ûK÷&åBÈ^òÞ1Ñ$½Ã’|õŽ/⡲ÀÌa[‘Ó–£Y¨ ›³¨ÁžEèkqfÍzRÆ$ˆÅò6Ñ$ Ì’ŸOðzAvÐû~;8ɳz¢I;c-˜?ÎÎŽꀹ±ÀÜŽM9æv(ä.ÍÓ¨ÿpÈ­9¤"«pG³Ðx,äR®÷TØD;ä·ÌÞ8 hÿ¸Ì®èŠC´³ -Gé€ ðÙœ{f¨üŠÐ¡aWxƒ^þƒ:nóÝ¡û›´lï0¾B÷[$çÛXw¢™nÕæS;æüÍ"ì …U¦{"jɆUgƒÖD’ŠY–Âð*îSçC~ýò„é¦F0ÒÆ¤ó­RÇÅ++Qo£ÿn{c‚O,`ùØ·ÌËËFäÐw$!ü³EŽ6DÂJ8Ãßèý‚ûš7¡rÆy ÞwôΜRÆ£(ä“ùÍ:¢Iš%ùj?GÛOF“ˆZÐLw(°à•h@ë >»(Š%‚P©`^’ÚÚÁŸg;ä¾›§ªC¬ô7ÆÐ†p¿5}jJl¦Z -lfKÃÖ½´[~¿Û7o?š’Ÿ­¾A¾`è/¡]Åà§„]‘ÎLƒ-j¾ÌñÜ›géó}Ϟ늵uGÑDeñúýn‡7P6CñíxéÚ¿G^~î8õ¶ò9à:é4‰ó@Ìè"Gsï™F×:<ƒT‰Øf—÷©‚êp‡fð]gÃcÃMQY»«¦.DÊurö$ýÏA|˜ámS|„ûŠÐ¶-vNÚFÚ§ë͋ͳÉÑÜh%.<aUKªšyŽ?Ãó˜`°z_/öĆêãR¾¯[¿vFëz ÈX±Eë¡­-œ£Þc9üÞ=cAp½ýº?Ç«Îõ\¹±i:Áv[kh;çHß̃LE´’rAÜ—y7Ô!ÞíõHƾG½GWkô8"“$K‡‘ Ñ2&é·Ù˜ÄŒJšˆIšY"&é6“ô3ŠIúy“¤ª²gb’náÈvžÂ›…#ÝìV[û¬ñQïu— *E @€Þe=-ñKͻ̠t¤&^©™WekCRÌð"g\'M=mÊ»ÑOD]éÌM°ß¹÷z÷íÉWEª6{©Yß8•Y ÒG‘csf´‘>ØŸW—ÙcH‹ÐÊcÈy°h *Êú/g¤Q®@ôÄÖ.®œÑ©â:>ƒ”©r)ÓÙä&œ 4_ô˜×˧ê³#LhŽÊBÑrì×ÝÎyyƒ2ͳ°?¶vïfr˜HϰOM¼öhìñ­‹MŽÇå-ör3ü@Fm -PþïÈI·®Ë°½s·û ÇÚ„ÞŠˆg*\ì™ÙºµF¤ÌŒï—Sê>ù‰ó÷E¦±Ýu³žŸÞ¯VFü‘œiL£ºk¤B¿Úv}oœ%r¹ ¤“Œeð–¤D4:¯€p~láHÌŒ^V´^r´g¿9Žîx8äØ,ŠVs†é`ð Óm®ÕÖñme¢I‚bIÖ€’áèA 8F@™1ü?àƒl4ú ÀÒD“É’¬)ÃуpŒ€4cèÏ¡Çð=‡þ<”XÃ`ï?Hp(!šJŽdJ9Ž¥ã¥9Ãß²&Ii†.iK,WBR«LÞ0>E¢²)Ò›f›¶ =6m¼êhª¬n¸ßõb­¢EËS$óc“”˜¾òÂÚƒi\¿‰-ô’²Éi±ˆ PÉÙƒù—úÝgHFX%üȺlP·ót¸ÇÆwhxO+flÅ› -räWô!RW{6ƒßÏgž˜Ä󉈡`Ë\{|vw±Àûû4_¡`Ïg8Õ†˜Z%|Wÿ1ÀA¾¿dÎ[È4QV?ŒéÔ÷ú«ebf7Îv Nц} > –’(ª5áTT§+3…ßNiŽ/L M&›äcÜçc‡¶To•R1BcùåÑ$c¶%Y³3}Ì8FböŒa¬jŒ²Ñ/²ºQà,D>@4)¤É -¤rR!Ç%Rs†/–±*Àå]7 Fª¿WÎçˆ&‰”%YƒT†£G*àAjÆ•—PÖtëÜñ3¾m]£„ ÖĽ=ŽMGK²Ç GcÀ1‚ãŒáÿöÙpt÷Ÿ‚VT„VñO¸<´MZK²Ú GmÀ1íŒa¤2¥ÖW¦ôÓq@âåu-šmC˜Ì¯!É¢\ߎ_ Õn33ùÄþwˆ%³g›e6Ôendstream -endobj -93 0 obj -<< -/Type /Page -/Parent 2 0 R -/Resources 94 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Contents 97 0 R ->> -endobj -94 0 obj -<< -/Font << -/F8 42 0 R -/F55 46 0 R -/F14 72 0 R ->> -/XObject << -/Im1 95 0 R -/Im2 96 0 R ->> -/ProcSet [ /PDF /Text /ImageC ] ->> -endobj -95 0 obj -<< -/Type /XObject -/Subtype /Image -/Width 162 -/Height 189 -/BitsPerComponent 8 -/ColorSpace /DeviceRGB -/Length 6543 -/Filter /FlateDecode ->> -stream -xÚí{XUUúǹ)ˆÅH)©xWMT5ÔJÔ˜¼¢e¨©c^R2íæXN:A†yIÄ{jŠ÷tÄ æet2¼D9fi‰—¡DÅx:¿ÏsÞ§ýìÎ9”6óÓܽß?xÖ^gíµÖyßõ~ßµ9{·Í¦P( -…B¡P( -…B¡¸“HIIÙ¸qãomV×®]+é£cÇŽ½ôÒK•›7ož3gŽz³$T¬XqÆ ¿©)}÷Ýw>>>7nÜpùizzzÏž=*ÿö·¿©7]âäÉ“nnnçÎ;{öìÞ½{¿ÿþû¥K—fff Nœ8AŒ)bóÇûí·_~ùevv6‡.\XmÇ¥K—¤ýÖ­[/^¼HûM›6ýç?ÿ9zôèÂ… srrŒ¿þúëE‹ýãÿCçqÏŸ??qâÄÚµkïß¿ŸÃëׯïܹ“SWN0`À;ï¼³eËÜ››+• 6ܾ};…~øaÇŽ j´W¬X±¢fÍšfÍšU§N¶mÛ&X‰Êµk×ÖªUkèСØð™gž¡æñÇoÕªUµjÕ y¼S£F=zpvåÊäîîÞ¦M*ýüüþøÇ?FEE=ù䓿™3g8}òäÉ4îÓ§O™2eÆŒãrÜ„††FDD|ðÁ¸¸yóæO=õsðõõeÍpJ£FBBBâââ(ÐóåË—K—.]XXXTTÔºuëèèh†fˆ]»v©‹ARRÆÃnÅÅÅ”ñ˻ヒ…ëÕ«'†%„ñ/…ûï¿ÿå—_þÁŽfÍšíÙ³‡Jl íïÞ½›`ôôôüꫯ¨Ä5?ü0úÄ}p‘#Gêׯ/ —H¯T©’Ëq)´k×nÉ’%¶mÛ&ë °`X“¸’!XÒs``àÊ•+‰bÖ!5“&M5j”´ïß¿ÿðáÃÕÅ€Àœ2eŠ0hØ“(ž6mš,Ç¿ï¾û®^½J‚%ŽzýˆråÊðÀÐ2"ÙVZ6lôèÑ´„–/_.[>2/iÝå¸l´HÓ¦NJÈS`;GûŽ;RfPI¬N: ŸãÜÏ>ûŒ|Á²´Ø†‡‡³rÔËìQ›4i"›"O*!ê?ýéOØ—-[^…{?úè#j0/Œ*͈/r4®¬P¡Â!Cdásã܈8x8##ƒBjj*)õ¡‡Â)’v]ŽËŒKl’ô‰ß˜˜¨`Ĉ ÄP4‘ËžÁ¸ÐQ^^3VAÍÆÒfM2UÙ(~Ä)\Ò§Ð2¹8??ÿæ;„B9ågþã!ຠ—Q`¯e\+AæFfÅEœó‰ø2ábM}§P( -…B¡ø`Ö¬Yjkƒë߀€€’~OTX½zõrss“°(,‰Ë—/ûøøàeùmKaI¤§§ûùùáeooï‹/ªA,‰ÐÐP7;ðõܹsÕ ÖáC‡ ëR¥Jyyyáè¦M›ªM¬‡Áƒ»»»—+WÎßß¿téÒ8úg~Qܸ~ýzÙ²eëÖ­»nݺ¨¨¨yóæáå·ÞzK-c%,[¶ Š.((صkWß¾}©IKKkРZÆJxã7dS••%·3f˜oßUÜí(**’ÂæÍ›Û´icÔË­; -‹aãÆÆÍ -«â£>êСƒÚÁÚX³fþ{ÓòX¹re\\œÚÁÚX¾|y×®]ÕÖÆÒ¥KåŽk……±hÑ"‡¯ÖÃüùó{÷î­v°6æÌ™#ÿáTXûöí[½zµÚA¡P(Š[BaaáŠ+Ø)µoßþ½÷Þ“gWùûç?ÿùæ;)((ùå—o¼ñÆÍw’™™É¹¿Ø,==½N:ïÛñÖ[oÕ¬YS¯©oðNxx¸ƒuLL …#GŽ?~ÜfWô"Øi¶dÉ’sçÎI³«W¯²$¶oß~ùòåÏ>ûŒš &±ï ñeñk¦ˆ)S¦´hÑBÊŒ¸`Á‚½{÷ÊëB2k×®]¼xñùóçKªQÜ (ÿ-[¶80g»víĘžžž09Þ ìÔ©“Í®0Ö¥K—&MšÔ¯_ÿ‰'ž ÒP’qÖø2£Q£FÒ àMåYª×_½yóæIII!!!ýë_möAé|ôèÑÑÑÑQQQ.k7‰³gÏâ_;}ôQu¦£GÂåË——;0—.]*aþüóÏ÷r:%Šmve°#v8k|™7¬™Ž;²èÖ­t_\\|ñâÅ‘#G -Ÿ¤¤¤tïÞ+êwÞ‘³^{í5—5Š[BQQÌܳgO77·}ûö‘”q®ð0Q,mD"&77·råÊÆ3n7f%J2.5¾ ìܹ“ųÀøßn‚FÈO?ýt«V­h 7|¦¦¦Â,þøã+W®pŠhÄ9ôÏÎÜÐ:}úôž={d>;vìX¸p!sv˜vv6‡ŒK0c:_¹råúõë *kذáöíÛ-àå‰'ŠÆšùùù¡¡¡?üð°aÃÊ•+' -FqîÿÕW_íׯÎÅŰ4TÀG¬^QŠ#ų–ÌóœøÌ3ÏBa¤ž^x¡C‡5jÔ`Mʸ²¼ïvÀŠîîî/Íœ={6\'eLGŠÌÉÉ1DØD}jj*Ö#|°gÛ¶m -›+±µk×®y{{ËP½!¢ËŠòññ1ò©˜úÍ7ß4ãããÓÒÒ¤ìRÌmñâÅ0?¤-Z»kÖ¬ þÔFq˜?`S7vìXH‰ &Ý>V¯^Mâ&Þ ä0î] ¢¸nݺ•¤Q¶¾øåÆ$>ápa3ï1 Öc«$ª}.ÅÖð¾1»ìO¬’,éŠ?üá\‡œ"¼.û§¼ÿ~º‚ÿ…„ÙP¶²®pÎpæùÇÆÆŠÛ-Nd©“ôåz –†®çÎk×WÊ Î×V䣀€,Cž²™DØðàÁƒ)°‡½‹g±5BÞ‚žëׯ ð\êòa°:ô"I\<ëëëk‹9÷o³ßëË)²³ÙuwÙYAÚlϘ¶d[óüɸò‘G‰ŒŒ”¨yàhÓ·o_¶mä ×ÚŠFêСC· -g±5‡ 4Ƴqýùþx‡«-Z–ÔɱcÇþõ¯™k¸“¥ƒÁ6ú¿2…B¡P( -…5Àå­*ŠX\±¦¤¤¨,ŒÜÜ\yߪxùå—½½½}||>¬Ö°$~øá‡òåË»¹¹•.]:))I bIdff–-[VTÝUß’èСƒ¨ö???ç7˜(îväçç³ïòòòºï¾ûüýýÝÝÝ)SÜíxûí· äôôô¶mÛ.[¶,$$äž{îÑ×Y 4—>ûì³üñ¹sçÂÂÂT?ÙJÈÎÎ&~¥Ü²eKyׇ­„¢¢"£½cÇ);ܦ° "##]¾N]a%DDDÜÁçe·7–Ç[FÆ 8 v°6BCCsrrÔÖFHHÈ¡C‡ÔÖFíÚµÍ3+,‰êÕ«=zTí`m•+¬ŠäääÛ&i¢P( -ÅíÇ7 á¬þýûOœ8QÛÌÏÏÕ3víÚõÞ{ïQ˜0aÂçŸþ+†+..–—@¹ìÿVá ·uíÚ5g5°ÿ~”_‚‚‚ÁƒÿnQÛ¿Ù²eçÛ1eÊ”FuîÜ™z.K /¾ø"þ¥0jÔ¨_÷ŒÃÔ©SEöÁeÿ· -¹­óçÏ‹XŸ>}*V¬(å>øàNÙ633Óи³˜9s¦ùuÆï¾ûnëÖ­mvɬãÇKå¾}û222¾ÿþ{Z2sŒ)‚<Yì~WÛaÈ¿€={ö¼ÿþûòÄ7íÛ·o߯_¿Ó§O›û§·3flذA!“½{÷2ÜÒ¥KÜÖ˜1cDCà0O‡~˜›!ÕlܸQ~Ñþúë¯-ZdüÐé JVXX¸víÚÅ‹c iGíܹ“SŒk="â2‰ØœµÙoxÎÉÉ©P¡Â¦M›8l×®_Áf¿ '(((>>¾J•*þþþ|ÍY³fI¼›²ðK5ˆSÃÂÂDAè¹çž‹ŒŒ4hP@@NLOO÷ññéÞ½;f7úÇ•*U9rdݺu‡ F ýשS§mÛ¶={öôððX¸p¡íå¶Ú´ióöÛo‡æy:÷ƒ/D¿0CYó“'O¦=œP¦LÖŒí§¢d‡ª_¿þèÑ£££££¢¢ÄÅÍ›7gi :Ô××WþuÃr#ÓGhh(–Ç}üussÛdj<~ï½÷2UÌÒ¤IÉ¤ãÆ“§WàIÑè0²Ô$šxl¹ÛŽ–-[Ò•äÈ“e_®^½jôO›˜˜¹O¨¤Rú‹‹©'Ÿ|z±ÝŠÜ‘ƒÌ·òótÙÏòåË1‚Í.?ÌR‡gp¢ÌŠ5Ï"´ýT”¬S§N"õÆ““¶mÛ&«àw¹'qéꎻjuwwy¾/*&†} ·òåËÛìRl0°4&:z÷î-<¹uëV³@ÔJ´öúåÊ•;xð A±jÕ*‡<%JYFÿ,!@ÙÚU®\Yúß²e‹a1u¹y¹-ÍËË˸ÈAÈ˹¾5‹œE5~üxyl×®]ÙŸÈwyì±Çj×®m3‰’ÔÔTbüÑG%ö…µÈ/ÉÉÉÄÜE°;vLÆý-rVVÖƒ>h®áaUx;¿˜pnn®|Ä—"ùR¥J•by˜²ð>ÌoVÐr8—Bn¥,韸 Í¿ÿýoiÃŽŽ¸ BLL‡`L¶y·$·5wîÜððpãЊˆˆ0zÃÌœ~XHK–,‘ãiÖ{>¥y÷7â— Fll, #@×h¿qbnæÒ˜®eD¡ëgð¿’ÛºÉ~X–|’ß ‘ßÍŸ² 3Ò“ª%( -…B¡P(î"Ìš5K`mpìíí­×)ÖÆäÉ“ÝÜܬñþ&EIÆË%½æ@adggûúúâeþîÛ·O bI$&&zzzâeþšŒPX×®]“@øùùÉ -+aùòåîîîþþþ¸Xô¾T Èzˆ%–8€—ùKÙ|G¢Â—É÷ßÿÁƒ)ÇÄÄØìwúQ£ÎV¼yóÄÅ€X–޾ƒ/×VüÏ!oôsð²C½ÂJ0{Y¡^V¨—êe…zY¡^V¨—êe…zù÷}‹B¡P(îvŒ7ο9r¤h¶ü:\¿~]^þïQ\\<|øðÛüë¡UÁ - ==='Mšô¾¯¿þº‡‡ÇôéÓ]oÙÙÙ.[~˜ƒÏ#räÈ‚ öîÝ+‰—$´uêÔ©ŒŒŒœœ\“˜˜(•Î"]{öìÉÏÏ_¶l™¼yûöíÐá¹u£qPPPJJJ•*UÌõfq°’jd¸l®¤·œk`1A°ääävíÚ‡ôïëë+·^×x<)))$$D”\ -m­X±" >>žÅ_«V-yRÉ¥HWµjÕbbb:vìèåå×¹sçððð:8ÏjРAØÓ¹»»ê=â`.kœe¸œ¥·œkœa1A°nݺլY3ÞèÑßßÿÃ?´ÙuNð‘dbª{÷î6WB[,È|PB‰µáææ†kJ銈ˆAÉ©©©ˆkÜä0%ÌÈ -¹dÊ’ss®q)Ãå,½å\ãë ‚±Þƿʎ´´4¾!,K‹ØJ±2q_ÍæJh‹ß«W/©9qâ„¶”$ÒµfÍ -¬Rr„Ü/ E°Ú¦Ä -Áõ/ÚåŽÎâ`Î5.e¸œ¥·œk`1A0z¦CÑçtéÒ…-…=z¿¬ç3gÎÔ«W/++Ë¥Ðáo0ÛìÙ³ñï/Št‘‹i‹¯²RXXXê "àCéÓ,F6w– s–á’OÍÒ[%Õ˜a1A0"ÎáÙ1ÜÄ–)//iËÝqð6)òt)´ÅBåZƒeŒ[ùúøôEºHÓ†Îl/º¬Î¥Æx§Í.ò™à,æ\ãR†ËYz˹ÆÙ,{å•WD/ËD–7NiРûB :š?¾K¡­­[·Ô0ÅFBØõçEº`$ѹÂxÊü¨ mÞÙÊÆF.%œÅÁœkœe¸œ¥·œkœÍò»ãB@. F#+¹¼Æ„‘Ìu“"]·gq0çg.gé-çš[‚ -‚) -…B¡P( -…B¡PüðFùYRendstream -endobj -96 0 obj -<< -/Type /XObject -/Subtype /Image -/Width 550 -/Height 240 -/BitsPerComponent 8 -/ColorSpace /DeviceRGB -/Length 24246 -/Filter /FlateDecode ->> -stream -xÚíwtEÆ $41€éEÞ¤w¤)UPéUzïi‚ÀH/ŠtÐDºô.é ""M:äûÜãœuwóò&á>äì;Ù¹sËsgwg -…B¡P( -…B¡P( -…B¡P( -…B¡P( -…B¡P( -…B¡P( -…B¡P(Šž={6ú:t˜={vˆ«zðàAýúõƒúo»ví.]ºd-¹~ýz‹-ždµíÙ³'kÖ¬®ÿºqãF̘1=zd-üé§ŸòæÍû<úåÚ’O?ý´N:Ë–-ûñǹoÅŠ)üõ×_è}Í^¶yÚ´iéÓ§©~ùå—iÒ¤áîªo¯4f̘ÁhÊ1”£M›6þþþF½7n|áÂëù 8tè÷ïߪÎÓ§OwïÞÝV¸fÍšo¾ùæytaË–-p-›hذá_ý¦Dýøñc V¼xñb[á!C<¨ZƱyóæxñâYKòåË×£G9>yòä¬Y³¶nÝj͸„³gÏšÂßÿ}áÂ… 7¡ -»“ÂãÇûí·»ví’(³víÚ‚ R8uêTS!&iò 罬°Õ†p|åÊ•¹sç<·ÄDŠlÙ²™Ü„d§P¡BRó¹sç8X·nÖÇisæÌ¹víšœvïÞ=ÂÓÏ?ÿ|ûöíxßfòkê4jÔ¨ -¸öE¬~éÒ¥ØÑßÿT‰â¥ƒS½zu9ž?¾Oûöíåçˆ#råÊe;¿S§N"FŒ> Š™|öÙg¶BT÷«¯¾z]èÚµ+ -l‹A±cÇk¢þúë¯=0´>øÀq°ë¸qãŠ!+Â2°”Ò¥K›ŸÄ‘7Þxcÿþý6,eÊ”uëÖ=z·nÝ$ÜjԨѺukN;uꔸîøñãc‰‰'N›6íäÉ“)$WâÌ.]ºd̘îAÉ AƒÞyçܹss&i^Â?üßëz/+œµq2ˆR¥Ja­ÔöÝwßÕ ,‹ÀgãNt_;¹^Ù²e‰o½õÖG}Ä¿ˆhY²d©R¥ -Î$S¦L´Öû6gÏž]ND~%™#GŽPyçΉÈùóçw-Q„ÀÄ*Uª$þ Å@÷4h ã›"E -¨Îõë×wìØA¾³|ùr4j÷îÝü„»À e¦"Q¢DÂ'9mI nݺ¥JÖP³fÍ4iÒTDÉ’%ñÉóæÍŽÓ“Ù´+iÒ¤lذA|;Àâá¡âI’$=!NEˆDàæÍ›:tÑGŸ?ùä0ÕÊ•+þ/ÆÏÏïx œ÷2p­ H…¤ÞW«VmôèÑ®-±Öƒ-Þ‰ ÂP#B'f˜ AR$ -É›$ýÓšY‚‹CoÚ,s•åË—¯W¯ž‘0­uí Ñ Ÿ#WõíÛ×µDC`L9€`c,xZQiLþÀ°â3 É“'‡@0øï/¿ü’9sfˆ^ו°AE¸eæ¾ô矒MG•¡¿{÷nñâÅaeʔՌØÂ³6è†I!ÿ¢P‚B£FÞ~ûm4†aàÆo |ÉõÚfÍš½ÿþûÍ›7§m+W®”¶.\˜sˆ;NÒE¯)Á|TäÈ‘Åê³eËV®\9þëÚ#ç} ¾d…XaͱD˜^Μ9%ÆÑ†9rÔ¯_ŸÐSµjU -‘¼Â]»v¥N÷B3`4Rõ6Lqéß¿ÿâ@L™2Å××N9ãˆ Ô -D… - iÂùɉP]”—~úôéáÇs‚TõÛo¿¡0ض@0B Tøs’ þKÞqøða9öÞ¢E R`™Ðs½—Õ²œµa×ÐBû®-qö_·nì”öCü F™+#ÖW§NxW²dÉÌdNTò²Í0Ošúm `bÈÍC_ÆŒƒõ141g‰"ŒLõÈ„®êë.Z´¨LDOŸ>ƒ–-[’Ã+„IË%’Ñ»6˜ ÁHž\\Cæ©YA:´S§Nr~“&MÚµkgmŒ³6¡ORHmhø¥K—V­ZE“$¯ïÙ³gúôémJ•*¶ïzí¶mÛŠ)"&0jÔ(ºOÛ¢D‰Bî)¥×„W©™®¡É2‰Çpí‘ë}I ‰)’¼`#'NœààÂ… r>ž¸)žp´‡ƒV­ZaÂü7oÞ¼$Ybéøº zv€'dˆ?UªTÅŽ-ÚìÙ³wÿ <3jSBñÈ)Á:8 ¦‡«—k§NŠ~> ‡Ÿàu!lï¾ûîúõë ¸Ps—÷Þ{oÏž=0C¨Žë½¬tÖ†F÷ÄcJÔüǸ¶Ä`âĉVó݆DQAØ—™+Ö‡qáC$Ó‘üˆó¯_¿îe›ms•ú"åXÓøñã±}Im\K/3fÌ€*,_¾\ Þ öÎßwÞyGÜržsÕ¤I“œ%ª¨a¨qÁ‚ñá„yÜ@¬Áç “‡íÃC %C‡PxÆW<*%®„A6-•>|8C† (¢Ÿøm*ßm•ºÖff–ŸibË×®]# ˜ÇCdÍX±ÍHnâ¼3·^Ë]è ´MJœ¤ËJIÜ éª\¹òرc]{伯L84oÞ\f/±e"æÙ³g1()$ÂÊ”8Àx»uë&’ÇT‰§ 6´Þ"¨6/½{÷þøã­%¨ŸjŒ÷˜3gN”DæÈUQlh?—˜(Q¢sçÎaz¤ÐØÆHú,<÷ž/_>4‡ü×Ý¥K—Š+’äâÌIºå¡aáÂ…Esœ÷²ÂY›@ù/ñKºàÚ+—ã¾ðÔ•Ax‚ -5Z±b…™+“3Ñ^¸'à1Â+ÇÞ·²jŒÂs_ˆ˜dOÔCÍõë×'–9KTQÃàÞ1cÆD» …ÀÁ¢!wïÞåçŽ;ò/HÉ ³fÍ*Uª”ÌÈ9 Œ‚Q– “É%4êÀÜ ”ø…Ë%™²¾ñâZôɼçÅAºp¾•+WRÂ_"TÊÚ#’yâ¼–À!8Hø–(m |ê$]V*ضm[Cº’$I‚ówí‘ó¾Ï|…h!òJ‘'¢ž>}:—p !žh '¼zõª‘|ãÆ)m»wïÞçŸnÞ¹U¼*snä¤ÖO îܹc8ÏüaèôÆæOž<)¯þ¢`2+Ä/¨×÷zjmN¸¶Ä:“F=ÜERø§Á“ˆ™C½6oÞ¬6g_ ¢{÷îµÖã,Q„lݺ§mÞõb€ø9xð`ù‰4 ¤H>@†xøúú’¸6˜ Y4>Nœ8ø^4“(& Q’%JÄ7cÆŒ8^y–aàZ›Ì,É ÅŠÒÕ®];"mã.6ÎOÖ#]¯%d@«"M´]ÚfÌÇIº¬TÐd"Ä#¡p®=r½/yŠŸŸ®¦_¿~ &ääzõê/^œ¨‡U‰æ07ä¢E‹¬’'qaúôéòÔGñ -¡\¹rÍš5ƒ’Ë T(B€[·n Çp%l‘ÙÞwŽ?Eq­6¨Úœ ÷|‚A¸¶-d¤ËslìQ.^¼(ob>ÌgªÔC%®–H“ÌËØ -Å«‚S§N 4¦ôÝwßéÔ–B¡P( -…B¡P( -…B¡P( -EZ‹ßê»a -…B¡ðŒPYüÖó¿ -EøÀôéÓkÕª•;wîO>ùDVP -ž÷ pæãå§ -Å« Ï‹ßʪ8+V¬X°`XÐÕ«WÍjKòù˜m_…"üáæÍ›*TÈ›7ï¬Y³6lØÐ¿ÿ(Q¢˜œð¼_€+ -.ìܶF¡gð°øíÉ“'£G^¦L™V­ZeÈA6";v¬Yi³ª]»¶u_•§"\¢oß¾•+W¶æ ;vÌ’% ‡’•ßäøÜ¹sÖý>üÇìÞ½{æÌ™f˹µk×Þ¹sÇß»w(†Ñ͘1C?%P¼Ò€˜eù/l+uxXü:—8qbùü«¢E‹ÆAݺuÍvWuêÔ‘3Ì¿ -EøY|¢D‰Ì>ƒ‚ùóçË¢jE‹5«B)RÄßßߺ_@öìÙÉŒêׯ_±bE???ªºråŠ,#8M yôèQÕªUãÇOSi+^i9räÐa}ÄïyñÛ6mÚtéÒEÎ .]ºdû\š f;G¡x­0iÒ$²›W¥µ×¯_0`@Íš5sçÎ 9r´hÑ|}}#DˆŸìر£ùüA¡x1X¶lY¡B…T -EP¸|ù²¿¿ÿ+Úø-[¶$Nœ˜øá_¼ñÆyóæýõ×_ud/E!_]kR(^¾úê«âÅ‹¿ºíÿçŸ4h3fLÂcÇŽMâ3lذ;ww+…ÂLžåûûï¿/^Ü®]»œ9sÆŠ‹l®_¿~6lÐG<ŠcÈ!¨ÙðáÃU -E°ÐºuëÈ‘#c>o¿ývøèÑ¢E‹âÆKRãü×­[·–/_Þ¹sgY¶´P¡B={ö\½z5åª -ï‘{öìß~ûM…ózbÞ¼y4ùÊ8vìØëž -…7øæ›oòåËwûöíåË—·lÙ2 psÏüùó«d\ñäÉ“½{÷Ž9²råÊo½õVš4i6lH°–MR¯ ä©ß¾}û"FŒÈ_ò’%KªXЧ¢G7oÞäÀßß¿bÅŠR8yòäãÇ«pžŠƒ ?þøãĉ'K–¬N:¤‡'OžTÉ„c\¼xÑÏÏïÀ$¿²¥$„’?ÿüS…£Pxfìæ‘Í²eËÊ—/oþ¥K ÇŽ›8qâgŸ}–4iÒD‰}òÉ'&L8zô¨n^þ¦7Ó­‘"E’B‚ŽÙøF¡P<+V¬([¶¬Ê!TpæÌ™iÓ¦Õ«W/eÊ” $¨V­Ú˜1cpS²d½â•ÆíÛ·åàáÇ‘#Gv–+ЧâÇ,S¦ŒÊ!ÔqáÂØoãÆÓ¥K/^¼>úhĈ{öìÑM…^uØ"ŽB¡ð«V­Òý£Ÿ7._¾}“&MfÍšuþüyŽF…"lbûöíyòäQ9¼ÒxòäÉ/¿ü2zôèªU«úùù¥J•ª~ýúÓ§O?}ú´ -G#ŽBv°sçÎܹs«Â><~üøš5k¾ýöÛI“&­U«ÖäÉ“ýõW•ŒF…âåb÷îÝ9sæT9„W?~|Ê”)µk×Nžø`ðàÁ[¶l¹ÿ¾ -G#ŽBŠ8tèP¦L™T -Á_ýµxñâvíÚåÈ‘Ã××·D‰ýû÷ß°aÃÝ»wU8‚D‰Eå P„GŽɘ1£ÊAáÄ7–/_Þ¹sç¼yóÆŠ«pá½zõZ½zõk¾™F…"Ä8zôhúôéU -Ï ÊüôÓO=zô(X° Ñçý÷ßïÚµëŠ+ˆJq -…—øõ×_Ó¥K§rPx»wï®_¿¾o߾Ŋ#úäÊ•«C‡K–,¹víšF…Bá'NœH“&ÊA2Ü¿óæÍ,]ºtìØ±³fÍÚºuë \¹rE#ŽB¡°áÔ©S©R¥R9(ž>ܱcÇСCË—/7nÜwß}·Y³f³gϾxñ¢F…BΜ9“"E -•ƒ"tñøñã½{÷Ž9²R¥Jo¾ùfÚ´i5j4sæÌsçÎiÄQ(^[à’'O®rPü²oÈ!|¥mgÆŒ“&M’cÔ¬M›6þþþòóÆ7¾pá‚õü:t( ðcœ ê<}út÷îÝm…kÖ¬ùæ›ožÚ³xñâtÄËúC #GŽÜµk—µdþüù6Í\»víK1[†Æi&­ZµzY:ö‚ØóÆ;w"EŠ4tèÐIèׯ_ĈDzÚöìÙÔþ`̘1=zd-üé§ŸòæÍûÔjiUÕªUCÐ/ë-tíÚ—b-™6mZÚ´i‡[°|ùòÓçXÌ™3ç믿þßÿþ!B„^½z}ˆ—õµ;7nÜWý_BLõêÕÏôññiß¾½ü1bD®\¹lçwêÔé@Ĉ#¨Ý ЙÏ>ûÌVHðúꫯžÚžÌ™33Ê!舗õ‡R¥JeÛYµlÙ²ÕªU³Zʉ'^ŠÙþý÷ßbuëÖMœ8±ÿý÷/KÇ^°{ÞØ¼ys¼xñ¬%ùòåëÑ£‡ŸÊ-Zd]ÛMê¿zõê¶mÛ¤„cZnè¢m¸­pÖ¶nÝ:Ì [ üJs÷î]Jh*jó9 ~üøÒAØ„ V®\éTWTþçXNøå—_øéÚ*«Šz6[A·nÝjÔ¨a~Ú ÍV?ª~àÀ9S,W^&´¹5›¹!¥¥K—Ξ=ÛøN,|&Vºtió“n¾ñÆû÷ïçxذa)S¦$ÐGá‹4ˆGŒBëÖ­9íÔ©SþðÃh L>ŸŸô:ÄÁâÅ‹K–,‰£¨\¹²Œ=%:XÅËpð_\"™†mvPt†k d0šþù§ˆïäYi¡a µÄuøhÑì ù˶é¦þ±cÇ~üñÇr-ľvíÚ8‡Ûz gm8ÏH‘"a•èÀ[o½õÑGQxáÂ…wß}ó)P šiõ9â–¹ÄV3ÀÓ&Mš´C‡2dhÛ¶­M]©P" -{‘˜›$I’Ë—/ÕGQQnäÙl%J” Õ2?­†æ¬Ÿ¸@—M–Ê™®nÍÚ~l¦L™:wîÌ€"™ ÜŽq’á5kÖL“&Mõ@`2c]E2Û +`Ü9ÀíC®äBD„CKb¡²Ä)Ô›@ÏAI„¾Ž9ò“O>á cæs€ „ó^Öim"”m™w'&çgË–âl›©Ù²e&-…Q u :´S§NRؤI“víÚYëwÖ&³@RÈíè)&ŒîåÊ•KbYÏž=mKIËŒ%šç_@f8ó‘ê$4ÐÂJ”(Q sŽ=Z$öþûï㚸Š%&+ ª½zõ¢*×±pŽ8‘}6?[¶lI2×^ÃÕé¦!/ýû÷çFS’J í‡[Û×Å«H%S¦LAþ®ú€3±Í@¾ŠÀ-‹óÄí oÑ¢Ee¢`úôé6ñ"@‰¶\"ŒËÕ ¸Ìá fxlˆ45Ë©g¥ýòË/%ü8‡ONõ# -à„S?¾ÑÌ­AÆŒã:ܶ›Új#_€PI¢1wîÜB… - 18p \‚™ØËÒ_²3c&ÄY‚7âZq ´ë³É“ÿ"¢ÂÇqQBãÑ´ úhTÔ³ÙšY____Ò Sb ͵þ `­”Ðr¨õÁƒ]ÝšµýÄb’Yq}ûöuÕãÄÂMÄ!£‡‹@ÈâÉ«V­ -Ūˆ -*È"É$ äDÄ&œ!Xà©ê·ß~û"|†YAÔ ôè‰Lˆ¡«æ!5a½E‹Ð-I®]ïe}úàÜj³OŸ> 6Ä$ 7›6mrm›©¿wïÞ&-EÁ:vìH2NÂrS˜›Íœµ‘Mcþ²¯=j&‰ƸdɹQ'´ÍXRÕÿÉ@#±ks1Ë‚ ™B¬Ð _%(㜱)´$tAõQ& ]ÇÂ9âXAÁüÌ“'9¨^S“ÄB:3ÁçàCpµþþèfm?ÖA“2Ä.3®úÀ}­>¯(f̘A§HZ%Ð0”($ñ92oi/^}ݺuB]dvË)pt†2‡yâ…/ñå©J‹9¿¯´ ŸÌ&aåÊ•#s‘'MR?äVfj ?¼cÇ×á¶MÒÚjƒH ±ò_‘ ÊDbfäÇ?Ûã0ôǘ i…EŠ1=Éæ’%Kf“'f‚±4oÞÁícô‘˃ê£QQÏfk¦Ð#GŽl>³µškýH˜¨'Ÿ¸ -£sukÖöÐÉ}>øà¬[ò;N,|€Ò/ëZµUªTâ-Z4ùî¿%Y&5já›Ü/§‘™ÄsêÔ©(‰Lá*±4…Çyâ‘­¹ îhÏž=$SeÊ”q½—µ‘íÛ·'¸ØZÎùEFJr%×¶™úS“–ÂC(÷÷÷Ç'ì¶À*×Ú¬³@øOzzíÚ5¤gfÚ¹ Œ×ÃŒ¥9šåxçΈ÷‚Žî¥ÿ@zŽ2cÚøÄ‹ ‚¬zîcPcaä -2ižÉBÀ¾<*r­_TbòäÉ4I^‚Â<«èp­Öö gãd¬L’§>È}ÃÁ1 .,X° ŒP"SýèÒÀ™ØÄ‹Kcãu…º%pt-•ÃÐH‡z¯g¥°èüÑÖBÛðñ7mÚ´ø[ÈŒw-³RÔO;ñ±âúð·øpÚï:ܦr×Ú¬³@5kÖÄ(&Nœh&ä­ [Ëq°VýE•ióÆY€Už’7Á^räÈ!Aœ»<÷Qž¿x6[)*äÁü´šký´tH•*•<”qº5[û…»Ž?žKHvžjàáPÛZ”¸© &0‚VòD‘ ^z×®]Œ >D”Éß)a܉ì裀b\¾|ÉË$nĈ±2 s#îpæ¸qãdjõ,Õy/k“ðZä÷ÿ…(ü¾}ûh94L’w×¶Iýe„ÕÏœ9eƒ6øsSz4Õ’ÛL•8k#6Ó]ºt¡§8L:%3Éü¥f"ˆmÆR`öجY3z ˆGÒq<‰™#“øqD€Ëk«žûè:ÎÇ1BYÍOH,>ÍC¯A÷îÝ£ö7¦_´¾••—LLûx¦Œƒ^ªT)W}°Þ÷•Š3fL‚Žü¤³8jü†pck7ÉdrT±%pd+³¾øÌDæXD¼ž•öâÅ‹h 0–"ù¸mø¨œ¼LÚCSeêOê?zô(y1÷%Æ‘>Àƃn×Ú&Lhfð¥çp r4L%6ŸC!~Ø6Œ’`\ò‚49#õÈ3w«Ú`†YIÿÉ€H"$y裼áÙliÓ¦MÍO«¡¹ÖÐ|D-qÍÕ­YÛ'1¯5"áI“&=ÕÀÃz÷îmš$S‹G‘3gNFJ朷oßNØ-T¨PÑ¢E‘i2®FòÂX“?bwóçÏ—Ù¨;¹3ù5™&~ݨX±bâĉќܹsËd 'ɵó^ø.ê`И\]fŃj›©?LýX*„9Èüv‰%àE3fä4Û{˜®µYgŠ+&=%¤¨¼4Nœ8¶÷]S¦Li›=©ZìšûÆŠ‹  ¡GæèÌËtSÞ½éÓ§j,/wyî£DçX8ŸtCêÌO$oµký¦±PÈ›œóóó#ÖsQ˜.ÛÚ4øÁ)É£O§>XïûJcëÖ­ –yÓ ?ÏÏÁƒ;Å;lØ0y!„ñòõõÅ/¹ -CP'Ä‹TE¼è‰g¥…xGø/äM3Ûðõë×àòzõê/^œ fêÇ¥c€ $ÀmVªTI&¢Ãm½©³6ë,)­¼±ƒ“'ÚRN=µjÕ²ùø<¶`ôÇPà'V Ók6µA¤ø+ »äΆbÕGs Ïf+ÀM:Õ[¡9ë7”çffDnÍÚ~ˆ%¹ÿ¥ƒ«žjàá†ýû÷[?U»sçŽÉFe¾TÈ £í‘ÁÉ“'ÅO¢Æfò“0Ô÷Î{®m3€öÛôŠÃÄ‚Zƒ×sm¶<Ÿàüκ¾hú,} j,B±~žö_½zÕõ¿ "dÒ6m⪯-z‘FP'Utrô¬´^‚lHž\còv±õM™4ð~¸=ÔfKd>l¾Pðdd^¶øž±!6ÛôÚ³[»víÚÞ½{Ÿê` -…B¡P( -…B¡P( -…B¡P( -…B¡P(aOž<™2eJµjÕræÌÉ_Y)ñYðøñcë'ÞàáÇ®ïyÚ?a?:—…W(lرc:)±tïÞ]¾Dð^Ï B¼/I˜ÚÝC¡ð€Û·o-Z´téÒK–,YµjÕgŸ}æëëûŒo~ýõײ¦÷(\¸°mƒ‚K„¾øâ ³ »|ñôbà\^¡°à1bDë -ºK—.¥D¾TõRÏ­ -â}IÂÔî -…Ô®]»fÍšæçýû÷&L¸hÑ"a/XЄ ÌÂn®ûØÖØ?vìXÙ²e6lxñâÅï–d—¯;g̘aårk×®•…mœÊÖ*³:õ¹wï^ ²F¢²måÛèž—…W(l(Y²$lMVX ü*'sæÌÄYaÀ¹Ó‡MÏCq_’0¸»‡Báê5jT×O±®^½*æÓ¶mÛ8qâ¬_¿>ÀmߌŶÆ>¡'FŒ˜!*êÍ’ìX_ÕªUãÇo›‹}zÙÙEà¶Ó‡ÑóPß—$ îî¡P¸× ÝBçS§N;vìzõêÉ6‚7nÜÈš5küøññ½… -BÏþ»û¤ÙwÀ¹Æ~Æ ýüüΟ?ïå’ìX"çÛ^ ¢9—åwm•mYrÙ¢E‹€Àm¹¬[xx^ùßó²ð -… ÷îÝ‹9²<ŽD½q¼Â» <òÞ¹Ó‡UÏCq_’€0¹»‡Bá82hÛŠè¨ß‘#Gœk°ÛàºÆ¾yÓû%ÙÍÓÏð²U®ð¼òÈ–…W(‚‚s§«ž¿€}IÂìî -…B¡P( -…B¡P(B ýdL¡ð÷ïß——p -Ep±gÏž¸qãw©O…âµÅܹsß}÷]•ƒB4lØ0B„²t›B¡x*òäÉãããc¾U(^âÞ½{1cÆ$â”,YR¥¡P<§OŸŽ=z”(QôË…"¸˜={¶¯¯/'Z´hÞ—V(‚Î;G“I ¾¬Pw~ B Ètd‰…B=z7n\1™X±bmÚ´Ie¢Px‰³gÏF=räÈ‘"E‚2f̨2Q(<Àßߟ@=>>>Î…8 -EPèÙ³'V;vl___,ˆ £ûl*P¬X1L&^ ài1cÆ Ö² -Åk‹'Ožøùù¥H‘bÍš5™3g^¼xqĈ»t颒Q(\ñûï¿nJ•*5iÒ$²›îÝ»CÒ‚Ú´Z¡PXA É”)Ó•+W8 Ë>/X° UªTú0T¡pÅÀ«T©òðáÃY³fɾŸíÛ·¯V­šJF¡x*†* SïÝ»7{öìR8oÞ<Û¶# -…Bæúôé#«}Nœ8Q¶»„ž7n¨| -Ï0«æîÙ³'Gަ\—V(VÜ¿ßì,0vìXÙÐP`ÛLJ¡PxÀ®]»Ì¶Ô -…â©5jTëÖ­U -E°cÇŽüðC•ƒBá%>ýôÓY³f©Š`ñâÅ}ô‘ÊA¡ðüñܹsU -EðÃ?T®\Yå Px‰*Uª,\¸På P„ ,¨ZµªÊA¡ð~øá’%KT -E0oÞ¼êÕ«« -/Q®\¹åË—«Š`Μ95jÔP9(^¢téÒ«V­R9(!ÀìÙ³kÖ¬©rP(¼DñâÅ×®]«rP(B€Y³f}úé§*…ÂK.\xãÆ*…"øöÛokÕª¥rP(¼Ä´iÓÎ;§rP(B€ýû÷ÿðÃ*…B¡P( -…B¡P( -…B¡̘1Ã,­ÿäÉ“6mÚøûûËÏ7n4nÜøÂ… Öó pèÐ!îß¿T§OŸîÞ½»­pÍš5ß|óÍSÛCc/^‚ŽxYhaäÈ‘»ví²–Œ;¶Ñ¿èÚµëÎ;m3xðàAýúõ9øñÇ‘È`äï¬?¸¸~ýz‹-}S2jÔ¨F>|øeié!C<¦ §gÏžF2:t˜={vˆ«2úàŠvíÚ]ºtÉóx¹bïÞ½42Tôá¹bË–-ØŽµdÇŽF¶-[¶4ëâºÚ‹XâÕ«W[µj²<|øðñãÇÏhAé*½sšÒ³ß%ÄxÁ~Ò BŒùÂwþüù>>>íÛ·—Ÿ#FŒÈ•+—íüN:ýˆ1b0R®uN›6í³Ï>³¼¾úê«§¶'sæÌsæÌ AG¼¬?´*Uª_ýÕZ’6mÚnݺa“'O®S§ò¹uë–‘˜õÌ={ödÍš5 ðÓƒ•+W†àîVù;ë.~úé§¼yóZK‚¯¿þúÿû_„zõêõu ®]»öRT×7nÜ0õ2Æ;w"EŠ4tèÐIèׯ_ĈDzڌ>8ë‹3æ£G<—+hUÈ–‹ñ²þÐô Öd-¯–(QSÂ3÷ïßÿ7Þ€îj/b‰`àÀ!k@áÂ……冨=èêîÝ»Å|²dÉR¾|y96tôÅãûI'zôèQ©R%‘2!R4hЀŸ(yŠ).\ár ùË—/ÿûï¿ œ.]º}ûö CÛ¼yó¬Y³Îž=+u6mÚgµvíZBÏùó祛úùçŸåF›6múî»ïÌù¸hBÞ™3gL ^nõêÕæ'w”ÿR¾hÑ¢+VÐ0kýPmÛ¶I Ç´ÜXî’@H°ÁYÛºuëð*˜¾×xÚ»wïRB{~ÿý÷xñâYkøë¯¿pÎÜQ~BJñH‘˜rò„ÿàšwá?ÜÅ*á äóÛo¿ÁLà'D«ü­õ_¼xñÛo¿ÅN)ôÐ çxaï®ü’-Z4Ã+lí´ÕÔH9%¿qãÆþù‡“¹„ÎÒ~ôäèÑ£æÚãÇÓˆ«xZœI¢D‰^åötܦùòåÔäøäÉ“ˆeëÖ­Ö,Æ&sW}pö#*X° …S§N5ZÇËy/üÛ—_~i-Y¿~ý•+WŒ¶l߾ݳ>pwôG -9¾wïžgûu­íÈ‘#8ºI¿¬£ŒvÑ}ÚS¬X1TÔZIÉ’%­á»P¡BòSìÅÕ‘øy«v¹Ê‡^`ì´›åç† ˆh„6úeê§K—.0a‚Éëƒê…÷ºš&Mš ˜Ÿ¶vÚêq)§ä;Æ17…´ˆFÑ«0ƒò“/ÑvÈÑÌ€ÀEÂhFGn7o^ÆŒé#r ‘É“'‡ÀÃÞùï/¿üB&’;wîï¿ÿž¡ÁÖjԨѺukîÔ©S\›={v®%q?~ü?ÿüóöíÛQ£Fe4Q•âÅ‹cDeÊ”‰=:Cl³???k 'ghÄó_ôŠ ÉÎ>üðÜ9sò/S?éùÇ,×Â%j×®Íã˜:uêO?ý4eÊ”DU©ÍÀY›xQ¶lÙÏ?ÿü­·Þ’µÓ/\¸ðî»ïæÏŸ¿@¤3¶­ØÉǹ…‰tô°Ë±H, pE\DA:™8qb.§œ»D‰X%ì*”ŸK0§Á¬ò7õ$HÀ鬳rí…ëxq mpêÇÉæ§µÎz\GÊ)y)X%—ß¼y“šGJ3”ÆÀÌùW—.]P!”SîÖ6L!ý·*VöïßÏñ°aÃèlݺu>”ÌúàÚ÷Aƒ½óÎ;Œ5g’FIúoÆËy/+ÐÜ©µ„á3{¢ãÆó x<ø'HNÍ?~ìÙ~]kCPX …ü‹Bq°5zûí·éê;vlãůR".”Û‘B&K– Í1öâj‰ü%C±j—8åƒ/Âvp ÜšP…{' d :vìhêÇ~9‡JÚ¶m'NœRP½ð^W…‘Âå§­Îzœ#å*ùŠ+¯éãªU«è,‰aûöí„ßÕ³?ùm·,CF“ˆ}DâE‹ -g›>}:-[¶Ì•+ÎA22—ˆò£ÒÄ\©ŠÁŽdÂgH *Н#ÈR³Ì :´S§Nr~“&MÚµkgm ”LŸ*Am ¹;)¶œvâÄ ‰5õ£]&gÄ3†ÿæÍ›WH£†›$ÈÜÔV$k…0P8wî\(–؈IÛÓ§Oo›!§a‘#GÆR|}}Q-î"ÉH ™$I’D¨~‰8À]räÈa“°S>X1ö%Æ ¥AǬò—ú9'C† Ò ÚÏÝáN®½pŽDâ…S7ˆ_¸óÓÚNg=Αr•<#…]K^½ÁiH%S¦L¡ TÞ¡C¡ˆ#GŽüä“O8€oÛf]^:jÖ¬ e­xãC‚”)S&yÄÆ$Mš4(qêƒkß¡.fé~B³|Œ/ãåz/ë³T"ÆZˆÃĹÉùÙ²eÃ<=èòeËÌÜœ÷øTûuÖ&³LRÈíè)l÷ˆ"I,ÃŽ°&k%ˆ…Ó°#¤ŠMq,»M{qZ¢Ü±j—«|pÈâ×?Ädˆõ2÷hêçãCÐ=ºéÚ‹`éêÊ•+ÑóÓÚN×zœ#å*yFªW¯^\K%„!1ö;vÈÚõüäKYQ†,Ÿ@ù ³’é”ÎSë_@Z„‹Z³{[mè ÖmžK¹Pf’e3/D8Æm3œir¼ÔÂHløðáæ3jx ùp—fÍšY%ì*èmÑ«ü¥~2;B­9oÆ:{á:^d"¶ "ÆÑºµœUœõ8GÊUòŒ”i*>[¿÷Þ{½{÷–‰¼nª~ýúè$}”I!îk¯ @«QÔÅ VâÅ? ÀäõÒß -*¤K—ÎUV®úàÚwÜ”™Øéܹs‹-Ìx¹ÞËú$ÁښݧOŸ† â¾°ñM›6yÖÅÌÝ¡‡ØÈSí×YÛ¯¿þ -ç”çòø=I”dfquD!]¢•™ÇF¼â«Å^\-‘»@®ÄírÊQ'L˜Ð6Å;QKýEb“9‡4‡äÚ‹`é*êaÝfÎÚN×zl#å*y)™ê\N#a‰’”yö“/DC25tÇ%,šXƒÎ¾Ef}ýúuŽâ2c-ò—Ù'RãQ£F_¾| @>Th½oAïÞ½m -@n.Oh-$gΜè¡#‹—°š$äDžÝt‰¡äÜר‹«%r—+VØ´Ë)œ9b¤‘ܺsçÎ2k‡ŠBجõ3p-ü6}‘¯]{á½®¢ÛôW€J”±¶ÓYs¤\%oµ\üa…Üùý÷ß—<øÉ€WŒ¼ÅwçΓ [¿ -!4»f—ôâ}òäÉg¹;<_†]•W­o+°½Ú¿¿yuÙûÚlïá@Büš™yýS‡ÛU>˜¡­SFþÖúèúî·AWpáe=ž%½qÙæ'é»t þ`æ¨_!кlý>ÚUV®úàÚwœOPß"9ïºãH -fchží×{í:}útˆÕÏ{Kt•Â4Þ^j³=ÙaŽ9ât#N„–®zSÏS='"µ¾¶í½gS( -…B¡P( -…B¡P( -…B¡P( -…B¡P ²¼¹|Äjн{wy)Ôf‰rW„x‰øð´Ðºâu*=eÊ”jÕªåÌ™“¿²<ï³@¾Ç™[KŒ5iÒdðàÁò¶•«±˜ýB¼s‡ió³£ÁKß@ñ¼Ap‰1¢u1Ã¥K—R"_JºÂ,Qîij,žZW„{ܾ}»hÑ¢¥K—^²dɪU«>ûì3__ßgÜüâ믿¶­Ëä½øhÉÌ@Œ5*{öì²¾œ«±˜ýB¼s‡ió³£ÁKß@ñ¼Q²dI GÁ |£^V•ïÜ‹®[—(Õ%âÃåBëŠðŠÚµk׬YÓü¼ÿ~„ Ñ1ïɶßıcÇÊ–-Û°aË/x·ˆÍ'N,V¬˜ù9zôèâÅ‹[%À±ßٹö†¿ëN%Û·oŸ4i’³ÍÖú©î"‡Ña,Ünîܹa|GÅóžˆ;ö˜1cÌÒúèR½zõræÌéïïï\tݺDy@¨..ZW„Wà]Q9×o½T$”жß¡'FŒp?ܸ7û€`2Vc4Àÿ“¹ˆMãàBòÕ¿K€Û~fçëþ®;•4kÖìý÷ßoÞ¼9÷% XÛlê‡^&Mš´C‡2duÞ¨?}úô¥J•"Ä-Èú]asGÅ3¢B… -Yþ ëZLp2Y‹ƒO•*Õ‰'"GŽLˆq]tÝ,QºKć˅ÖáÕpPEëBFVx©HÎý&ˆ)ø[ùpÞË}@Œ[A¼# -`Güå^D–‡cqÝïÀì¥bÖðwÝ/)RDÖR5j”¬p+m6õsmÄ0)”úñ ò¼©Zµj¤]auGÅ3‚tþÐa]¹búôédܨÄjÑ·oßîÝ»oÙ²…<%ÀmÑõËå¡»D|¸\h]^ 6ñ°žO¦pæÌïɹß1ÅlUïÍ> V56½€%0áÃi6AdóæÍÆX\÷;;¬kø»î—ÎÛž™6›ú I²†¡Ì‡'K–Lê_»v­b沦YØÜ@ñ,@ñüÿ Y%Õ€ìXpB *Gú ‡GŸáEn‹®X–(Ý%âÃåBëŠðj88aÙ¡Éš¡¥Þ+R€c¿ bŠ,Œïå> V56@!“$Ib-tááÅX\÷;0;wX×ðwî—a»–4ß´YêǾ$ƒ“s:uꉥ~R‰Â6\&fwP< DŸ­0Kª - ²w!V@~-;û Ï·E×Í塾D|¸\h]^ çûï¿'m‘µ¾Ñ™=zÈÓy/ɹ߄ÌHOš4)Àë}@¬jl@ÊS¥J9¦y­Zµ"¿À¦ÄX\÷;0;wX×ðwî—AÈ€YI.O÷źM›¥~Ìú%Ù¶m›ˆÂ:Wã ³;(ždysIÀëÕ«å@Oäuç¢ëf‰ò€P]">\.´®ÇÀRÈv¡©S§F 0r^™[óR‘œûMS –$^îb5FƒªU«Šùøøìª` ÆXÜö;0;wX×ðwÝ©„x„qÑAB¤¬[nÚlêÇ –lÙ²Q.ÓkÖ¹2ˆ¨o8Û@Zp.ºn]¢üE.þZW¼êÀùã™m:é¥"¹î7ñ÷ßË÷û€ØÔØx¹ßë~ü´M ›6g=jû(Ï Ý@¡P( -…B¡P(ŠPÄôéÓm“x -…ÂK̘1ãYv5U(^7¤M›VÞS(!0YfG¡P<¿üò‹|L­P(‚…mÛ¶EˆÁ|P£P(<£uëÖ‘#GŽ=úo¿ý¦ÒP(‚…š5kBØ¢E‹fûBG¡P8ñøñã¸qãBÒ0™Þ½{«@ -ïqóæMYEí7ÞÐÏöЧbÍš5¾¾¾òñZ‚ ôC0…Â{L˜0X#æ#+Ó* -øøã%Á±bŲn¢¡P(<#}úô˜O¤@è¼´BáwîÜ!ÐDŽ9^¼xqãÆõññ)[¶¬ŠE¡ðû÷ï'Üh j¾¾¾˜Ï AƒT, -EP˜3g&óÅ_Ô¨Qcúôé… †ªÉBU -…Â35j%J”Õ«W§I“fݺu~~~²Z¦B¡pE¹råd“ëŽ;.X°àþýûåË—>|¸JF¡ðŒ»wï&I’dãÆ;œ={öôéÓ”è"Ì -…+®^½Ú§O9®S§Ž¬aþàÁ}cM¡x*–.]ºuëV9Nš4©<Á9qâ„ÙôV¡PXaý| AƒS§N•ãGéŠ7 -ÅSssœ(Q"³š~•£P<Mš4™8q¢ÊA¡$H O? -ïѬY³qãÆ©Š nܸÎÝj -EPhÕªÕèÑ£U -E+V¬[·n© -/ѶmÛ#F¨Š FŒÞl’«P(;v6l˜ÊA¡¢D‰òàÁ•ƒBá%ºví:xð`•ƒBøøøè‚„ -…÷èѣǀT -Epñøñãˆ#ª -ïѧOŸ¾}ûªŠàâþýûQ£FU9(Þã‹/¾èÙ³§ÊA¡.îܹ3fL•ƒBá= Ô­[7•ƒB\ܼyÓ××Wå Px¡C‡vêÔIå P×®]‹/žÊA¡ðÇo×®ÊA¡.®\¹òÖ[o© -ï1jÔ¨Ö­[«ŠàââÅ‹‰'V9(ÞcìØ±Í›7W9(ÁÅùóç“%K¦rP(¼Ç„ š6mªrP(‚‹3gÎèÖŸ -E°0eÊ”† ªŠàâĉiÒ¤Q9(ÞcúôéuëÖU9(ÁÅÑ£G3dÈ rP(¼Ç·ß~[«V-•ƒB\ݽ{÷ÅG³xñâ°GŽic_4ÛðfÍš5êÏ?ÿ ÅúCŒ™3g¶jÕê+'ÝwҳÇ¿,c2dÈÁƒŸ½žÍ›7Ç‹ÏZ’/_¾=zÈñÉ“'ñ™[·nµf1\BáÙ³gMáï¿ÿ¾páBÚC¨ÂĤðøñãß~û-ƒ.QfíÚµ ¤pêÔ©¦B¬Ï ¥ó^x§/¿üÒZ²~ýú+W®ÈñÅ‹·oßîÚ6S?w'¶J!Ç÷îÝÿ°iÓ¦ï¾ûÎÚ=%/ XÐMúuôèQk -F÷iO±bňqÖJð?F [°Eˆá—_~yÆú¹véÒ¥„0£\{æÌ~Λ7ïï¿ÿ¾yóæ?ü°|ùr×ünþüù -øì³ÏHiM!2Y´hÒøë¯¿‚*q•£×µvÜYbCš4i,X`~nܸñŸþY½zõµkלšã:ÖΖ;vŒã_ýÚãÚ*§;+V¬ H ìèçŸ~F bˆ«W¯nëããÓ¾}{ù9bĈ\¹rÙÎïÔ©Ó â?|øÐµÎiÓ¦1:!‹™3gž3gÎËŠ¿Þ#UªT –µ¤R¥Jü±Ð³ÿýïéÒ¥CáC±þ“L fkÔæÅ€A„!nÝ«W/¡gb /˜[ܸqÏ;÷ìUaÖÏ©°Ù7Þxcÿþý6,eÊ”uëÖ=z·nÝÄÑjԨѺukN;uêT@à2GñãÇÇè'Nœ6mÚÉ“'KV™]ºtɘ1#Á‘’Aƒ½óÎ;¹sçæLÒ(1Š?üßâz/+ñ 6XKðæ}•²eËŽ7εmR?þ*Z´hœ@ –Î?~|÷î]x>A°L™2ÜtË–-¶p㬠AåÏŸŸBþE¡Œ>Äãí·ß¦SÉ“';¶M-ßÿý)S¦˜Ÿ´0|ÏRÿÕ«Wñ*… nÛ¶mœ8qpÈr-²¥¿éÓ§Ï”)¥N:p 'k%ò¦H‘‚t56«…@&©³víÚ܈«³ÄUb \‰%ð±É’%Ã:\Kl ~aD¿ýö›ü¼}ûvÔ¨Qé½&î85Ç9Ö®-¡/8(´hÕªUÎ6åé5ÑÉZvr_ÃCB è®R¬’ÜHÑ A~.¹#Táúõë;vì`à $ÏßÁƒãQ÷íÛçÊ=š6mJ³¡FtÜdÄ&>z`J·nÝ"äÁ=¬q–Pn~rGùoPñíÚ¶m›”pLËM¾¶$ÜÂ)gmëÖ­C¶D|,ÝøIŽÚ°]€±6uøðáˆèÙ뇥àÈS»¹JFNÇ™ Ö‡0ƒ"ðAœ$ªbD!³åX5Îà,qJŒcôSÃ'%Î -ø.S§U—œšÔX;[båx®m°±>bw¢D‰BåñDÍš5!œÕQ²dI|$Yîˆã’ÄŸ†%Mš4 ðMx†F.Ä7kô$I’HS‰Sx’0šgi¹í'Ÿ|"Ƭ¿÷ùçŸúé§øùù„ó^Ö"þÁZˆ[Æ5ÉùÙ²eÃ:Ûfê_¶l™™[#5À¹q0tèPئ6iÒ¤]»vÖúµI”—BnGO/]º„sƒÄJ,ëÙ³'Þ޶Ж¢E‹Šx³gÏÎ tçëÇ‘.JGãåZzD .Ž› -c±xïÞ½Å%¢cÆ¢©ÓD‡råÊ8qÂYâ”ÃǺ)Á¸µ³Ä©r+W®Ä·˜Ÿx¹(Q¢ ó»jŽs¬]ÇŽ±&†r­kÈ‘é.\À{p÷ j8¸³ äà2)„aþ¢çØ‘° ,—A Rð1þKø#šÃ¾ÿþ{Wîªp-&ÃtŽèoâ£g¦ý@Öô]½pŒFñ_tÃCü;v,j#×Bª¡àyR§NÍЉªR›³6|{¤H‘ Xú[o½õÑG‰äß}÷]´:5µ­€Ç&VâQM üAžÞ>Kýxfø* -ϵd=¤í\Ë $t'V¬Xˆ‘KªU«FÊéœÄCž2dÀáó×|:‡¡~Æ‹aSr–8%†ëÆóÐ`¨ ÖÊ@;KœÚ5aÂÔÃü´ê’Ss\ÇÚÙ+ÇÃXœmp²>î‹C%]¢ýû÷_ظ¯¯¯XwÕªUÑöZ¨P¡‚¸&’<ÎêN×pžð³;:CÇ…ÀãBëׯÎÐ ™Ãɘ) Î;·hÑiq½—5»|ï½÷lÍîÓ§OÆ q>¸ øžkÛLýøX3w‡wìØšMðh¹)a{3ÁYQÝæŽ¢Û’(È`†’‰yZ[ Òœ€lŽ‘Ð)sø!®ÆKD6&OšChàZü’eÈs½zõä¿9rä ÚÚÂ7n -£èÚµ+ŽWÏ]¸„ Z݈³$(‰1Ä4› -%Õr-q>•! 1[:ºjŽm¬]["c-“¥®m€+2î„N¬Ofº¸/ÑêÙ-·,Î gHƒ‡Ã1dvzúôé´lÙ’;bÚ2s%&Ì%’滲8Ü)ÁH¸Þ›øè™)!1 ¸5j;räˆÜc÷ ÃgðBcÆŒá¿è¡Lfï0d“™›Új#ÑÀÏKП;wn¡B…$[8p \w²Yœ0%áf .É)wâúQ'"…\ËU’Cq-‘BܵðOäŒmš¼ÛˆbA’äZLÄ5ñÌÇŽ#³v–¸J *bQÄÓœ%NíB‡ (æ§U—œšãk×–X9ž³ ®¬ÿ*Oñ{¸;3IªT©":ÌèÏž={÷¿À§Á Þ~ûíQ£F‘~R‚!p¤O(×N:U¾&žÒNÒ=8cÕ3”8:s"Èž={  ×{Y‰GunkÎùØ,,]r%×¶™ú?øà™»“YnÊýýýßyçÝX…àZ›5Ê3¸ô”„é™Iî‚ó±6rܸqÖ£ñ‡èÃÖ­[Ÿ¥~„ ¿•Ì„üTžû˜k¡Ð2‡‚EŽÙFÛ°eâј@0pÔŽq¾ÉÑ7*t–xØÎ;{ôèÁ½Ä¸–XÛ4hù‰‡1NÍq޵kKÌXXÛ@ć‚»Ïž=KÔ¼ysÛ}ŸñÍ\Z Mdä/”É·ÁàB¥òÇÃÒ‰ž™ ÿýñÇm-„FNž<–.ï°yˆ¿´“-¹-TYÑ~2k(Ÿõ¦Ö\k3ÏgeÞ…Ÿ8q¢á0òÖ„­åŒš•°¡2»þ,õCÒ­a øU¼¹‡LehÈ(…0XÙ8ÃAº'ô w-9 aÑä€p†‹/:K‚’Ù+ÝÁöMZá,±ÿàãã#é˜M—\5Ç9Ö®-±q-[œ¬Oî*/N×Ìœ­ÑX™½GȘΜ9ÑpIÿIÍè܃¡!ï€Qັ2’—téÒeÏž»›?¾9šÀ§áçq¡$›ätxËܹsK0ÅÏqÞËùP ð-b¼Œ…LPÕ6S?1‘ú ÓM›6M˜0¡äË%J” ‚Ãè8ÍŒ©‡Ú¬Qžè/=%¤D \üÁöê•[ßÈ‚_Ñ~Üæ³Ôϸ#^x ¾”äÍ[s-? UƒûI<2Vø.k{ÌLÈ Ð$nÔ¹sgym+q•X¿~ý°Yò\X–Ìr;Kl€LÒ#™(#ó‡&°iŽs¬][bÆ:¨V1îœC~W¼xqÜ7Tž„cÆŒiOjæîxÉ&È»ybe•©ŒR¥JÅmp¡2ÕƒW¡©2s"ñÑ3SÂס`4ÀÐ3l÷îÝq&&ô=ŠX¸/B&YF¯d~†&!+¸ -™…y‘ÕCmHÛÌaòx{ÎáÐ-L%6¢K;¹¯•j"YäöYê'¸4kÖŒ–#ÒdQ~s-”ÌzfJ0Õÿ…¼^EØ%·"ù29¨ø‹ÌqG $ÀkUªTIž~¢ýüüpÎ4öØìÈY›y~*ï@Êk¢0%¢-åÔC¾`#º‡2o“ -àZB¹Ÿ¥þ 6Ð/d ëÔ©´^+Óqæ9ˆõ-bãb}'SÜ 7cÇΑ#‡¼0æ,q•qŸ>ø¤<ôq–8_J!M3?­ºäª9αv¶ÄÆñœmp²>ë} -Å«¨£Ö ¸ŒÂuã©ÑÖxˆ¿´ÊIfÈ× „W¯^ nm¶W7>‚×ÑŸ¥~äLË]ßè1 B69KœƒŠYXç%σµz;×6xÃú -…B¡P( -…B¡P( -…B¡P(Š0ˆ¿þú«[·nòBl»vížýÕñ‡Ú^Üz*œ/ÚéV -…Bΰ}ûödÉ’uîÜyÆ 3fÌÈš5«m¡ páÂÁZòÝu)`ݪ@ñJ&1I.˜L‰‡­²žÓV ºa"ŒãêÕ«I“&µ~ظråJÜ©|äºl¬sÉYJäÓ{9M^ã'xI%¶eTɧ8¾råÊܹså+ ÛRÀºUâ•@Ú´i#EŠ„¦™’:uêDŒ1(Nòü¶ZÐ aƒ ²~$e…ë²±Î%gq×™2e"E*X°`þüùñ«U«V?¾,nà\FuòäÉéÓ§/Uªf…Uâ­K[ [¨~†}À(0 -FV–[\Vè½÷ÞÃ@ä;ÛæÏo«…ݰ@ñ²qìØ±,ÿ…umL-[6³yŠA-ë\r–¸#¾ííÛ·¯ÄÙrÔuUØLLžòT«VmôèÑ–¥€­ Э -TÃ>~üñGØaÂ,É[²dÉ1cÆÈ—éÎÍ žßV ºaëÊŠ ¸Á¡ÿÂöµõ›o¾)kq[õÚÔ²±¶%g׎@ùI”p²†!1EVLu]F‚¿™x¦Y—6Э -T{_ ÎÖ¿4œü]žS€ -DácÎÍ žÛV ºa놊 ü¶ÿa£¨¨¬Ù+¸|ù2>’ïyÙØ€—œ•cÔxüøñð!öX¥l9ê\F?ŒÂ‹7FÍpàüñ‡Y -Ø -ݪ ÔW~S<ÎV¾|y”ŸR¡B”ŠÐ°wï^ÈŒÌ*;7/x~[-膪®/¨Y…ÿB¢7ÀÇÂ=dñ\™ÑxÚ²±ÿ.9‹ï5»Òƒ&Mš„¯&4Ú».£jÝ8rÏž=²D­Y -Ø -ݪÀu«EXãld -h2¡m$ÍWL™7ožëæÏo«ݰ@Õ5ìãèÑ£h5ÚáÇvP<áWž—5KÎbk\›3gN2ëúõësJèçç'YƒsUëÆ‘„6™â6K[¦[¨r†}ÎFV"oá]±2´Q’w\7/xN[-膮( VhÛÉ“'m±—ËÆBÈÉÙ­ß ±æ)†—Ë¨š¥€½nU #˜3gNþüùå˜Ð#.BŽOjó‚ç´Õ‚nX ¯ (Š×®›¼ø­tÃ…B¡P( -…B¡P( -…B¡P( -…B¡P(Š0Žÿ')ö9endstream -endobj -97 0 obj -<< -/Filter /FlateDecode -/Length 1640 ->> -stream -xœ¥Y[oì4~ß_‘7Z i|KbtàÁAEHpľBénº­ènÚfK9ÿÛãË8qöÒª:iìŒÇßÜgzž$+ÕÉj^ðRfu#‹ªÙj»(³ú÷“§à¼*¸¨Õ{âc.hY4U•åˆÃ÷ËÅÕÇ&“…¬X¶¼]¨/L°¬®HQ×Ùr½ø#»XÞ]ªãÝe–3Ʋ‹gXþYnÞv°Þvê…6ÙÅÞROø`~µ{óëÞ<{83ܹ=Eý[î–[ |vÌàø -lÂ=­âRgÿˆ6‡öÁ1XÙKWÜ´ïkŸcÖ÷N¶×[Œ <{@ñzT³qLÖHíÆÂÞ—Ù_ÙòçÅKo+kQÉ¢áDêÉ+Á¼jCIJÉa¿iô‚¹ÏW×[’ýÐ/>©ï–mŽøÎ8€uÑ4•õ€k­Nµ–@,ÈØ®ŠÐë«7K>UŸÙÄç­½¬—³>Û>6käeR¯Ì™Ó*ÅBÛ÷kMÇ…z{ó¿;/Ñ`ÕõQˆ *T´1­9PAo?:°×$­ßÿÊ=-o¤bA ZrÏÙLêèD7¢Ì{8H -:ôTÎ()D-³œ(GRÂì¹+8ò‚Œnœ¿ò˜º'DqÀF–rVQë#¬*6áúaÆ“ ժ߂86Bï­;djXsnΰŒ+¡Ù› û­{& +Ц¬<çvçÔ–€AT -æow¯©ûUö—Mp,•WTÎoâ^…¼ÜAÉ8ÛVdâ‹Ö_TR(•çÆþ2®šQîæòJ¤D]>< +®&iRŸìoñ$ë’ƒnn>{–Á÷z÷-ÉïÚ²Kûm{ƒ²»?l @GBYiF'~¦í0:ÄØ<ÔGdíý%ë³t‚ån÷t(yƾåȰÝ@¿ò}ksk5}Ü—ÐWÆw+gïcYQl°ÞBÁÆ»(Ëx8ØzÝ¿ û“'ŽTܵœœ×\ù&¼ÜG÷NÈÔ\Žl² ˆÎ›(UÉcIÙ³nÝKÂ#€7u½|ýÄ! TŸ§níø¿Z‹îé|‰/nõôFÉ ÆÄÁ-ÉäF$™T’jtáõÛMt}Àk]/”Ãí¹j?$©œ5·A¢UÇTqã@îA„W¨¤M1ïÝ«[Gˆeœ¨ËÃU‡¹Ëíìæ‰¢)øÒäZn/ þ9ÞgM‡äüéQèƒééPpebeF™~— ‡tv8Dlg†CZ²‚Õ®Äýˆÿ±*2N˜fhUEê¦Õñ Ð0:·ëMkë ºüäŽ -áo7ƒ;~‹qñ¸Áxö‘•¼ó§L/kè±y‡G,kÔN]Àxo‡nívLënø&}ÚØx Î—ž)8“qΠ$V—ÙÀ‘Dg’ŠÇ|ņhÝ&VE(Þ£Ñ:œî4Mîzi‰Ø;ÈfM£Š©? hÅŠÃép’†[b®0Ï÷6%A‹M“ìßըћXðM]¤vÝ´œÑ±û1ÏúÏQS'c“Æ£u/'ÿÙÆ¿=•SÀ:¦k7ÉVÜ©ã×8^•^XhŸôfçö-X 6áœhxTá®h5êx… íãþo´)1h>˜çõ ÿïÌóô<Š„¦¬&h;—…FÈ?'ûO¥mÁk¯Ž´æq0ãT¸jý]@Øz#íÅ¿ð®fNž“ôX) -BêѸ¶jmb¾Añ,lk£Ðpû–R…ñR­™ zÁÜL¥Òt7§Ôwjïñï0Üéc!• 6Þ¢¸AˆkšX­m>Š6BMVÏ|Æ©Mœ0> lÏMïEëÊÌMJÑvNc7a7 P‚f¸qÊ[æ\ú@7ƒ—Yë/‰¼(É{cø‘#YQq'X ç Ǥ¨™Ýt¹¤~Î:»€™ÃèO÷’„¶>T°)$:ÏpÛ°Ÿ¯±­ãÖzm¨Ë¨GD¢ÍyÉÌ0(›‚Šæà,HÆm.•*7¨Lf)À*bz—ûµéeŸÿZíìendstream -endobj -98 0 obj -<< -/Type /Page -/Annots [ 99 0 R ] -/Resources 100 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 101 0 R ->> -endobj -99 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 174.6 639.01 215.92 650.128 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#299) ->> ->> -endobj -100 0 obj -<< -/Font << -/F8 42 0 R -/F55 46 0 R -/F59 63 0 R -/F48 38 0 R -/F64 67 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -101 0 obj -<< -/Filter /FlateDecode -/Length 3687 ->> -stream -xœÝioä¶õ»…>µöbň—ŽôÜEÒnQ‰ë4vƒBË^·ÏÆšÄõ¿ïãýHQòŒ=i‚ÅbÇ’H‘ï>©ŽhQÁ?Z4‚ˆª+š¶#u-‹Õú¨*®áÿŸý !j"d×™ÁR²Š´u]”h…?}öe[t¤«yq~uäö¨)išâüòè]q¼ê·'ðþñp½¹×'EÉ9+ŽÍóþZßóâøáƒ~p£W'kŠãnòûŠ -=`Þ_»þN?¸Ô÷~Ü,5¸¥ûúÞü06øÆìé uo™•‡wƒîñ+ -5Œ”48üZÿÆØß¦ 'Å÷Åù_¨ EI)餴ôûö¤h…Š5µFTmèn Œ›­»Pôû™{Û,ÖF÷úU@‡5rJM´Çh§jF6ãà—Ú\¹E.ǘnË~‚AèÚ­ra¦Ã¥_÷n¸~µFÄjcÖ[ SéamöĘõ÷n®ÙçÂb7¬zƒô8XŽ•Ëj˲ƒ•–£Š) Ìk·ARÕcÄ:^Q$âH¢+#FpÁýºV¬ÝøÖK„žeaÜj~oÖ–ÒV«ú[É£ƒSþÊ‹7^é“zkÍõ#ß[7è9 ï°ˆéHÄôýÆ“~ËqkV{tp2·í“ -¨ªT -¥[§w1r /ýÖ¼jYZ%ú÷€qµÈ\ G·ñ°…§*Ž×Ø ø§^œôúà”h¸CQ7Žº¬î¼øW9ñך2Z¶ÜyXÙ.°Zu­bTU>ûâí<ã‘L€c04úÉáé÷øÑA¿ÿBë=";<øµ‘ ‘ Põ+#ë>ÅÙpfðü3Sî„‹ÿ Ù¶ñÁ“ðÁ!åÐ6^ÂrŠÐj딟uàï˜Læž@öQƒ½2à_Ä< Î#xK==Ò‹X„jÏ_MƒšÏJáÍ •„ž_ß²¹G»ÿˆèå¢7jöëYó[{£6s]ÓØ£ÔôùÎ@-;õdìwM¾[Y·¿ƒ¾fU?…Æ^ëÈÃ\[Iì3cÙxSIG-Ø(röl*éÅ#*éÕ´ÍØ;<Ùƒ|J.£˜SÅ–ÄàðêvÚÈ1î5 1<þùÊÆüÙøaïí±}°´¾t“†dÌm˜·Ö¡Ml´0)2þù;ýû}Ö¼1ª`8µ&VÀ„s¤F)™¬p­‰D>¤íQÔ¬'aåS÷£7+´Á2͉Då¨&Z6ÍÏA’ƒEe’§Õ`5‰¢XÓ:F&²ì{}Ñybç¥ÃL·¯jTyÇ-#U$åQájB‘Ñv•È¢¤a]däw -†®ÎùûN['…þÚ?èó.[¶š±g3íÕ€·Âûçgm[{ÃýõfñwqHÞÆX#/§†rJ‚£Ý_dF‚¬‡´•ì8ˆ_ý‹;1 ÆÆë@{ÇÓÌ£@|\Ð9˜?5Sæá§°èY^µ™áÚM> q8ܽ]ÏÒï¤ a×(µ<À9I&ÃI"–¨Ìýü¤PV~ø¯­oÓë3NÚÀ)a¸ÄxÞ 3rçÖFìn„cÎ/È„`Ã}Æ.™i÷N¬ýLMMÉC¨ö‰õˆ©Ê/µ CÔÜÓÚ@cZþ TúÛÄÂë8 -Y=˜úÆW‘ˆù³ŸóîöÆÈ¹Él©žƒ™¨Úôx§9{á«jBE¯êHݺ¦ÔšÔ9Ž%À³lR–®ˆQÚÂïúÜb 80Ú™ p6l³…Ýs/}ÖŽñ*Ø1„¯€tÝaP°k-`À)°À‹qø;ÒŒíð™þû•ë@b…™êŸH=º_D='Ýx˜é3Ê¡+¦]`LZñ~ð„0ÆnûI“éL€ÍžN“3 -Š0½†.’Q’-JžÏ*Þa@sš—B©ž9pvšFSw8t-sýÆÁåI¯óï¬KÜψÝL|¶zetü0¤ûÔ”v`a—”¼á¤b.þzå”mVyŠQžÀ6£;€ovê>Ò¨9²Œ|j[K"e¨ƒ-¨ç!§0Wö,Û»æ•$m+UÇ`ž÷V#êDaK¾“Íâf}¶49G]iA_Fª•Ú€PãRå> -1ÆÛ™£]àñ[Aá{ˆu/²Ðq ê2­íEßš0T™Ÿp ) ͦcæL8ƒ蚆¼¦¤ªÛ|ΛiÞÇù?>™ŽÎ–ÎÈoG¢Ç+§™:±*µbd2PoN¢çŸš9åœÐ†/šSÑ’†¢ÃTÊï¡Èf½`ZÃê1­ ÀzÛAû†ð7óæï úè$/gÜ"ðv1n ¼2®è R–´?€àíÅG£"Àju\G¹JVN•ázaiMfòýÑpé¶*…:MorÏý¬B»lÊÔ¢MOÏ< m° |¹påÍÆADä—®D …g`ÌeÖÛ9ê;•N¸úÛ“¢óõÙ›í ZHè¼Zè@Ý#‚„îQ€A=¶Ç6Å-$wÚq÷FG¹ð™•ÁWÍ·fOM&-$ -6%„ß"âÙ”tÚE¢{v‘ðÄM°?¹.’&Õ¤kSEg³5F»tmÐ)Ó¼ ªÄBŸ8z¶[£¡Šú.öÉórö,V£BÜ´ ´w[†Sši¨ï9viË0wÚ{÷¶Œž‹Ú2ú~®-Az\ð­B[&éÈè¡,"ÓŽŒYw©Sª–ý>ªÕFKá<ê3‡ £&‘+Òõþ£§~f®nRt2ja1:o3"߬i%בµ¯ýLN€«±­74Ò/1f•RD@Æ{u .Œƒ™¬ÅNþ¦jIµ¯ÃɼsðÚ·E¥dª(«’ó\ªÍÜBzÅ<êä \×ÿ£s . -›í¢T ‘¢.Å^T&צ,î)ϯ^–À‰T2yY¢€¶ƒ^ÚJ╺@¿¨™b—[D„Ù/ïbD^ÜPá ©Ôaâ–[Ä„‹†°.Aä¹§‡?RŽÝûÃ+‡N9^ZpºAÛŽ4@ \–M«JÀÈ*IÔGyI*95¿™×´ÉóAîÔA•Ľ0}w"˜bI ‡8X$ˆ§ù{)>ÎÕnfþäGôÒôpRNnòQnų©{Ë£Ø;|9“@6[7îÁPI¶¬Úé'*(hDqËüÑ_œÁ°„fŽ_eTõ Âò+ÐÔ’vD}¯^v”·<©Çº4½k “ùo¼:u®¾)ì C¼:Wý5§°’Ûìë£ÿ‡}/Ãendstream -endobj -102 0 obj -<< -/Type /Page -/Annots [ 103 0 R 104 0 R 105 0 R 106 0 R 107 0 R 108 0 R 109 0 R ] -/Resources 110 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 111 0 R ->> -endobj -103 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 268.485 652.689 347.109 664.549 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterator) ->> ->> -endobj -104 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 367.493 652.689 443.776 664.549 ] -/Subtype /Link -/A << -/S /GoTo -/D (writable-iterator) ->> ->> -endobj -105 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 125.085 473.955 201.31 484.794 ] -/Subtype /Link -/A << -/S /GoTo -/D (writable-iterator) ->> ->> -endobj -106 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 479.91 473.955 521.862 484.794 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterator) ->> ->> -endobj -107 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 73.413 462 108.91 472.839 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterator) ->> ->> -endobj -108 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 122.967 237.253 198.662 248.092 ] -/Subtype /Link -/A << -/S /GoTo -/D (writable-iterator) ->> ->> -endobj -109 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 187.743 225.298 266.517 236.137 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterator) ->> ->> -endobj -110 0 obj -<< -/Font << -/F48 38 0 R -/F8 42 0 R -/F55 46 0 R -/F64 67 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -111 0 obj -<< -/Filter /FlateDecode -/Length 3596 ->> -stream -xœÝkoÜ6ò»…>NÛeù¦˜»+zEŠ¢hW )Š­½q}°½iv“\ï×ß©!EI»^.Š ZY¢†3ÙἤßÎXCákŒ$’ÚÆ´–h­šË»3Ú\Ãÿ¯Ò)5‘ÊÀyåæJqJZ­›‚ðÏ‹³Ïþ%ÛÆ«Esñú,N¢1¦¹¸:{Ùœ¿xŸxÒÞœ¯ßø¿Âqý‹ÿ¹Ýކ«~~¯¸nÎ7 ¥zlUD(ìØüXC¹%ƪ4änë šæüÊÃßÜöüsd”~ ÷4-{pІ¦|ñaýTˆ¯ñaX -+HÝDþ*·aÇ¡ -¾ŠpÓ#|¹½÷ƒ/7o"ÓŸÛ^ûã§î"`y^ðr¨¼Š¬ç‘Â0n‹™îþ®s™qbä1Lþ%®ZBŽ×‘Ç_lߤ%†+Æ] CVè•0œ0:ű€K»Û#! ât‰ÉÉøïY"ø`IᢈlÛÞ¢'€x'8»ñaùþ‹´(`±ÙízVFAr¬ß澇•ެo¾WÅõ}þw„¤ÿr?IMǘN¬6 Însn܆cf]îHÇí//’ ³‚hh˜!LgÀ~Æÿ÷®@õ¿>£Dضùç”0k›»3I[B™íþ¾={qöýƒž‰дæã“ûÇ( -gÝøΪ#eeÀF0˫ƘQAÀjÀÇ»Œ5vø‡°¿aË×­êÝæ>ÀÞ'«ýêüæ>žç*»¿Ùöín»‰ÂÙQj~âïµ{I0ñHºÃîÜD‚^=Ê‚¢Œp [UÏÀSÖCR 'á±G-½”hiËI+Ú)ÑÒ< Ø—£V­Q¿âåŠp)‰ð@Ó¼§ÁMÒÁ•$ -¬NÈ›ý;„’΋$‡ÝÞ-h¿"JÀ: –k!J"¸IJ„„{@ANÉw€qR•NI.±â qLQ"æÏ£(‹Ù`ÝR"ÛÞ!Î}8J(k%¡&ú•7ÈAÜ Iû­Ó‡`z‘6½:G—œ ¸ˆnAÍÄ%…êñ[F¡&èåŠ.WNï{d°“s0ª5Ë ÛkM.VaaulíРὫ¾MTïrô.Ir4ß¹[ô.YÊ£7Át^Oí×äÛ8OmSaXÒÌe–i¦} ÍÌ4жº¶d|º˜H+M˜ÑÝŠ½¬Æ2à×ë䴻킔§5ŸCÔÖ4~æM>3…¦Fo(…7a –—õ>Ò/6k½Ö†“Jˆؾögº¦a½ÖÖ›%øhÝÝx{Ýü€âö8z…†—L-!Æm°óÖ†¡Ÿ#äùWŠ-*9¾Ev!Ž™ÂRHKøË>ºÌ«[ Êȧ8zƒbÀàßOšVFŽæD¾IØÒM;ɶnÈÎR*be[à\‰»±´–ÂÛå¶Hšc(ˈ¶e«2îLœ“ñЦJJ,ëuu2ëà j=ë0’pæ,Â&U „-ŽYy¸+´=ß_Å`þÞÛ‘á4ÀeÞ§úìöÑVÌb ò\qEZX·0ø?ì.ű¾}×ÓzxN ®Ûo7 ¤Á.¦2FÌp åß„½>ÇÁIlPG­›6ÄÒÞ$×Eà½åÎ_šP¸¨R8’…­8Nñ±k·­àÓîáLß#à}ø«¦þÂ]¤™C[“•½d¥ˆ¸p×Hñ2\VKïub±_² :le˜äרžmâ2% ¡5øV²°ØQ#yŸª÷„ž¨ãìt4£”Œ4¯ÙaÖ[ d; -«œƒ›t€$´ ` òjÏ,âGZVÊ%êGrùŒÃ†!%¬KCó«.e4Èñ2[4Øÿ ˆ>U„äIæÄqDäù¬°ÓNI>ºzÂø‚Íäê) Ú¶ ¥h¨$œŠM|Ú$î m -:†š`l€hÓ¶…­94mà Dƒz)â°iÚ ˜áΤd´}‹lø~ó™ÿ}†×§S±‰œMÒœEHÉç ÀðP¡|õñ`Jºñ£ª±3Λg9Ή€ÍEÁÖ«Û˜8ÿ8n³£Jу<Å^+&PäŒelâ…Gñ£qÉ^Ã(ÚS¶ŠH¡‡ÖŠk …Þ)ò¨¸šài²ÞÓ¼Œ;Q­¨'¶:Ì·9M?£ëx$†tñïþø£?þߢã{ôláÅàY°qÊül;JZ[Z~Í|¯*×#U/K¶á=C.ùp)Všªh‡³-ŽCݵóίÆ\ÚWx×Ïʃ¯(“ÁUÄþWVnŒ^ØJb„)hÏö¯§uç™*X"h]?%*âÅ«Œ½uG7Q+žc²ÆË¨ßãû1ØŒRb¬œHÔI£IÛÊŽ½ÏëA޳fH³Gjð-%NPðªYvÏ3"0ý‰£WhxIQ ñøì?"ûõ‚Éÿ"ýÇLa { ‘\XgaÑýHäÙu%å ‡ÏýCŸ£úÃp±„ë_Z’ßdyCëÕ=pê÷x5=TÁMpé¾M%ß›óED©Q¹D‡îân}—η.úu™€ÿ„1¡UÁ±«bfAm¬)0«ò„^Ê30+·cŽêˆËΫeuD¶”XjÔ‘8zJÚJˆ3™äμS [T鶬)ŒðZÁÔh v¶­jJ³Bƒú Ósà_rŒ¦h-¬)èѰdwo—nR€V™YbÌ¡z`Téí&ó/Q|B¥ª¾‡dDœÓƒZê”K µèR§&ÉÈX¾\M«‘÷&‚Ó#úŒÏ®÷X|îbØUâsY+KŸlɪ’ý3”t}îkP²’ËÒÔ÷˜]¼™Rvyï×§Õ•‚ÚÊÙ8mªÂãf['Lçªe5•ÄÝj -Œ·mfü7ŒZQ *L¨3Ó­JcîmÎõ˜…Ž-i(_쉫© fUÈK޳¡Ž6ˆ<—fz…`H¿ßÖ¹ Þ=ë=Ýz±äÁÌÜÏÌ» –ï&|¦.… ÆDµe¿ä¯9àCy­!Ò03»¬c5›å55ýŠÄ½ÕÀ£îSÊ1«î1ç£Çº|2Öeĺ¬åÄ0‰Y\v’Öva—qè—®áN{ëx2¥åbÔ)ŒõÍ•óÁŽÓoN8R¥ª´äB7²IÂ>JZf‹úâón7thNt|†åš)8ÞÌ^¨Ÿ»bCÖƒï¯øM…k1كϳ|?ú¨|ê[R& ‚!í!-øçù|×å€\ÂP3½¿ŒÜs5Ó SwH¿î÷ƒp“[~\ÅÕÑ*ôLÉU ™± ›Ü˜˜J<.{óʱ®7?.íÍwÍBv–ù2ÛÓë½ùžùÏb?ûõýÔvc$¡²Lµ•]ìyŸ¸’™ùF~¾|#ÿãõð'yP#ÿÁ=üÝFB´àÍȃºÔ4#Êu(Ó¥VyfñþÑŽ”•àà™)[-µRVÕ‚˜ë z±Z=6uZ÷~V¯º¹F¢ŠPì¬Ç ø:¾ÝŸÍ·û Œ âõI½’Ú¥rå1]Ìz)d‚Xª'¥ðùc'À©µdåÐiд'5'h“TpÍ “¼ ãÔf ¾Óµ!Ü$%àçºp/'äÈqÒˆ…ðÆqX÷ðŸ^#(L¦êõÍ–ÓêF¸·‡D,o~âyýI”¦1‰ïÁ."ñXrž4/Ñ \¥LœDy {Qž@Qºò$•Š¥Íª–Hýñy”ÛI¾"æ¯'ß®ý„ÙvJ¾!†€_Õ§Œ0ßGä=K×*K FN„ã;%ÔÉpþŠ[>wEY‘' -€{·DÄXüc´QΊAü/+e–è"LB 8QBO -ný",ÛLó~a‡î†(t:å˜Ò‰¼L'Vı'ó”®¾nÓ-™Ö÷Üœi>7àÜ÷á'úgµ´@ ™•03éˆ -%-Ëì]pˆ=rLŸˆÅfâ.o…†Þ#äÖ5äN\ÖŸð¯Ç½‘EVîú_€ÇWÿLq™05ìzo¸¤þ½–ÉÞ8ig¾1bH-gîÂèzãðÆÙçoÂè>l¼É!Ûxã1=¼À¢µÎñ/Û º1SX»æ.uõ!íÌ· % noДî-àbfá`øùÛÈ m­1Äs¦òBLž Ì_‹™ùžŠ6ššƒ°ï1C -~Œ­ˆ4¨«o²JÙúwZ锓bŒp²­2P!ÅŒ%MAø ¥qÚØ¦Õ’!ö,­Ô•Œï˺¤˜êB²tö“DÓE¶Âµ­û{ÓÉIÎŒ½ƒWhôÀ\äðf_f☶<>•a[¶åuc¦tîûœBŽå¡ÍF½\Ä•þÖ¯ªœÏØå®uÿ†ÊÂ1F"¾f$ÀA22OÄCM…ñ´seS -ç¼ÐÅ𡜛T`a8¯Þ}Wc½ë™ÔòƒÞÕDÞT÷³b -Ò}gó–ú”Wå§Ìü' |QŒÀŸ2ãòÈ2ª ºÕsvüžf¾Žêɘ¯£*÷U„~#zÑa]ª¿þ^Iwᘺ©…}Þ ÷jŸ4ã•MûXV"sì;¦àçØphÁÏÅ?÷÷HÁ¯{“ʽ“äÞò˜,‚.÷)/áè2 ã©êŸÑMî‡ L°Uþ;`݈@¡©d»/'ûþìÿn/™„endstream -endobj -112 0 obj -<< -/Type /Page -/Parent 2 0 R -/Resources 113 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Contents 114 0 R ->> -endobj -113 0 obj -<< -/Font << -/F48 38 0 R -/F55 46 0 R -/F8 42 0 R -/F64 67 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -114 0 obj -<< -/Filter /FlateDecode -/Length 3231 ->> -stream -xœÝ\[oÇ~ׯؾRŽwî³MS vã"yh“Xâ  ¥•L@2m‘Žýï=s¿ìì’W±!©ÝÙ™sŸsÎ7ë'¸iá?ÜH†XÛ5RuHÞ\Üž´Í5üÿ0‚1—ð»rsáï.°B”b=æãÉÏÍ/p÷F~wÒ"Ú©æ~·w]s{ C+÷÷ÍÉë“ôŒ§¡…Å1ê8ŸXÜ<ÖÂDö—ŸÏ³p²XHÞ!*;=Ý‹ó“篘j:Ô Úœ_(†D b®ðæüÖ;}}Ÿ®Þ›¯kóyÓŸ5 ªhsúýYr9]nÌõ¹LšÓo·ý¹²Ü®Í÷¿ócoþþh>?Ù©íÐþ¶‡5(ŒÙ†yÞ˜uíïå¥f?WÛ•8ÜÖ ¹Å-©ƒi—oSê'É\¾÷‹Ù¿¿P½¼Ym-ó¿ùA/Í ;Óí;ÊÍïW~sv<ÿîä›ó Þ)„ ˜iÔÌ1Šæ„"Iš…~jj²Ç4YÊ‘˜¬/FM8˜Oš,o‘ÀÄ™¬ÕÖÌç¯Xm ÁLµ *BH‹¤ž4®{ ~ºI>m‘êhÁÈýöSB0öskÑ¿y´PN‘˜‹;Ù$T)ÔIYpñ¯œLËËÂQ» jµtŒ5 ÷È2ñoãlnt ‡ipêo—ÞÇW›¡Üu³ ÂO7) -Fuí -Q|Z “DÎêsá„Vg³‹çæÛEÚuòü6ÊñN"¼HgFÍÑ(4ŒþxQH(ÇAÙ`ƒ1 -‡+°/Ì#° -øÂˆú ï¿cQ&™w–(3E'!µR„þdH|6>æ!PêÑÂ&Z³8_Égæ{0'X_Îf¶üÅq[ÊÇøj랸 ƒ’Éa“&* Y…ćÁƒÎÏœc÷WÙ_.-é}2`¯~é}˜‚ó²Â‡uÌ$¼~³5£G¨45MµBŠÖ¨¦pûT¢9¨ -Ay}W%Ëv‘ÉëdRê¸t²Xدw.Jö!ÐE¶™í)D6í0b‡Å5Èö9#SqMH…ZÅüÞ|f„М~e$þ•ÿóíDŒ‹kAq qÉjár’/Ö`൧¿Ú/¿óÚ]Ñ|æm-në3úŠ9 RE¯{›$ÿk?×H@C‡ÇÓªLc80Os¡õÝâ.éjn Ædj+û«‡‚Š„2Ð|‚‚¸° _}Ì2Do{wò»^;Så®Í’:AÕ™Ù½¾J "×·ËÕ®¬i -¡eÞnƒ€ì+5\À'¤äepùÓþÁ%®q É1º4×¢KFó‹.óˆÃU{S -¤~ÊRƒVqoN­‹ŽïzP¥âÒ휡ù«­"Ÿ³¤…ØjÁ!ÛËÃiŸŽnhÇè°I&{ŸwWÜÈzuÖt"wé{ÛdsMíˤ©GË Ö4ôÐ>3‹äw’Xñ盕u -t5¹¾±Ýc]´ªtúÃý_j)lkQåýøkCƒÝÞ%Ÿ›¿²¾ó¿,Ñi>{“˜ÿ"x¨•ÂÖF„ØÅÕ¥~_¯[‰ÿS½3Ѳ˜ußj@D纗iΈΪç0›`q:Ž!tà0؃”–Y­ -­n; Ö2cÒfèúòr46ܘ´XÑ„!æ±íºÚÀƒEbLÊe*ƒ^ÀV¦VĶ…ñg}Q[f!÷I„c[,8‘±Œ¡æh%Û­‘ØÎ¸íût€¨ÙHÍt²©œ(ú0ÏÆ -Ê@!Q÷––‹ nº.ês.PÇöÛœ˜0&zÐæTyæÑÊMÎt -)äL!IÆïºÉyëÃþ˜ ¸wpïÛÛHý>¡{›;ø*ÃÊéŸëX®—‚èòO6‰F*߇UÒZyò¶N tò §‘ЋŠ3 ¤j’uj·¸é&ù \"Κ3r,*ÎZ‚$Æsqâ§›äDïîd=9'{ÁÁðùÏÄi·Ž‚·ÌÃQæ-Ÿkg˜µÛÁ[}‚kª ©+5%IÌæl£ÊÚ—îf>¦½œaœN5²‚ü|@(®b·ÁÈç /šxN_jà-$»Ú3ò¬¯]®2 -_*K›Ou\°Kº¡·K›È™“Wºèxçwå´·ïo.͸²Éò>«ÙÐ(Ñ`/³oWê” Ïóì }%µ -þ8‡ðŸ„7:,t¦³LÔÚéÆü‘uâúÊ^g)œÿ$óu–»ãÞsBwúãL$œ"ÑûdNâÝHO~Ss<Ú!*b ³Àš#CE¬x3 ðcŠˆÍT­¬D*pܺë˜È'4ܙ̴Hë7UN ’<Öö…õÒ³Ô¹GrêÒí&?,f²Œ?b¸Ð·ÛÉ# -L€au]fVÇc*Œw!iKé*ùì“&gŸlBÉ•”†]؆wQ.ó„»BΪí29›¦(eak½~_4%ÂŽ;ýõ]R(Ó‰>¨½ë¤–W,yƒkQ´Zxf±ÏÃy¥©Ây¡8ß`IΘßzʽ÷6Ýè5-0¢-ÌÎq9F[ÖɪYõûÅ,:&T,g8~÷$¢ËœÇŸh…ul2¶h`ò™cËŒ8(Ù'VD>ç(TJ±ÕBE&¶à ‹8¨†:Ó“«ôã!74÷ÂûDä)ªôèˆgpï9ÔòïÞ]i|–.Yæ–mW?ZïÆ‰ûÃh/V.„»âbømM> kõ9 –ˆ¥ýÚEÎC`K’ÛÜÞ°%²€-Í[êd| -¶$liF[B•²™ɤýwÖ†èݰ%Ó´c¯àEÂÕe@Éô~ÞÛ/›ƒm=ÐcôNÀò4ÍšT™Òl -Ð4Ò.M²:-4² IvÆÒV!BñAºšÐ$Œ=Ð4Ï@ÓüzuÖx(‡Ô,Áp³¾¯hâûÅIP=³Õ&£~C‰À#Ü€<šñ{"fl‚<}Jhy´,$˜ù»5š[CFx j¬¦²›þ`Б2øî¦°°]0©Ãü -¦öÌ£1Pè Ϊ;•Ãa(…/4ýk«ÚñÞíc¢#0*ÿ¬P˜¿ú&-'ˆœ£FŽÂuôiw,ȆÁTç,u¨‹ðS–ªÏ«Iß)<ú=ZŽ0lÍɺGÁ´³M²A j¥ Êœ£_£•¤C˜‡?Û$#ÁA~  -FªoÒŽ½+» ˆDß=_˜…b:Ã~¶I†™ ˆ®`x¿÷e5{ñ}Ùpôñò}º‰Wi}]Ö‡šy$ôB¢H¨z¶nüH°!úP*›„xpLø -naD½ð~:L’y!3D“):A±Ú†r:Çß–u~=… Gåÿa’c ÎW2šú³P]Áhù¾,¸’äE¦³QøL6룎 ,úMÏXIT±§…Td›îˆ’ͨßéÞkWœgÕ keM¨ ØÓV€6CºF29}BÀiQו¯¡íù -/G¤“ÓâHrFÞïÞˆuÔ‘ò¥€9CU2ËÌ?•{ã§pc—©U]-ŒaŒ„[Ôª<-j ::¤ve¿¯  }° -s˜!úþ8"<Þ¶|Ââ©V‘¥×è3!;d#NŽJ< e@MÏj*«¬ -[sËëV¶Ã™¢s¶î…2<Â~á\²³»ñ#û! i–¦öC0kަÞåºÛ“y!3ì‡%j¸fdþ/?^ø¡¸8²êÍxç–<“Bæ>¥L*%RZçbú¯#·ˆ±òL§Í¬PnC–ï}6ÄKÏ¢•±xxÇF¦8tÄGRÂòw¨ËÚ©FêÄrÿ¯/æÑ‹~9ãƒ^Öªëwž4< !œ"j‚áàŸ–óa¡ƒò×ß5îÀ#™lÜ+KU ½¤5@mœÉ/öÃÉÿUšûendstream -endobj -115 0 obj -<< -/Type /Page -/Annots [ 116 0 R 117 0 R 118 0 R 119 0 R ] -/Resources 120 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 121 0 R ->> -endobj -116 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 501.023 328.584 542.975 339.424 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterator) ->> ->> -endobj -117 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 456.155 318.562 491.651 327.279 ] -/Subtype /Link -/A << -/S /GoTo -/D (readable-iterator) ->> ->> -endobj -118 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 503.365 304.276 542.975 315.115 ] -/Subtype /Link -/A << -/S /GoTo -/D (writable-iterator) ->> ->> -endobj -119 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 1 0 0 ] -/Rect [ 456.155 294.253 491.651 302.97 ] -/Subtype /Link -/A << -/S /GoTo -/D (writable-iterator) ->> ->> -endobj -120 0 obj -<< -/Font << -/F48 38 0 R -/F55 46 0 R -/F8 42 0 R -/F64 67 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -121 0 obj -<< -/Filter /FlateDecode -/Length 2958 ->> -stream -xœí\éoÇÿ®¿bû¥ šp<ç©ë"nãÀùÒÄP¶QP4m« $[¤ìAÿ÷¾¹‘æ¨aÀðjÙ7ïü½7Çòà i0ü#MÇÇCÓõj[Ñ,/OpóþïZpÞ".:8Ï<œÛ§sÒ#ƈlóáäEó -ž¾†–?œ`þùç‘ah.Ox×#N„¹^Ÿü|òÓg½cyÀÐ9Aƒ…ÎÕké3Ó>¦37º˜wb@¬$¹Çg'žð¾ÐвæìÍIÏQ‹Am-…;¢9{ ýÍ_¼>³‹õgµÜ^\«³+u\¬O›9ëY3;;m†¶™éf‹Ó6û(¼¤onÂ7àöÓ­y°Øj’7öɳÕuã6êúru¥ém7¶áËÙÅ•=_hF »›ú±ìCŸ=Ñœº>áø ƒ ‹KB·ÜS&–— Ž/OOÁtg?œ|wæl"Eœ¶M`’C,,ÝðVùZ‰Ú}:+eh(J"‰n>åªL Ü=U`Ôj<õ;¥é©ãû@÷«M`)ï©9(ˆ´¼ñÝ ƒ%V‚Â#vŒ¥x¶ÚÞÌ_®(ÝîßV¼9à ÚX Ö­¶Ž–XI Ö„û>ão1Ÿ6&Fء؟3De/ʱ[Cágô ôËÍX\‰ÑŒ°:âZb%q9 #¥C"î·¡ica€*¤p³Wέð<‘ýjò£œë€ôv¾ ‰Ž±ndªèçWƒ˜c‚%‚Q×çÁ—àQʦàG˜c^hËi«¡½âÁý°åÇ…Mðt­ŽÕñ¹:>RÇo‚£¦ B-BfÄá —³ -&j‹€Èˆµö—kðfÚ+±åTÚãÕñ<™“¶…*Ábû ‘¼Äôq{œßš^ª£VMÁVešNÈTpƒ‡X5|Wß[þvgïm]üùTn<=LŒ;ý¯QÚDÑÏÀ™r©Á´i Xkòù"„jí—¶Züv¹ôÕÉž%§õbÝéȾX_hoG¦Y†+´Ù‘m·;T¾èBuM3]Ãñ•‹Ã@QX©zb³'p)H½Ôþ¾ØlÔX»QgÂëmjë ,æ®\R”¶5|¹9С] -„pDqïPáyŽe0»³m.å`‚vV«µÓ¶í.ßEûà ¼ïè ¨`ÁΖ޳ÓF(«¼¾–Î!8SZ€uVnUwœ+Ÿé:¥wÙd1 )kKú©Öœk"´õn²’Ãð -#ÇêòZ»ÎrõÞê_H[àÍ„ôÍ7ÚßÖý@“R‘Ÿœx›3ÖðoW¹"cð÷*0wCº•½åÈ*l±Ž±²0*ôµ¥íh¹µÆâñÁh“ì.c¥G†¹b¹A2maÐîìéU‘²!œ¦<õìÜr+ô묷3Ñ"̽'ÿ5àg3Ê3WA\弃wPü{jŽN.Î(¸KšN•E.á"#Âòw—ª)ìFËW®‘Â:àMp Y\åt“ðàgJs2®æÔá]/§ºFŠ¡®rôz$˜obCdù Ê Êëí‰ mëÆ¾9<§Vßç -EšÙ?5Õ¥üƞ탾 ÒWsGµwG4.“l’†–Bì4§'puÝ«–Ƚsosz-…!$$“ÂLIËh™ÞgMBïšû_Lí=Ö-îgÊrÏé½êqÊšÀ:‡[z–™pç±÷=ømÍqt‹¢}q~¯¥õ$uæ÷0E=ƒÈ÷ý2®5ÔŠbPÂf©ÏðqŒh%14­¢x ù°Dˆ]ç÷ê¤lf2Ïeuðñ®ë’¤~×TŸ€-Œ½ëHn©eד}m"ûn“}†ãÉ>9 —3ûNéY`©¢‡£ÀN90R¾@§°…÷1Ö•æè’‘ ¾Zš Péì+¥ô?ÙËŒ]IJ’ψ’„i]Áþ~ - j1h ¢ÄãÀV—°÷‹a FΜ“d‚{¯2OÛâÒž„Ö4ýà$ª‚á¨lüræÊuý(¶4ŽóxÄ´¥øIµy°¾ŽYô}èŒ;–éj§û*È V¦¹ÄÀÏdøô½‰já -l‡ÌäÙ¶6 Ü…ípì´ j@Ÿ7 ©¬Hÿ™Î•Üž0ŒZÞï3u9?G°L ¾ÝcÀ¡Ú·“ðÊHc¬¯¼(h;¸ ð5FÖx! ES7zËO`´ÐµŸE¸Q^0Ûó}ˆäCx<³,¥^KhJI÷ÃýóQ§ö¼·; 5“E­¢ó—Bº­'´ff½ØÎ¶W -–£H€5—ñhèh1ýÉý„Eæxxþ«BúóÔk,Ö¥Ìö™ä1»Ü*ó{x®íåÙdf¬"ŸMŒS¸Ä‰÷‡$caà®R…ŸA¦íã2H$À(ƒplƒÊ-*qõe¦ÎàFµ–¬úL>¸ykNž}F¯n=š§Œ¦í¢¯ÙÃná2ÀÊ¡Zîàzº s ÙTæ6é…Ö <ÒrºÏ}Ì6ÈMÁÐC¢ßc/Âñ.ÖÄ0*«’¶8ŸÍ€ŠE Ã’AâÇiT ú«j)û9T‹Ø¿oT«#ŸAµ’qªEâíŒjw[Ì"S‰Î,æp.iŒsrs´Ú¸GÃÊR_fqŽ#Öz²wáœn=šq.¦¨ýûi#‹Ð›À•ò[W îÁ»éºâÞ°G¨6ùðìí {m‡äÅìÑ0fhKãèIóÔ«€\Âläbf¹ÜÚ#­ø=»ç¶©;®'!±Š6,$ g!1VFvÎÉm„p[ &ᯠ-÷þ -ü[ü‹ù˜ßñŒ‡ÌÖs÷¦ìý÷`…Öê¶ù°„¸ï7B¼J>Aнd·2¬C„òŸL !ëh1‚¡>†º/ª†CrZ×=¨èÁ»‡í‚CžzJ˜ÍáPÄì‘áPmX*ÎáP¤ŒóQÉÔ*uªðêQ§À­CˆÛG_êTÑâQ NÝ] T.j Å™+Ê8¢Ýh!Ù;XßG•] )Ï9ô‰x>2ô©£ ?:ø‰´ñ»ìÈ0¬fï˜ïª#À—µ ¢rTª[ê‹QIå™AÉ®Qéû¨• Ϲ¨Œx>²¨¬£•º¨Œ´‘ÊG{De¾¬¨¬»5‰Àh wå©ðtÑ‘¨.úÿùÑÊœU6I¥zË!C¤·ÏøÙJÛ¾ sD¨_ð ¬ëN¿‚jšÆ•gò¡¨³—&± ŽÉïhÙÝ~øDáNËù;êb~Û0層gð´Ëͯ:€zDE>Þ5¦…v¨!3^‘€<%ÛÙO'ÿ*STendstream -endobj -122 0 obj -<< -/Type /Page -/Annots [ 123 0 R ] -/Resources 124 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 125 0 R ->> -endobj -123 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 320.185 137.651 393.569 148.49 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1519.htm) ->> ->> -endobj -124 0 obj -<< -/Font << -/F48 38 0 R -/F8 42 0 R -/F55 46 0 R -/F64 67 0 R -/F59 63 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -125 0 obj -<< -/Filter /FlateDecode -/Length 3351 ->> -stream -xœí]moܸþî_¡ûf£·<ñM¢ÒÔ@Š^‹Ü—Þ‹ 4ȇwsáõÞe7/FÑÿÞ)’CŠ¢wm¦Þ¸Áá­D‘ÏÌpžŠýû­jøV­ ¢îªVu¤idu¾:ª«7ðÿß\ !"d 牛3Éj¢š¦š¡þ|vôÍ_…ª:Ò5¼:»8²4”´mu¶8zY?¿>©8«Ž·Ë·'PÑñZ;©f¼®Ž‡‹ó×úŸ«eYqxÊŸoÍæ×F߇“—W—ær¹Wýär²b8¾:©^UgßTH¨ºšQEúV@Ï jÑB‹çW¦¢ÍF_Ôë·ú .šöÞéã¥i[·ú83—®mMp•©êøÆAg ;0Rz4”RRÓÞJÍ?Sá„ù"¦Í_©-ÂÕºo§­ŽúÆòÊ)X‹ò‚~­oL‰¥ý½ÄÞËáunÚtÂle¸H¬†ª¨Ã<4¼]ZI¨` ª‘‚¿hMëÁ)Q0lM©Gq”rmÍKT·6ã øåÐs(éÀ|Α™›)33Þ&Ä)1h =Af̬Àæƒ]×ú¹²^2aü¾LÞø½ÿ…Æï¯<7í§Œßã0•]ØÒ¬«ô›-ÖÌra©l³\õíõêÜ"0ç%dW -5ecµqÅìÅÐ6öæk 9Ôç×iriá¬s]êcš\jD.ΩMssuÝ·,Áÿei•™;Hœ]¢« e"O{’0æJ¤%lˆ„ fËܘ|<ïð½|t/ÿ‚:ÔñÕ¹ÓyÐwƒ…„Úº±.íÎï 賈ò.Q£Ž¶€-ŠØæú/è:.‰ë1‚<ÕÇúxªOÐqžº@GŒa™R 18ÓM©ˆ*FZÄÂ_÷¶ç sHŠÞ%Ü÷æëd”"’û 5@¹nð†î¤œ›€¦OÎ- V÷ŠƸUøÛölŽLeDòûvAH%ïd(óíYœÙ6ƒ~§ú¼ôw(ù -î- wûî¨&¼SÕ8ëºjݺ%œÍÏ«£ŸŽ~¸Ë#¶}È!Zw4Ó²~ª†jÌ™)Ö2Ę5 PÉüšÖ5i€%ˆTÝ “oµöR±Ðä&6*ÑŽ(.#5e.×Aþ‚´K… ª–‚u!mmy)¥ ]×DRþ¸Ü¾CÂ][F>3é¿ïš:í ÂZÈúx)AlmYA$š‚Å‚<Û _Ò¥­7¿ÑÇï+žã[¯¡òÌ•E86<í–gcIN ´Ž„lH ¶™õOuâ˜CWßYŽ¡ü”k‚@M'œ­1í©š´ -LÝÔ0¶ð錛‡ÿdO>fÌW~¬ÞÃ2`©¤š£´/2>S›wšö™¶#  Ùˆ³Ù“© ÚJ*°öiޮߗ‘óñu|èT<ßïE«ß9¸®ÿù¦ŸO2]ßU_¦çO£u?†;Ùó‹@ó?„–ê÷²;uü íïí ED|áa²³Â¾êéT›u㦖ûAtRõ7‡ðm”ñˆ³JxD€YúŒÿ½ùǦ)(—_»é‡Ð¥F¦0PR¾—¾Fc¿µ­kÒ Ë(ÄûaƈÎ8ã%†€ÜÏÔÐ=»¶ƒ¨åïú~‡Ø¿…jÜ[¨å0rê2Àáµ$ÖþÚÔJÝd(ÓZ4b6šp½šã÷i‰1•ã€2z|ÆR (4G3Úퟌ8ðm”!sŠÌGeâI cDGFþOI ŒÞ Ô-~’%jfM£Là«Ý3ßFˆ0§H À|p$PF!ž2Ft$h$ ×'Üsk[w|¥à‘õwªï«d} bŠ€HN·Ÿ–ÊØâÑ d'` ×äˆAvŠHÊâì ê™ìµQ„bÌ b11Rˆ#†œ-1„ùB – -Ùâ¡3†À¡%KŽŸUG¸ä•lkènÍÓEzj Zç~f,9‡­@~Æ5;‰Hœù²É)ã¾:…ʼNrëf¬ãɵ@æÆsLÙéõúÒÙI¥8š´zWßæ®ÞéÅ"úv°Ìá:yÕ6»Çš]~¾ÐS&x~8N©©ÉÅM£Cö=ÎÚ‡«Ñ¬™lkj"&ÛV™©fãæYÝ ëo«åvÊņ.)ECx½[°lý õ>N‘xæÍwJÆlØM u ¡’­´¤ã{OwJÂû‹{Nwö> -ñÙ£º×t§©-+$•µ&—PÊ{OwÊŽ¨žŠ‹bkË -ÂZ|,äï!RëñÁ„§v7JýÒ³¥·b¿”4¶¢^0¥×%\žoƲs cAKÑÖ–•C^×€?†²ï4Õkìší½¥ÓJÉôeÔá¸'c:G=>>ޏçfî)ßQO¾cžþçI=e´0ÏC¬ -3‚1Ï®UJ‘ŽŸÓT{î‰Ð&È'D{päSF!ž}2æ³ôjd§ÐáȦ \Ï6¸–nB¸§Ÿ'Ý”ÑÛcÌtZF:•]!ÚFSõ×Ó]R_{¾‰Ð¦ø&@{p|SF!žo2æs|hd§²ã›2p=ßdà:¾ à~¦|SFo‘ošþ{˜ìÐJ4úíh†ùb,¿c`ßFÖ‰0§X'À|p¬SF!žu2Ft¬hÄÌyúÎc -¢éçŽ‰ŠˆÐúW÷?¾ 8Ç,£ï˜#:Ç 4’Ž˜§{DÌ""<ªT¨ª_­½³(Cù Çäª%¼Î®´_DKcÇœíà’¨öû€u.™Cë|2€»ÿþ G*$†s¤œΑ1ûˆá]nâ[Yª7r¡»DÆB¢»·Z±è*ñR+|„‚'¢G(÷—èñ@Ñãfçè‘Ü…ñÑ#³E:z|Ü1zDIÒ]£GGxøàH¿&@¯iܨÉo•ÌûOKÝÄÆ3­ÈÅ"ñ]Ší´àé ˆá§¨Ž_¢Aó0Œ&è‡ýØ&±é"AîaÌx=l ¼¹Ï«±í)X&äÉ]¥i§¿Ko*Ý 9²ÿÒÆ=?¢ë®#d‹E™Ͼ±ý3\â#¢›Ú}’ ëùÝ'¿¶M' 3TØä³Ÿ5·ÞØòZÅu5Ú9؉`6ðý ™|Љ_ ŠmB`Ï÷T‘{5á(•Ù[ïP‹[[ w _p¬A­,ÐyôþÇ=µ¯)ÿøH5yÿ­TßjØ »W±öÌ7"øë)\e)Ž°Øæ+t~*ÌÛG9X(Ç/£úßXÿ¶'ÿIö—f?‘1[º•IA~Kõ û˜‹eÅ|rF¡¥Œ"÷3ÊÅÈ'> FñÊO!CÊÀîñ¿Tøk$&PážvŽªŠr› 삎ÿä0ºGqåc`ÁWÛú¸B`æèq<¦½s»ƒò°«ÜÛ@Q*?c‚tuÛçâDqþÀ¹ü „©Äu§?qrþ=ƒèý ŒèÐŽÜ’à¥Æ™-i™ßù>ø[hq¹ -ò=Ÿêé2›`eææçš -S ªåWó‡NouX¿W -ÓïæÌfäæúÛ7ÃÉhøc Ï|éÑK›°>#Û?0 -2ö3óB"Ú¡=Ü”Á©x„WýV‡u4T³ErX;‘w4ĺïþ Ó[tа pvÄ틌¶Wølm%M|‰eÿÎѸµŽþ ©c"endstream -endobj -126 0 obj -<< -/Type /Page -/Annots [ 127 0 R ] -/Resources 128 0 R -/MediaBox [ 0 0 595.276 841.89 ] -/Parent 2 0 R -/Contents 134 0 R ->> -endobj -127 0 obj -<< -/Type /Annot -/Border [ 0 0 0 ] -/H /I -/C [ 0 1 1 ] -/Rect [ 260.362 445.078 287.809 455.917 ] -/Subtype /Link -/A << -/Type /Action -/S /URI -/URI (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1519.htm) ->> ->> -endobj -128 0 obj -<< -/Font << -/F8 42 0 R -/F55 46 0 R -/F73 129 0 R -/F64 67 0 R -/F59 63 0 R ->> -/ProcSet [ /PDF /Text ] ->> -endobj -129 0 obj -<< -/Type /Font -/Subtype /Type1 -/Encoding 130 0 R -/FirstChar 45 -/LastChar 121 -/Widths 131 0 R -/BaseFont /BJYTSR+CMITT10 -/FontDescriptor 132 0 R ->> -endobj -130 0 obj -<< -/Type /Encoding -/Differences [ 0 /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega /arrowup /arrowdown /quotesingle /exclamdown /questiondown /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /visiblespace /exclam /quotedbl /numbersign /sterling /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /dieresis /visiblespace 129 /.notdef 160 /space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi 171 /.notdef 173 /Omega /arrowup /arrowdown /quotesingle /exclamdown /questiondown /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash /visiblespace /dieresis 197 /.notdef ] ->> -endobj -131 0 obj -[ 525 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 525 0 525 525 525 525 525 525 525 0 0 525 525 0 525 525 0 525 525 525 0 525 0 0 525 ] -endobj -132 0 obj -<< -/Ascent 611 -/CapHeight 611 -/Descent -222 -/FontName /BJYTSR+CMITT10 -/ItalicAngle -14 -/StemV 69 -/XHeight 431 -/FontBBox [ 11 -233 669 696 ] -/Flags 4 -/CharSet (/hyphen/a/c/d/e/f/g/h/i/l/m/o/p/r/s/t/v/y) -/FontFile 133 0 R ->> -endobj -133 0 obj -<< -/Length1 1024 -/Length2 3799 -/Length3 532 -/Length 4487 -/Filter /FlateDecode ->> -stream -xÚí“i<”}ÛÇíB¶B–pfÉÚ,Ö,•5[–lYË4 Øa f";Y“}YBЬeY²D’J(ËX’,‰B²£ ¨¨¨¨*j*7ÿ·Ì‹ööEéÊDUUíwî‹Ç#±„ß?uAþbšºRH$ gÁÁ5"Ü3ê¢é•2ÊøœÌ*‰h|’¥ZšÔ8ö_ÿÊ)²ÎÉíŽ.ãJ_1)#PÊÓuÚ=VàÈQîv™‚l+æ¯ð%§«t½yÝœžwcÆDç¼ê徎‹ÿ˜òke¬¼´U½'°ËððýÈÞFGðËé1¶L„ø|:«s^ó¥4¤íç©;ý;˸BÜXqï §ìÇ÷Ç:&†=>²g©Åå™Ò˜º ù‹Øv„|(ü ,ÉE”¶,gb©ÁœR¦U/OgÜ̺&NQfÔMfÞÏ;|ê.•Cû#ÈwajNÎÐã#i.¦§DÎfÇÙëu³Öð> _0Zt¢K?­*q>‡ÈdéúÐóÁŽKÖå¢Rnö­u¡·VYË r<Þ*ôT³ —ض¹¹"ݶ„)˜óxÈElètí4ëÆy:A›ë¬7R6žõ0°º>Kç ¶­3 -Y"Õ„tµ -–¹ÎCƒ Ñoø`” m†{’¯'Ú¹Áî˜o ºß œë¢5w02$ÌüêôM@Ç”¹u nƒ“u3RwµŒe†¢V<¤²ü•[Ô%Ö .ìš–Hƒ@mýÉ#äÐçnoR¯‚ %³ß IX³ÚìŽi_Õ`ïð§·ö^§~¶)ÛQ®,QdøPÚáª+Äç¥5`³´àŽ9)ÂÖ¸nl`óm°´–å§è‹Ç(žÇ›žu#ö^B%œìÓ¿G+2¾YùÖûúÓZõB6]ÜÓ)÷âZÞ)ŦÄñÔÓà ”©´rÔq±¶â¹ -ޝ«WЛ1BŸ'ÞÚx缟bÊ “šªÅZ/ yûmœ/(RÚÒòþ»¥Ä¼Ê3+¥´ï<$Yjòß3÷½ dôì÷®¡K~û«ÿgY.9t|¼‘Ã¥5ÎËë¸öƒž5 -2‚÷Ûà.Šê~ È{ÄímÌ—üȾ­EWˆçQñ.SW™ýµ»›˜ù%´mÈY=‡Ü‰™£?å -܃úƒg*)¤$¥÷Û{Cêªôf9 6öPàë“áÆžŽÖ¦‰<¸|jcÒÓËVªœútò/k"(æ ºè3“~¤a·YŸ¾àŽI¶”Sˆ ­ßã/é,D®~[ŦÑám‰²Ð­›³ìjÛ÷înÀ9š#ãë_ ö®´ûZXßÛ gµxÕT+ëÍäÓÕÒER<è‹’h*‹Þà¶Ià›ewúžTŠ÷ZV'}(i&O?M±Êp«[Îu0 -yÏ-òAßµBsƒu"Ÿ‹Ñªt+»óÑ3¶Äíòc¯¶4ö‰¸K<5-“Ññ„Øe…Ö’\äâb ‘3Hçø¤{E› vÐåÕï‘—Dcló/^1M¨Ûé±²1&š‡?ˆÏ¶7Ür>š üt•^Á“9D{âtHÈV¹}wÓ-ã<âØy"{RîA«àvÂwßÛˆÀÊÁGmdˆîމ¹ðànœä»<†ŽÄ}'9JE}'‡¦ÊŒtÓ ÒÐÚM›w­« ãšÚyÿ{~´òyÒ´WLsqœän -ZøR}»CcQ€¦VÇ]–þ/t¦ÝLœ1~ ¯zyŽýòÉä©¶&ñg 5Ô›çNÅó³õ`™lP´1cêìnåëmÅ9x'‰nÓ¯N“·ƒ{þ¢ïµþöD}ËñNþWé3ì§ø67#…ZÐð(3Uht`†°TB8'™b;0ôŠS×ì|Õ^¶êåTáQa%˜¾YêùOy®Û·nûNN.EšÑ¤†”.ÒDÄtpÛ -c Kóáµõ7'Â>›¦òÏOìÇ¢ÌÚ¥½+¢ëi ð•4{½ ÉJäÀôRxgï5„öHhÃåùoŒ'42=Ulië?ÿmæÍöKW¾„Bÿ/’ÝKî‘•ÇÆ£ëh³2&2ûªRŠá0´€×£œsŽ(Æ&a%Çž’™ÇÖœíÆGÇ¥ÂKµÁº_c,µsïò™]ŽDò„¿Hí»ŒM®ãýxmO{[åd]hgší3ˆ~쬭žñÂó›”w‰ŽÖÏŠS‘þdWÄKfi˜òºÆÏ˾d=eÁ^§/”ªP§3.x»FJœ£Ål%¤ú¶6yz»Þÿh|ðeÛü gÒ+[ÿûÄæYS%{=ÿX£êŠó¥jùù<§RŽÛ Ö(KZïØçN2Ã=~¬Ëj X - 8š4Íí+²ÝŸkÏ -jÖVªI‚œiéÝ™ë¸Pô¦ØEEÎ)Í -gáÚôˆÅ•séÝ‘ãJn× -—ǹ0§Ãðð¶^n»éËŽ±¸ƒÝè;–èt‡Pà-µ&os#ñx²AÌIá×·ÚvØq7ë¬ÝrógÌ+QéÖKØÏ¦¾6´ÃÝM;^Jãw˜¶Üm9‚Æ®G‰.€bº–š‘~A9⭟܆2únùˆ‘Å[ „]£÷y -Lg²{õÎTÔD>6N ‘PÎÌc ¾E{1|CkÔFèæ2÷VàÐ')°ëŽÛ˜i2!¸@Ö ¡áÝNaª¾#½CgƒäHºjU>7¤l‰¿ÞR‹´Ð€k×%—•¾¥·{ëÀghxÒk.ÿ>Q|u¿ZÚ2ÚRåÜܪéýJÒ˜HwÅÁàøñ¯áÄWÆŸ(6U¡Ää9iu‡LPážH,7þGé)ñoµ:Ïòƒ^½ö`q‹f…0ÓÍD˾X¬pcº-~ül'ë‡G˜éä/ôÞ»ÈÙœ+h(Á !ñ—> ­7ÿQX†¸àŠÃ™kzG¾D)1¿á³vûY1›ó¹"‰÷eAà(‡ç>eµ`À,l¥vn#ξɡZJ3-^ðÍí-Ò:û†)ñB””íOĄǾª%7RU‹Æ,5¦•\£lXõo$¦ ¾”îFÅ31LsŸ9( ‹Ÿ—ô¿Lþù}ñZræCväÚ:W½–Á×'åj††¾.„%êŸ/ð’}ÙÛïVa)zw ý8«8äSdshd>Gå}#b=ýËŸ ÁµbzàõNCšN‚ÈÇ:ïé5µ¯|=kZ±Ž~ºÁ‹-†^ÿË*3=å$ŠáÛÂlþ|ÕV—9×´PÒ¥lÏá’Ÿ-4lUo“˜)mÈÚu‹*Ò+Âûƒ¼+·ò‹ìß]îô‰JiÖæ+T ¬’r›w8`\lˆäþjm¿±B±. ÝG7MŽC—džz«'÷$µ‹‰Ò,ŒûÝØ×®{.¹ž…4UW> 8›8òž‡É™…yUV‚Õ>0¨G£4ý+Ývɺ¾¸ãƒ² ¦W[>]Éò°¾m^owTZ°ºvÏ6 rà»ïƒA1¬Ýj=’óê_XG¥%ym̓%2ð6͸àMÎeL -¶6Ð'wõ¬ä@”ÂjN4ÒÖ -Ð݈=—' 6'¥[¼‘ÒgíCßøõûé*97-{‘GæCoÏÅqœrÍ(¿0Ü}@ñÂü:uŸÆO^F¸«¥u—E·ôèG."èônM"ykÛ*áNí\"(n@P“/¶)2Êèîz>YY^'\m±õ¾L/¹±ì%²ßO -µ¶û5æóó̧î‹oâr¥Ï…™×ÜëŒQäæ|]!½¸?8Ñ’B¹«¼‚ñküt“öRhX脘f¾ñæx08òÀ)LAà Ï8ûÔ¨Ž,µ¼Ñ.Ãu¬}¸ÇÑÍîvÍ.ÇŠ¼5)3êÝ&3Ì$E÷ú&ÃÞÌZiµ¿ÇÞÈñ´Oü:'èŸG‰þ²´tÔZf£Ó8¾Ú4š§&œ—¼Âq™˜?Â3À.W¼™v¥%/† ¥ÉdPãé÷©Zä2P«Õá% Î{Í6àÒ]›¾AæO“|'Œ‚HØšâJÐj7ä¹Ì‡jãùbÍB6³Øâ‰½<)»&©Œ!RAºf]ª[ç¶^g«ô¦öuýi®Õb—òý~²ôž3)Ô•¢wVp-.¤~¨ï -KžH…Ó4'ÞŸkRèîa¬x rMŒ‘°ÐÈ5b Jò(MáèzØ9•¿¥ká7ïZMP­lTymrm}]|‘ÄÈÖtE뼚¼UG׫ÑÌõSÚnÄärhã0åM»GÇ¢Lä ¿ãiþØyÅïÈòÓ 4YVì%v§¥“ñÌA›¢×%×WM>>Ñv÷Ýã_šH4ƒ&tTÝ襕ÛX*Æ©M5mZÖíY›‚e Ò•ÞšãggôÓ™ìb„ šæx<Ó>ý=û»Â‰¬?CÖ;.e·l×4S0º›!Ê_"ÌÚ*9b|õ.Deþ´¦2M©¾læÅ°Eµ»ïVU1m¿.è§IØj¾4™yùNÆ)͸ªz âÐÁÖŒì Uë¾Up[;k=ùÞŒ-o ̵/¦ÒQ?OT¬®ç„j׺°DW¿™Q´3ñ·|¤V•àƒÿ8Ö.ÿTÊÑs÷Üô“EWÉÆ‹ŒÙoîq^H»c\¶çŠ?[°»7Vàg R¤hûÕJéhÕwé…áŒeg«ã¥j{³úu§œØÝž$¥…c`DrY\Ñ}eÍH|æÛ¦}5ˆ -9¶àºòݯ zóS¶üÞçµ Ç*w?Ó^xfŽY­9Â4’øv}óÖñáÜ ™§ÈŽj”0Þ°p~æd@ì}{ñ‰g<Û~rm…b}Eéñ9+1©ãWO }ìNWv»eþ{nÐ0´–åm隤¶íÖŸú¬¶Í,N§Z—è·XV{dùÙ”åË—–6 s%¦®žÐ¹ ÷‚Ù%¸xý -gv<÷q±e#iÓ¼VØaÁÍ+Žï¾NJ8dNmµà]wL:ƒ¬8tÖ:ħ-KzLªY>p;{g‰'%¸Ç`g.ºSÕm¾ïÜ'(å*&>?ÚûZ8%¦‰2¡Õ; º½Üá\˜sòZVdrïʲ]×°•ñ³òä÷§‡¼x&e ù?>¬ÿIðo‘ŽAÂðœ' ïÁú_mûºendstream -endobj -134 0 obj -<< -/Filter /FlateDecode -/Length 1271 ->> -stream -xœÝYÝoÛ6÷_ÁG{¨XñC¹n{ذö²Áà -4Cà:r–Á_µÜÝ_¿)Rg‘ò×i“¡(MIÇ»ãÝËû#9üc¤”T憔ÚP¥ -2_rrÿ/…”ŠÊ¢„yâcVðœj¥H†8|?½|­‰¡F 2]Œà‹()£eI¦×£·d|1Õã[;ÞM×d\­'$ ^ÌÂÌìíXíìÏ ž8ovžfï–´_·ð–+ ž?Èô'P¤(:MXžSVjPÝiñ&P!u Ê9 $/’Œ -»iOã´¬íxeG§jå¶ã5š¿³ãÑ\!sìÑûZåÞoÐûoìøÆŽßÙñk4Þ¡µNÖÏ9Þ4+ -yØÑG¤OµD¨“æà%- VGdrA6=+.ìøÂ:·ð³;hlÀŠÿå$Ì÷IÕÊœr˜y!³”"š -^’Íâde’)ÄIÆ5ðå¦h^v*}å]™pœÓ늙‚Œç›µÛƒ±‚Òm -Œn]ÀZÊ¢œ–ºþÿÚ+ôSb>õ§Á»'%ø‚_QÅv ˜;´9è§@_P):Ð/"}ê#Ð7TvѶqzþ‰ÓÜ}ëÉŠ¦ñƤò­Ã›:³3î"u´½ãîé™~0ïH aÓO>Ëü8*VRVOœE ˜r5pN5Ö`-´ÞS¥èt1pN1D8…æ‘ýœUn"[º½f‘¥³Smœ:ÀÀÛ¢ès9>éà8W >H.÷rjÒËI -9ã` ÖD@ãxŸqÜ’(ú4d°Îˆ OÑû¾r“V„W7íï®]1èÂeJcÃ)3r(U»óµºÌ™´3—zªë‹e{&.Q,‚Ñàߎ*5ÍõéƒÖŽ'yFóCÜdÁ´ß¶‹3“SY&“ëÂÓv,ÜsçOû8G;Yè}ì¶L‚9°ˆµ¥9âãx®Ð|ø¿tž–ü¯"þ7‡±ÚÔšõ®CX[·ö’²öÛt^yå}‘dU!eÂA‹­ôùüÄ#?ak†+D²Bœ¡Œ8Grk4žV<ª‡cƒ'‘oó£ç¢¿Fsì›yÄëGê“BÏclðs G=ô,"_Þ£ííÑŸ 2ªüy¯gœ3n·-²ïþ©zºF*­óø‚²E -œåÔÀkùÿ›Èë_êa8Àø‚WÚóÞ$Ú×HÉÅ}o‘-ÒrƒôÀûY ëiãÆÌ³çTlYÔß2„AÁ'•­°•¢ -Š ªïÖ×bÚ2‘{–nküPÕ©8'Tí:×-·i·wÑèÿ[{¼ãÂpêjÛ^Þêî" lXÛöl~«-úÀjnþ/5wG¾Ž‹j®šrÒ)¡äÍKW97v7íäWTC{ê ‘÷ÿHÒçèìãb3 ´¢š‰CzÕ»§9*¹ÇÇI~emPĵ†û›ùï®­|1`_ï‡:ÜõxhÍôR¿[0»ö„CIuÚ”ñ¥™ƒåªjÛà!˜Íl"œq*sÙ‹Ò:€nî¸Î–HÄß³ƒK꺳@Ó«™í:MQ—›À·æ]§'k›V‡-ùvãaw®7Ôâ¶Þü¦Z ¦ <ê[ 'tk`”wM:Øm2šòB'!ÙRdIHé*JÏÄÉb,æÿøKûeô,ÿÇendstream -endobj -135 0 obj -<< -/Type /Outlines -/First 136 0 R -/Last 151 0 R -/Count 6 ->> -endobj -136 0 obj -<< -/Title 137 0 R -/A 138 0 R -/Parent 135 0 R -/Next 139 0 R ->> -endobj -137 0 obj -(Table of Contents) -endobj -138 0 obj -<< -/S /GoTo -/D (table-of-contents.0) ->> -endobj -139 0 obj -<< -/Title 140 0 R -/A 141 0 R -/Parent 135 0 R -/Prev 136 0 R -/Next 142 0 R ->> -endobj -140 0 obj -(Motivation) -endobj -141 0 obj -<< -/S /GoTo -/D (motivation.0) ->> -endobj -142 0 obj -<< -/Title 143 0 R -/A 144 0 R -/Parent 135 0 R -/Prev 139 0 R -/Next 145 0 R -/First 199 0 R -/Last 199 0 R -/Count -1 ->> -endobj -143 0 obj -(Impact on the Standard) -endobj -144 0 obj -<< -/S /GoTo -/D (impact-on-the-standard.0) ->> -endobj -145 0 obj -<< -/Title 146 0 R -/A 147 0 R -/Parent 135 0 R -/Prev 142 0 R -/Next 148 0 R ->> -endobj -146 0 obj -(Design) -endobj -147 0 obj -<< -/S /GoTo -/D (design.0) ->> -endobj -148 0 obj -<< -/Title 149 0 R -/A 150 0 R -/Parent 135 0 R -/Prev 145 0 R -/Next 151 0 R -/First 154 0 R -/Last 160 0 R -/Count -3 ->> -endobj -149 0 obj -(Proposed Text) -endobj -150 0 obj -<< -/S /GoTo -/D (proposed-text.0) ->> -endobj -151 0 obj -<< -/Title 152 0 R -/A 153 0 R -/Parent 135 0 R -/Prev 148 0 R ->> -endobj -152 0 obj -(Footnotes) -endobj -153 0 obj -<< -/S /GoTo -/D (footnotes.0) ->> -endobj -154 0 obj -<< -/Title 155 0 R -/A 156 0 R -/Parent 148 0 R -/Next 157 0 R -/First 163 0 R -/Last 166 0 R -/Count -2 ->> -endobj -155 0 obj -(Addition to [lib.iterator.requirements]) -endobj -156 0 obj -<< -/S /GoTo -/D (addition-to-lib-iterator-requirements.1) ->> -endobj -157 0 obj -<< -/Title 158 0 R -/A 159 0 R -/Parent 148 0 R -/Prev 154 0 R -/Next 160 0 R ->> -endobj -158 0 obj -(Addition to [lib.iterator.synopsis]) -endobj -159 0 obj -<< -/S /GoTo -/D (addition-to-lib-iterator-synopsis.1) ->> -endobj -160 0 obj -<< -/Title 161 0 R -/A 162 0 R -/Parent 148 0 R -/Prev 157 0 R ->> -endobj -161 0 obj -(Addition to [lib.iterator.traits]) -endobj -162 0 obj -<< -/S /GoTo -/D (addition-to-lib-iterator-traits.1) ->> -endobj -163 0 obj -<< -/Title 164 0 R -/A 165 0 R -/Parent 154 0 R -/Next 166 0 R -/First 187 0 R -/Last 196 0 R -/Count -4 ->> -endobj -164 0 obj -(Iterator Value Access Concepts [lib.iterator.value.access]) -endobj -165 0 obj -<< -/S /GoTo -/D (iterator-value-access-concepts-lib-iterator-value-access.2) ->> -endobj -166 0 obj -<< -/Title 167 0 R -/A 168 0 R -/Parent 154 0 R -/Prev 163 0 R -/First 169 0 R -/Last 184 0 R -/Count -6 ->> -endobj -167 0 obj -(Iterator Traversal Concepts [lib.iterator.traversal]) -endobj -168 0 obj -<< -/S /GoTo -/D (iterator-traversal-concepts-lib-iterator-traversal.2) ->> -endobj -169 0 obj -<< -/Title 170 0 R -/A 171 0 R -/Parent 166 0 R -/Next 172 0 R ->> -endobj -170 0 obj -(Incrementable Iterators [lib.incrementable.iterators]) -endobj -171 0 obj -<< -/S /GoTo -/D (incrementable-iterators-lib-incrementable-iterators.3) ->> -endobj -172 0 obj -<< -/Title 173 0 R -/A 174 0 R -/Parent 166 0 R -/Prev 169 0 R -/Next 175 0 R ->> -endobj -173 0 obj -(Single Pass Iterators [lib.single.pass.iterators]) -endobj -174 0 obj -<< -/S /GoTo -/D (single-pass-iterators-lib-single-pass-iterators.3) ->> -endobj -175 0 obj -<< -/Title 176 0 R -/A 177 0 R -/Parent 166 0 R -/Prev 172 0 R -/Next 178 0 R ->> -endobj -176 0 obj -(Forward Traversal Iterators [lib.forward.traversal.iterators]) -endobj -177 0 obj -<< -/S /GoTo -/D (forward-traversal-iterators-lib-forward-traversal-iterators.3) ->> -endobj -178 0 obj -<< -/Title 179 0 R -/A 180 0 R -/Parent 166 0 R -/Prev 175 0 R -/Next 181 0 R ->> -endobj -179 0 obj -(Bidirectional Traversal Iterators [lib.bidirectional.traversal.iterators]) -endobj -180 0 obj -<< -/S /GoTo -/D (bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators.3) ->> -endobj -181 0 obj -<< -/Title 182 0 R -/A 183 0 R -/Parent 166 0 R -/Prev 178 0 R -/Next 184 0 R ->> -endobj -182 0 obj -(Random Access Traversal Iterators [lib.random.access.traversal.iterators]) -endobj -183 0 obj -<< -/S /GoTo -/D (random-access-traversal-iterators-lib-random-access-traversal-iterators.3) ->> -endobj -184 0 obj -<< -/Title 185 0 R -/A 186 0 R -/Parent 166 0 R -/Prev 181 0 R ->> -endobj -185 0 obj -(Interoperable Iterators [lib.interoperable.iterators]) -endobj -186 0 obj -<< -/S /GoTo -/D (interoperable-iterators-lib-interoperable-iterators.3) ->> -endobj -187 0 obj -<< -/Title 188 0 R -/A 189 0 R -/Parent 163 0 R -/Next 190 0 R ->> -endobj -188 0 obj -(Readable Iterators [lib.readable.iterators]) -endobj -189 0 obj -<< -/S /GoTo -/D (readable-iterators-lib-readable-iterators.3) ->> -endobj -190 0 obj -<< -/Title 191 0 R -/A 192 0 R -/Parent 163 0 R -/Prev 187 0 R -/Next 193 0 R ->> -endobj -191 0 obj -(Writable Iterators [lib.writable.iterators]) -endobj -192 0 obj -<< -/S /GoTo -/D (writable-iterators-lib-writable-iterators.3) ->> -endobj -193 0 obj -<< -/Title 194 0 R -/A 195 0 R -/Parent 163 0 R -/Prev 190 0 R -/Next 196 0 R ->> -endobj -194 0 obj -(Swappable Iterators [lib.swappable.iterators]) -endobj -195 0 obj -<< -/S /GoTo -/D (swappable-iterators-lib-swappable-iterators.3) ->> -endobj -196 0 obj -<< -/Title 197 0 R -/A 198 0 R -/Parent 163 0 R -/Prev 193 0 R ->> -endobj -197 0 obj -(Lvalue Iterators [lib.lvalue.iterators]) -endobj -198 0 obj -<< -/S /GoTo -/D (lvalue-iterators-lib-lvalue-iterators.3) ->> -endobj -199 0 obj -<< -/Title 200 0 R -/A 201 0 R -/Parent 142 0 R -/First 202 0 R -/Last 208 0 R -/Count -3 ->> -endobj -200 0 obj -(Possible \(but not proposed\) Changes to the Working Paper) -endobj -201 0 obj -<< -/S /GoTo -/D (possible-but-not-proposed-changes-to-the-working-paper.1) ->> -endobj -202 0 obj -<< -/Title 203 0 R -/A 204 0 R -/Parent 199 0 R -/Next 205 0 R ->> -endobj -203 0 obj -(Changes to Algorithm Requirements) -endobj -204 0 obj -<< -/S /GoTo -/D (changes-to-algorithm-requirements.2) ->> -endobj -205 0 obj -<< -/Title 206 0 R -/A 207 0 R -/Parent 199 0 R -/Prev 202 0 R -/Next 208 0 R ->> -endobj -206 0 obj -(Deprecations) -endobj -207 0 obj -<< -/S /GoTo -/D (deprecations.2) ->> -endobj -208 0 obj -<< -/Title 209 0 R -/A 210 0 R -/Parent 199 0 R -/Prev 205 0 R ->> -endobj -209 0 obj -(vector) -endobj -210 0 obj -<< -/S /GoTo -/D (vector-bool.2) ->> -endobj -211 0 obj -<< -/Dests 212 0 R ->> -endobj -212 0 obj -<< -/Kids [ 213 0 R ] ->> -endobj -213 0 obj -<< -/Names [ (Doc-Start) 214 0 R (addition-to-lib-iterator-requirements) 215 0 R (addition-to-lib-iterator-requirements.1) 216 0 R (addition-to-lib-iterator-synopsis) 217 0 R (addition-to-lib-iterator-synopsis.1) 218 0 R (addition-to-lib-iterator-traits) 219 0 R (addition-to-lib-iterator-traits.1) 220 0 R (bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators) 221 0 R (bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators.3) 222 0 R (category-to-traversal) 223 0 R (changes-to-algorithm-requirements) 224 0 R (changes-to-algorithm-requirements.2) 225 0 R (deprecations) 226 0 R (deprecations.2) 227 0 R (design) 228 0 R (design.0) 229 0 R (footnotes) 230 0 R (footnotes.0) 231 0 R (forward-traversal-iterators-lib-forward-traversal-iterators) 232 0 R (forward-traversal-iterators-lib-forward-traversal-iterators.3) 233 0 R (impact-on-the-standard) 234 0 R (impact-on-the-standard.0) 235 0 R (incrementable-iterators-lib-incrementable-iterators) 236 0 R (incrementable-iterators-lib-incrementable-iterators.3) 237 0 R (interoperable-iterators-lib-interoperable-iterators) 238 0 R (interoperable-iterators-lib-interoperable-iterators.3) 239 0 R (iterator-traversal-concepts-lib-iterator-traversal) 240 0 R (iterator-traversal-concepts-lib-iterator-traversal.2) 241 0 R (iterator-value-access-concepts-lib-iterator-value-access) 242 0 R (iterator-value-access-concepts-lib-iterator-value-access.2) 243 0 R (lvalue-iterators-lib-lvalue-iterators) 244 0 R (lvalue-iterators-lib-lvalue-iterators.3) 245 0 R (motivation) 246 0 R (motivation.0) 247 0 R (page.1) 248 0 R (page.10) 249 0 R (page.11) 250 0 R (page.2) 251 0 R (page.3) 252 0 R (page.4) 253 0 R (page.5) 254 0 R (page.6) 255 0 R (page.7) 256 0 R (page.8) 257 0 R (page.9) 258 0 R (possible-but-not-proposed-changes-to-the-working-paper) 259 0 R (possible-but-not-proposed-changes-to-the-working-paper.1) 260 0 R (proposed-text) 261 0 R (proposed-text.0) 262 0 R (random-access-traversal-iterators-lib-random-access-traversal-iterators) 263 0 R (random-access-traversal-iterators-lib-random-access-traversal-iterators.3) 264 0 R (readable-iterator) 265 0 R (readable-iterators-lib-readable-iterators) 266 0 R (readable-iterators-lib-readable-iterators.3) 267 0 R (section*.1) 268 0 R (section*.10) 269 0 R (section*.11) 270 0 R (section*.12) 271 0 R (section*.13) 272 0 R (section*.14) 273 0 R (section*.15) 274 0 R (section*.16) 275 0 R (section*.17) 276 0 R (section*.18) 277 0 R (section*.19) 278 0 R (section*.2) 279 0 R (section*.20) 280 0 R (section*.21) 281 0 R (section*.22) 282 0 R (section*.23) 283 0 R (section*.24) 284 0 R (section*.25) 285 0 R (section*.3) 286 0 R (section*.4) 287 0 R (section*.5) 288 0 R (section*.6) 289 0 R (section*.7) 290 0 R (section*.8) 291 0 R (section*.9) 292 0 R (single-pass-iterators-lib-single-pass-iterators) 293 0 R (single-pass-iterators-lib-single-pass-iterators.3) 294 0 R (swappable-iterators-lib-swappable-iterators) 295 0 R (swappable-iterators-lib-swappable-iterators.3) 296 0 R (table-of-contents) 297 0 R (table-of-contents.0) 298 0 R (table.1) 299 0 R (table.10) 300 0 R (table.11) 301 0 R (table.12) 302 0 R (table.2) 303 0 R (table.3) 304 0 R (table.4) 305 0 R (table.5) 306 0 R (table.6) 307 0 R (table.7) 308 0 R (table.8) 309 0 R (table.9) 310 0 R (vector-bool) 311 0 R (vector-bool.2) 312 0 R (writable-iterator) 313 0 R (writable-iterators-lib-writable-iterators) 314 0 R (writable-iterators-lib-writable-iterators.3) 315 0 R ] -/Limits [ (Doc-Start) (writable-iterators-lib-writable-iterators.3) ] ->> -endobj -214 0 obj -<< -/D [ 3 0 R /XYZ 74.409 771.732 null ] ->> -endobj -215 0 obj -<< -/D [ 98 0 R /XYZ 74.409 572.746 null ] ->> -endobj -216 0 obj -<< -/D [ 98 0 R /XYZ 74.409 572.746 null ] ->> -endobj -217 0 obj -<< -/D [ 122 0 R /XYZ 74.409 338.687 null ] ->> -endobj -218 0 obj -<< -/D [ 122 0 R /XYZ 74.409 338.687 null ] ->> -endobj -219 0 obj -<< -/D [ 122 0 R /XYZ 74.409 184.62 null ] ->> -endobj -220 0 obj -<< -/D [ 122 0 R /XYZ 74.409 184.62 null ] ->> -endobj -221 0 obj -<< -/D [ 112 0 R /XYZ 74.409 411.095 null ] ->> -endobj -222 0 obj -<< -/D [ 112 0 R /XYZ 74.409 411.095 null ] ->> -endobj -223 0 obj -<< -/D [ 126 0 R /XYZ 299.523 698.009 null ] ->> -endobj -224 0 obj -<< -/D [ 78 0 R /XYZ 74.409 632.088 null ] ->> -endobj -225 0 obj -<< -/D [ 78 0 R /XYZ 74.409 632.088 null ] ->> -endobj -226 0 obj -<< -/D [ 90 0 R /XYZ 74.409 549.794 null ] ->> -endobj -227 0 obj -<< -/D [ 90 0 R /XYZ 74.409 549.794 null ] ->> -endobj -228 0 obj -<< -/D [ 90 0 R /XYZ 74.409 428.025 null ] ->> -endobj -229 0 obj -<< -/D [ 90 0 R /XYZ 74.409 428.025 null ] ->> -endobj -230 0 obj -<< -/D [ 126 0 R /XYZ 74.409 500.529 null ] ->> -endobj -231 0 obj -<< -/D [ 126 0 R /XYZ 74.409 500.529 null ] ->> -endobj -232 0 obj -<< -/D [ 112 0 R /XYZ 74.409 625.481 null ] ->> -endobj -233 0 obj -<< -/D [ 112 0 R /XYZ 74.409 625.481 null ] ->> -endobj -234 0 obj -<< -/D [ 52 0 R /XYZ 74.409 164.789 null ] ->> -endobj -235 0 obj -<< -/D [ 52 0 R /XYZ 74.409 164.789 null ] ->> -endobj -236 0 obj -<< -/D [ 102 0 R /XYZ 74.409 406.503 null ] ->> -endobj -237 0 obj -<< -/D [ 102 0 R /XYZ 74.409 406.503 null ] ->> -endobj -238 0 obj -<< -/D [ 122 0 R /XYZ 74.409 771.732 null ] ->> -endobj -239 0 obj -<< -/D [ 122 0 R /XYZ 74.409 771.732 null ] ->> -endobj -240 0 obj -<< -/D [ 102 0 R /XYZ 74.409 462.996 null ] ->> -endobj -241 0 obj -<< -/D [ 102 0 R /XYZ 74.409 462.996 null ] ->> -endobj -242 0 obj -<< -/D [ 98 0 R /XYZ 74.409 552.166 null ] ->> -endobj -243 0 obj -<< -/D [ 98 0 R /XYZ 74.409 552.166 null ] ->> -endobj -244 0 obj -<< -/D [ 102 0 R /XYZ 74.409 641.73 null ] ->> -endobj -245 0 obj -<< -/D [ 102 0 R /XYZ 74.409 641.73 null ] ->> -endobj -246 0 obj -<< -/D [ 52 0 R /XYZ 74.409 715.942 null ] ->> -endobj -247 0 obj -<< -/D [ 52 0 R /XYZ 74.409 715.942 null ] ->> -endobj -248 0 obj -<< -/D [ 3 0 R /XYZ 74.409 789.665 null ] ->> -endobj -249 0 obj -<< -/D [ 122 0 R /XYZ 74.409 789.665 null ] ->> -endobj -250 0 obj -<< -/D [ 126 0 R /XYZ 74.409 789.665 null ] ->> -endobj -251 0 obj -<< -/D [ 52 0 R /XYZ 74.409 789.665 null ] ->> -endobj -252 0 obj -<< -/D [ 78 0 R /XYZ 74.409 789.665 null ] ->> -endobj -253 0 obj -<< -/D [ 90 0 R /XYZ 74.409 789.665 null ] ->> -endobj -254 0 obj -<< -/D [ 93 0 R /XYZ 74.409 789.665 null ] ->> -endobj -255 0 obj -<< -/D [ 98 0 R /XYZ 74.409 789.665 null ] ->> -endobj -256 0 obj -<< -/D [ 102 0 R /XYZ 74.409 789.665 null ] ->> -endobj -257 0 obj -<< -/D [ 112 0 R /XYZ 74.409 789.665 null ] ->> -endobj -258 0 obj -<< -/D [ 115 0 R /XYZ 74.409 789.665 null ] ->> -endobj -259 0 obj -<< -/D [ 78 0 R /XYZ 74.409 690.208 null ] ->> -endobj -260 0 obj -<< -/D [ 78 0 R /XYZ 74.409 690.208 null ] ->> -endobj -261 0 obj -<< -/D [ 98 0 R /XYZ 74.409 615.817 null ] ->> -endobj -262 0 obj -<< -/D [ 98 0 R /XYZ 74.409 615.817 null ] ->> -endobj -263 0 obj -<< -/D [ 115 0 R /XYZ 74.409 710.363 null ] ->> -endobj -264 0 obj -<< -/D [ 115 0 R /XYZ 74.409 710.363 null ] ->> -endobj -265 0 obj -<< -/D [ 98 0 R /XYZ 443.233 512.864 null ] ->> -endobj -266 0 obj -<< -/D [ 98 0 R /XYZ 74.409 510.652 null ] ->> -endobj -267 0 obj -<< -/D [ 98 0 R /XYZ 74.409 510.652 null ] ->> -endobj -268 0 obj -<< -/D [ 3 0 R /XYZ 74.409 473.486 null ] ->> -endobj -269 0 obj -<< -/D [ 98 0 R /XYZ 74.409 552.166 null ] ->> -endobj -270 0 obj -<< -/D [ 98 0 R /XYZ 74.409 534.283 null ] ->> -endobj -271 0 obj -<< -/D [ 98 0 R /XYZ 74.409 478.07 null ] ->> -endobj -272 0 obj -<< -/D [ 98 0 R /XYZ 74.409 286.025 null ] ->> -endobj -273 0 obj -<< -/D [ 102 0 R /XYZ 74.409 752.853 null ] ->> -endobj -274 0 obj -<< -/D [ 102 0 R /XYZ 74.409 609.427 null ] ->> -endobj -275 0 obj -<< -/D [ 102 0 R /XYZ 74.409 430.134 null ] ->> -endobj -276 0 obj -<< -/D [ 102 0 R /XYZ 74.409 373.92 null ] ->> -endobj -277 0 obj -<< -/D [ 102 0 R /XYZ 74.409 207.355 null ] ->> -endobj -278 0 obj -<< -/D [ 112 0 R /XYZ 74.409 604.609 null ] ->> -endobj -279 0 obj -<< -/D [ 52 0 R /XYZ 74.409 673.162 null ] ->> -endobj -280 0 obj -<< -/D [ 112 0 R /XYZ 74.409 390.223 null ] ->> -endobj -281 0 obj -<< -/D [ 115 0 R /XYZ 74.409 689.491 null ] ->> -endobj -282 0 obj -<< -/D [ 122 0 R /XYZ 74.409 752.853 null ] ->> -endobj -283 0 obj -<< -/D [ 122 0 R /XYZ 74.409 301.402 null ] ->> -endobj -284 0 obj -<< -/D [ 122 0 R /XYZ 74.409 149.547 null ] ->> -endobj -285 0 obj -<< -/D [ 126 0 R /XYZ 74.409 459.962 null ] ->> -endobj -286 0 obj -<< -/D [ 78 0 R /XYZ 74.409 749.134 null ] ->> -endobj -287 0 obj -<< -/D [ 78 0 R /XYZ 74.409 654.943 null ] ->> -endobj -288 0 obj -<< -/D [ 78 0 R /XYZ 74.409 599.871 null ] ->> -endobj -289 0 obj -<< -/D [ 90 0 R /XYZ 74.409 518.11 null ] ->> -endobj -290 0 obj -<< -/D [ 90 0 R /XYZ 74.409 463.891 null ] ->> -endobj -291 0 obj -<< -/D [ 90 0 R /XYZ 74.409 382.525 null ] ->> -endobj -292 0 obj -<< -/D [ 98 0 R /XYZ 74.409 572.746 null ] ->> -endobj -293 0 obj -<< -/D [ 102 0 R /XYZ 74.409 226.294 null ] ->> -endobj -294 0 obj -<< -/D [ 102 0 R /XYZ 74.409 226.294 null ] ->> -endobj -295 0 obj -<< -/D [ 98 0 R /XYZ 74.409 177.393 null ] ->> -endobj -296 0 obj -<< -/D [ 98 0 R /XYZ 74.409 177.393 null ] ->> -endobj -297 0 obj -<< -/D [ 3 0 R /XYZ 74.409 503.857 null ] ->> -endobj -298 0 obj -<< -/D [ 3 0 R /XYZ 74.409 503.857 null ] ->> -endobj -299 0 obj -<< -/D [ 52 0 R /XYZ 74.409 563.633 null ] ->> -endobj -300 0 obj -<< -/D [ 115 0 R /XYZ 74.409 653.904 null ] ->> -endobj -301 0 obj -<< -/D [ 122 0 R /XYZ 74.409 705.312 null ] ->> -endobj -302 0 obj -<< -/D [ 122 0 R /XYZ 74.409 558.662 null ] ->> -endobj -303 0 obj -<< -/D [ 98 0 R /XYZ 74.409 442.762 null ] ->> -endobj -304 0 obj -<< -/D [ 98 0 R /XYZ 74.409 250.718 null ] ->> -endobj -305 0 obj -<< -/D [ 102 0 R /XYZ 74.409 729.501 null ] ->> -endobj -306 0 obj -<< -/D [ 102 0 R /XYZ 74.409 586.074 null ] ->> -endobj -307 0 obj -<< -/D [ 102 0 R /XYZ 74.409 350.568 null ] ->> -endobj -308 0 obj -<< -/D [ 102 0 R /XYZ 74.409 184.003 null ] ->> -endobj -309 0 obj -<< -/D [ 112 0 R /XYZ 74.409 569.302 null ] ->> -endobj -310 0 obj -<< -/D [ 112 0 R /XYZ 74.409 356.849 null ] ->> -endobj -311 0 obj -<< -/D [ 90 0 R /XYZ 74.409 494.2 null ] ->> -endobj -312 0 obj -<< -/D [ 90 0 R /XYZ 74.409 494.2 null ] ->> -endobj -313 0 obj -<< -/D [ 98 0 R /XYZ 74.409 320.819 null ] ->> -endobj -314 0 obj -<< -/D [ 98 0 R /XYZ 74.409 320.819 null ] ->> -endobj -315 0 obj -<< -/D [ 98 0 R /XYZ 74.409 320.819 null ] ->> -endobj -316 0 obj -<< -/S /GoTo -/D [ 3 0 R /Fit ] ->> -endobj -317 0 obj -<< -/Author (David Abrahams, Jeremy Siek, Thomas Witt) -/Title (New Iterator Concepts) -/Subject () -/Creator (LaTeX with hyperref package) -/Producer (pdfTeX-1.10b extended by PPower4 V0.9.4) -/Keywords () -/CreationDate (D:20050520111600) ->> -endobj -xref -0 318 -0000000000 65535 f -0000000009 00000 n -0000000236 00000 n -0000000371 00000 n -0000000688 00000 n -0000000887 00000 n -0000001077 00000 n -0000001272 00000 n -0000001470 00000 n -0000001658 00000 n -0000001852 00000 n -0000002047 00000 n -0000002208 00000 n -0000002381 00000 n -0000002588 00000 n -0000002774 00000 n -0000002939 00000 n -0000003103 00000 n -0000003260 00000 n -0000003424 00000 n -0000003613 00000 n -0000003822 00000 n -0000004016 00000 n -0000004210 00000 n -0000004406 00000 n -0000004596 00000 n -0000004799 00000 n -0000005002 00000 n -0000005202 00000 n -0000005413 00000 n -0000005637 00000 n -0000005861 00000 n -0000006065 00000 n -0000006170 00000 n -0000006327 00000 n -0000007439 00000 n -0000007591 00000 n -0000007811 00000 n -0000011520 00000 n -0000011678 00000 n -0000011965 00000 n -0000012325 00000 n -0000022465 00000 n -0000022622 00000 n -0000023019 00000 n -0000023511 00000 n -0000038949 00000 n -0000039107 00000 n -0000040291 00000 n -0000040609 00000 n -0000041055 00000 n -0000051498 00000 n -0000054248 00000 n -0000054439 00000 n -0000054625 00000 n -0000054809 00000 n -0000054969 00000 n -0000055199 00000 n -0000055429 00000 n -0000055658 00000 n -0000055882 00000 n -0000056108 00000 n -0000056337 00000 n -0000056466 00000 n -0000056624 00000 n -0000056884 00000 n -0000057198 00000 n -0000064332 00000 n -0000064490 00000 n -0000065604 00000 n -0000065846 00000 n -0000066122 00000 n -0000075094 00000 n -0000075251 00000 n -0000077073 00000 n -0000077097 00000 n -0000077302 00000 n -0000078541 00000 n -0000083158 00000 n -0000083274 00000 n -0000083403 00000 n -0000083560 00000 n -0000084721 00000 n -0000084745 00000 n -0000084951 00000 n -0000086663 00000 n -0000086821 00000 n -0000086845 00000 n -0000087053 00000 n -0000088752 00000 n -0000091277 00000 n -0000091393 00000 n -0000091534 00000 n -0000093969 00000 n -0000094085 00000 n -0000094225 00000 n -0000100938 00000 n -0000125355 00000 n -0000127068 00000 n -0000127205 00000 n -0000127431 00000 n -0000127549 00000 n -0000131310 00000 n -0000131497 00000 n -0000131668 00000 n -0000131839 00000 n -0000132009 00000 n -0000132179 00000 n -0000132344 00000 n -0000132515 00000 n -0000132686 00000 n -0000132792 00000 n -0000136462 00000 n -0000136581 00000 n -0000136687 00000 n -0000139992 00000 n -0000140155 00000 n -0000140326 00000 n -0000140497 00000 n -0000140668 00000 n -0000140838 00000 n -0000140944 00000 n -0000143976 00000 n -0000144115 00000 n -0000144347 00000 n -0000144465 00000 n -0000147890 00000 n -0000148029 00000 n -0000148262 00000 n -0000148381 00000 n -0000148544 00000 n -0000149731 00000 n -0000149942 00000 n -0000150182 00000 n -0000154784 00000 n -0000156129 00000 n -0000156206 00000 n -0000156285 00000 n -0000156322 00000 n -0000156379 00000 n -0000156472 00000 n -0000156502 00000 n -0000156552 00000 n -0000156684 00000 n -0000156726 00000 n -0000156788 00000 n -0000156881 00000 n -0000156907 00000 n -0000156953 00000 n -0000157085 00000 n -0000157118 00000 n -0000157171 00000 n -0000157250 00000 n -0000157279 00000 n -0000157328 00000 n -0000157446 00000 n -0000157505 00000 n -0000157582 00000 n -0000157675 00000 n -0000157730 00000 n -0000157803 00000 n -0000157882 00000 n -0000157935 00000 n -0000158006 00000 n -0000158124 00000 n -0000158202 00000 n -0000158298 00000 n -0000158416 00000 n -0000158488 00000 n -0000158578 00000 n -0000158657 00000 n -0000158730 00000 n -0000158821 00000 n -0000158914 00000 n -0000158983 00000 n -0000159070 00000 n -0000159163 00000 n -0000159244 00000 n -0000159343 00000 n -0000159436 00000 n -0000159529 00000 n -0000159640 00000 n -0000159733 00000 n -0000159826 00000 n -0000159937 00000 n -0000160016 00000 n -0000160089 00000 n -0000160180 00000 n -0000160259 00000 n -0000160322 00000 n -0000160403 00000 n -0000160496 00000 n -0000160559 00000 n -0000160640 00000 n -0000160733 00000 n -0000160798 00000 n -0000160881 00000 n -0000160960 00000 n -0000161019 00000 n -0000161096 00000 n -0000161200 00000 n -0000161278 00000 n -0000161372 00000 n -0000161451 00000 n -0000161504 00000 n -0000161577 00000 n -0000161670 00000 n -0000161702 00000 n -0000161754 00000 n -0000161833 00000 n -0000161865 00000 n -0000161916 00000 n -0000161954 00000 n -0000161995 00000 n -0000165568 00000 n -0000165629 00000 n -0000165691 00000 n -0000165753 00000 n -0000165816 00000 n -0000165879 00000 n -0000165941 00000 n -0000166003 00000 n -0000166066 00000 n -0000166129 00000 n -0000166193 00000 n -0000166255 00000 n -0000166317 00000 n -0000166379 00000 n -0000166441 00000 n -0000166503 00000 n -0000166565 00000 n -0000166628 00000 n -0000166691 00000 n -0000166754 00000 n -0000166817 00000 n -0000166879 00000 n -0000166941 00000 n -0000167004 00000 n -0000167067 00000 n -0000167130 00000 n -0000167193 00000 n -0000167256 00000 n -0000167319 00000 n -0000167381 00000 n -0000167443 00000 n -0000167505 00000 n -0000167567 00000 n -0000167629 00000 n -0000167691 00000 n -0000167752 00000 n -0000167815 00000 n -0000167878 00000 n -0000167940 00000 n -0000168002 00000 n -0000168064 00000 n -0000168126 00000 n -0000168188 00000 n -0000168251 00000 n -0000168314 00000 n -0000168377 00000 n -0000168439 00000 n -0000168501 00000 n -0000168563 00000 n -0000168625 00000 n -0000168688 00000 n -0000168751 00000 n -0000168814 00000 n -0000168876 00000 n -0000168938 00000 n -0000168999 00000 n -0000169061 00000 n -0000169123 00000 n -0000169184 00000 n -0000169246 00000 n -0000169309 00000 n -0000169372 00000 n -0000169435 00000 n -0000169497 00000 n -0000169560 00000 n -0000169623 00000 n -0000169685 00000 n -0000169748 00000 n -0000169811 00000 n -0000169874 00000 n -0000169937 00000 n -0000170000 00000 n -0000170063 00000 n -0000170125 00000 n -0000170187 00000 n -0000170249 00000 n -0000170310 00000 n -0000170372 00000 n -0000170434 00000 n -0000170496 00000 n -0000170559 00000 n -0000170622 00000 n -0000170684 00000 n -0000170746 00000 n -0000170807 00000 n -0000170868 00000 n -0000170930 00000 n -0000170993 00000 n -0000171056 00000 n -0000171119 00000 n -0000171181 00000 n -0000171243 00000 n -0000171306 00000 n -0000171369 00000 n -0000171432 00000 n -0000171495 00000 n -0000171558 00000 n -0000171621 00000 n -0000171681 00000 n -0000171741 00000 n -0000171803 00000 n -0000171865 00000 n -0000171927 00000 n -0000171977 00000 n -trailer -<< -/Size 318 -/Root 1 0 R -/Info 317 0 R ->> -startxref -172231 -%%EOF diff --git a/doc/new-iter-concepts.rst b/doc/new-iter-concepts.rst deleted file mode 100644 index 389e52c..0000000 --- a/doc/new-iter-concepts.rst +++ /dev/null @@ -1,799 +0,0 @@ -++++++++++++++++++++++ - New Iterator Concepts -++++++++++++++++++++++ - -.. Version 1.25 of this ReStructuredText document is the same as - n1550_, the paper accepted by the LWG. - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, `Zephyr Associates, Inc.`_ -:date: $Date$ - -: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 - revision of paper n1297_, n1477_, and n1531_. - -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt - 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - -.. _`Institute for Transport Railway Operation and Construction`: - http://www.ive.uni-hannover.de - -:Abstract: We propose a new system of iterator concepts that treat - access and positioning independently. This allows the - concepts to more closely match the requirements - of algorithms and provides better categorizations - of iterators that are used in practice. - -.. contents:: Table of Contents - -.. _n1297: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1297.html -.. _n1477: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1477.html -.. _n1531: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1531.html -.. _n1550: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1550.html - -============ - Motivation -============ - -The standard iterator categories and requirements are flawed because -they use a single hierarchy of concepts to address two orthogonal -issues: *iterator traversal* and *value access*. As a result, many -algorithms with requirements expressed in terms of the iterator -categories are too strict. Also, many real-world iterators can not be -accurately categorized. A proxy-based iterator with random-access -traversal, for example, may only legally have a category of "input -iterator", so generic algorithms are unable to take advantage of its -random-access capabilities. The current iterator concept hierarchy is -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. - -+------------------------------------------------------------------------------+ -|Value Access Requirements in Existing Iterator Categories | -+========================+=====================================================+ -|Output Iterator |``*i = a`` | -+------------------------+-----------------------------------------------------+ -|Input Iterator |``*i`` is convertible to ``T`` | -+------------------------+-----------------------------------------------------+ -|Forward Iterator |``*i`` is ``T&`` (or ``const T&`` once `issue 200`_ | -| |is resolved) | -+------------------------+-----------------------------------------------------+ -|Random Access Iterator |``i[n]`` is convertible to ``T`` (also ``i[n] = t`` | -| |is required for mutable iterators once `issue 299`_ | -| |is resolved) | -+------------------------+-----------------------------------------------------+ - -.. _issue 200: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#200 -.. _issue 299: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#299 - - -Because iterator traversal and value access are mixed together in a -single hierarchy, many useful iterators can not be appropriately -categorized. For example, ``vector::iterator`` is almost a -random access iterator, but the return type is not ``bool&`` (see -`issue 96`_ and Herb Sutter's paper J16/99-0008 = WG21 -N1185). Therefore, the iterators of ``vector`` only meet the -requirements of input iterator and output iterator. This is so -nonintuitive that the C++ standard contradicts itself on this point. -In paragraph 23.2.4/1 it says that a ``vector`` is a sequence that -supports random access iterators. - -.. _issue 96: http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-active.html#96 - -Another difficult-to-categorize iterator is the transform iterator, an -adaptor which applies a unary function object to the dereferenced -value of the some underlying iterator (see `transform_iterator`_). -For unary functions such as ``times``, the return type of -``operator*`` clearly needs to be the ``result_type`` of the function -object, which is typically not a reference. Because random access -iterators are required to return lvalues from ``operator*``, if you -wrap ``int*`` with a transform iterator, you do not get a random -access iterator as might be expected, but an input iterator. - -.. _`transform_iterator`: http://www.boost.org/libs/utility/transform_iterator.htm - -A third example is found in the vertex and edge iterators of the -`Boost Graph Library`_. These iterators return vertex and edge -descriptors, which are lightweight handles created on-the-fly. They -must be returned by-value. As a result, their current standard -iterator category is ``input_iterator_tag``, which means that, -strictly speaking, you could not use these iterators with algorithms -like ``min_element()``. As a temporary solution, the concept -`Multi-Pass Input Iterator`_ was introduced to describe the vertex and -edge descriptors, but as the design notes for the concept suggest, a -better solution is needed. - -.. _Boost Graph Library: http://www.boost.org/libs/graph/doc/table_of_contents.html -.. _Multi-Pass Input Iterator: http://www.boost.org/libs/utility/MultiPassInputIterator.html - -In short, there are many useful iterators that do not fit into the -current standard iterator categories. As a result, the following bad -things happen: - -- Iterators are often mis-categorized. - -- Algorithm requirements are more strict than necessary, because they - cannot separate the need for random access or bidirectional - traversal from the need for a true reference return type. - - -======================== - Impact on the Standard -======================== - -This proposal for TR1 is a pure extension. Further, the new iterator -concepts are backward-compatible with the old iterator requirements, -and old iterators are forward-compatible with the new iterator -concepts. That is to say, iterators that satisfy the old requirements -also satisfy appropriate concepts in the new system, and iterators -modeling the new concepts will automatically satisfy the appropriate -old requirements. - -.. I think we need to say something about the resolution to allow - convertibility to any of the old-style tags as a TR issue (hope it - made it). -DWA - -.. Hmm, not sure I understand. Are you talking about whether a - standards conforming input iterator is allowed to have - a tag that is not input_iterator_tag but that - is convertible to input_iterator_tag? -JGS - -Possible (but not proposed) Changes to the Working Paper -======================================================== - -The extensions in this paper suggest several changes we might make -to the working paper for the next standard. These changes are not -a formal part of this proposal for TR1. - -Changes to Algorithm Requirements -+++++++++++++++++++++++++++++++++ - -The algorithms in the standard library could benefit from the new -iterator concepts because the new concepts provide a more accurate way -to express their type requirements. The result is algorithms that are -usable in more situations and have fewer type requirements. - -For the next working paper (but not for TR1), the committee should -consider the following changes to the type requirements of algorithms. -These changes are phrased as textual substitutions, listing the -algorithms to which each textual substitution applies. - -Forward Iterator -> Forward Traversal Iterator and Readable Iterator - - ``find_end, adjacent_find, search, search_n, rotate_copy, - lower_bound, upper_bound, equal_range, binary_search, - min_element, max_element`` - -Forward Iterator (1) -> Single Pass Iterator and Readable Iterator, -Forward Iterator (2) -> Forward Traversal Iterator and Readable Iterator - - ``find_first_of`` - -Forward Iterator -> Readable Iterator and Writable Iterator - - ``iter_swap`` - -Forward Iterator -> Single Pass Iterator and Writable Iterator - - ``fill, generate`` - -Forward Iterator -> Forward Traversal Iterator and Swappable Iterator - - ``rotate`` - -Forward Iterator (1) -> Swappable Iterator and Single Pass Iterator, -Forward Iterator (2) -> Swappable Iterator and Incrementable Iterator - - ``swap_ranges`` - -Forward Iterator -> Forward Traversal Iterator and Readable Iterator and Writable Iterator - ``remove, remove_if, unique`` - -Forward Iterator -> Single Pass Iterator and Readable Iterator and Writable Iterator - - ``replace, replace_if`` - -Bidirectional Iterator -> Bidirectional Traversal Iterator and Swappable Iterator - ``reverse`` - -Bidirectional Iterator -> Bidirectional Traversal Iterator and Readable and Swappable Iterator - ``partition`` - -Bidirectional Iterator (1) -> Bidirectional Traversal Iterator and Readable Iterator, -Bidirectional Iterator (2) -> Bidirectional Traversal Iterator and Writable Iterator - - ``copy_backwards`` - -Bidirectional Iterator -> Bidirectional Traversal Iterator and Swappable Iterator and Readable Iterator - ``next_permutation, prev_permutation`` - -Bidirectional Iterator -> Bidirectional Traversal Iterator and Readable Iterator and Writable Iterator - ``stable_partition, inplace_merge`` - -Bidirectional Iterator -> Bidirectional Traversal Iterator and Readable Iterator - ``reverse_copy`` - -Random Access Iterator -> Random Access Traversal Iterator and Readable and Writable Iterator - ``random_shuffle, sort, stable_sort, partial_sort, nth_element, push_heap, pop_heap - make_heap, sort_heap`` - -Input Iterator (2) -> Incrementable Iterator and Readable Iterator - ``equal, mismatch`` - -Input Iterator (2) -> Incrementable Iterator and Readable Iterator - ``transform`` - -Deprecations -++++++++++++ - -For the next working paper (but not for TR1), the committee should -consider deprecating the old iterator tags, and -std::iterator_traits, since it will be superceded by individual -traits metafunctions. - -``vector`` -++++++++++++++++ - -For the next working paper (but not for TR1), the committee should -consider reclassifying ``vector::iterator`` as a Random -Access Traversal Iterator and Readable Iterator and Writable -Iterator. - -======== - Design -======== - -The iterator requirements are to be separated into two groups. One set -of concepts handles the syntax and semantics of value access: - -- Readable Iterator -- Writable Iterator -- Swappable Iterator -- Lvalue Iterator - -The access concepts describe requirements related to ``operator*`` and -``operator->``, including the ``value_type``, ``reference``, and -``pointer`` associated types. - -The other set of concepts handles traversal: - -- Incrementable Iterator -- Single Pass Iterator -- Forward Traversal Iterator -- Bidirectional Traversal Iterator -- Random Access Traversal Iterator - -The refinement relationships for the traversal concepts are in the -following diagram. - -.. image:: traversal.png - -In addition to the iterator movement operators, such as -``operator++``, the traversal concepts also include requirements on -position comparison such as ``operator==`` and ``operator<``. The -reason for the fine grain slicing of the concepts into the -Incrementable and Single Pass is to provide concepts that are exact -matches with the original input and output iterator requirements. - -This proposal also includes a concept for specifying when an iterator -is interoperable with another iterator, in the sense that ``int*`` is -interoperable with ``int const*``. - -- Interoperable Iterators - - -The relationship between the new iterator concepts and the old are -given in the following diagram. - -.. image:: oldeqnew.png - -Like the old iterator requirements, we provide tags for purposes of -dispatching based on the traversal concepts. The tags are related via -inheritance so that a tag is convertible to another tag if the concept -associated with the first tag is a refinement of the second tag. - -Our design reuses ``iterator_traits::iterator_category`` to -indicate an iterator's traversal capability. To specify -capabilities not captured by any old-style iterator category, an -iterator designer can use an ``iterator_category`` type that is -convertible to both the the most-derived old iterator category tag -which fits, and the appropriate new iterator traversal tag. - -.. dwa2003/1/2: Note that we are not *requiring* convertibility to - a new-style traversal tag in order to meet new concepts. - Old-style iterators still fit, after all. - -We do not provide tags for the purposes of dispatching based on the -access concepts, in part because we could not find a way to -automatically infer the right access tags for old-style iterators. -An iterator's writability may be dependent on the assignability of -its ``value_type`` and there's no known way to detect whether an -arbitrary type is assignable. Fortunately, the need for -dispatching based on access capability is not as great as the need -for dispatching based on traversal capability. - -A difficult design decision concerned the ``operator[]``. The direct -approach for specifying ``operator[]`` would have a return type of -``reference``; the same as ``operator*``. However, going in this -direction would mean that an iterator satisfying the old Random Access -Iterator requirements would not necessarily be a model of Readable or -Writable Lvalue Iterator. Instead we have chosen a design that -matches the preferred resolution of `issue 299`_: ``operator[]`` is -only required to return something convertible to the ``value_type`` -(for a Readable Iterator), and is required to support assignment -``i[n] = t`` (for a Writable Iterator). - - -=============== - Proposed Text -=============== - -Addition to [lib.iterator.requirements] -======================================= - -Iterator Value Access Concepts [lib.iterator.value.access] -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -In the tables below, ``X`` is an iterator type, ``a`` is a constant -object of type ``X``, ``R`` is -``std::iterator_traits::reference``, ``T`` is -``std::iterator_traits::value_type``, and ``v`` is a constant -object of type ``T``. - -.. _Readable Iterator: - -Readable Iterators [lib.readable.iterators] -------------------------------------------- - -A class or built-in type ``X`` models the *Readable Iterator* concept -for value type ``T`` if, in addition to ``X`` being Assignable and -Copy Constructible, the following expressions are valid and respect -the stated semantics. ``U`` is the type of any specified member of -type ``T``. - -+-----------------------------------------------------------------------------------------------------------------------------+ -|Readable Iterator Requirements (in addition to Assignable and Copy Constructible) | -+-----------------------------------+------------------------+----------------------------------------------------------------+ -|Expression |Return Type |Note/Precondition | -+===================================+========================+================================================================+ -|``iterator_traits::value_type`` |``T`` |Any non-reference, | -| | |non-cv-qualified type | -+-----------------------------------+------------------------+----------------------------------------------------------------+ -|``*a`` | Convertible to ``T`` |pre: ``a`` is dereferenceable. If ``a == b`` then ``*a`` | -| | | is equivalent to ``*b``. | -+-----------------------------------+------------------------+----------------------------------------------------------------+ -|``a->m`` |``U&`` |pre: ``pre: (*a).m`` is well-defined. Equivalent to ``(*a).m``. | -+-----------------------------------+------------------------+----------------------------------------------------------------+ - -.. We won't say anything about iterator_traits::reference until the DR is resolved. -JGS - -.. _Writable Iterator: - -Writable Iterators [lib.writable.iterators] -------------------------------------------- - -A class or built-in type ``X`` models the *Writable Iterator* concept -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*. - -+---------------------------------------------------------------------+ -|Writable Iterator Requirements (in addition to Copy Constructible) | -+-------------------------+--------------+----------------------------+ -|Expression |Return Type |Precondition | -+=========================+==============+============================+ -|``*a = o`` | | pre: The type of ``o`` | -| | | is in the set of | -| | | value types of ``X`` | -+-------------------------+--------------+----------------------------+ - -Swappable Iterators [lib.swappable.iterators] ---------------------------------------------- - -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. - -+---------------------------------------------------------------------+ -|Swappable Iterator Requirements (in addition to Copy Constructible) | -+-------------------------+-------------+-----------------------------+ -|Expression |Return Type |Postcondition | -+=========================+=============+=============================+ -|``iter_swap(a, b)`` |``void`` |the pointed to values are | -| | |exchanged | -+-------------------------+-------------+-----------------------------+ - -[*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. - -+-------------------------------------------------------------+ -| Lvalue Iterator Requirements | -+-------------+-----------+-----------------------------------+ -|Expression |Return Type|Note/Assertion | -+=============+===========+===================================+ -|``*a`` | ``T&`` |``T`` is *cv* | -| | |``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``. - - -Iterator Traversal Concepts [lib.iterator.traversal] -++++++++++++++++++++++++++++++++++++++++++++++++++++ - -In the tables below, ``X`` is an iterator type, ``a`` and ``b`` are -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] ------------------------------------------------------ - -A class or built-in type ``X`` models the *Incrementable Iterator* -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``| | -+--------------------------------+-------------------------------+-------------------+ - - -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. - -Single Pass Iterators [lib.single.pass.iterators] -------------------------------------------------- - -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 | -|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 - - -Forward Traversal Iterators [lib.forward.traversal.iterators] -------------------------------------------------------------- - -A class or built-in type ``X`` models the *Forward Traversal Iterator* -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. - -+--------------------------------------------------------------------------------------------------------+ -|Forward Traversal Iterator Requirements (in addition to Default Constructible and Single Pass Iterator) | -+---------------------------------------+-----------------------------------+----------------------------+ -|Expression |Return Type |Assertion/Note | -+=======================================+===================================+============================+ -|``X u;`` |``X&`` |note: ``u`` may have a | -| | |singular value. | -+---------------------------------------+-----------------------------------+----------------------------+ -|``++r`` |``X&`` |``r == s`` and ``r`` is | -| | |dereferenceable implies | -| | |``++r == ++s.`` | -+---------------------------------------+-----------------------------------+----------------------------+ -|``iterator_traits::difference_type``|A signed integral type representing| | -| |the distance between iterators | | -| | | | -+---------------------------------------+-----------------------------------+----------------------------+ -|``iterator_traversal::type`` |Convertible to | | -| |``forward_traversal_tag`` | | -+---------------------------------------+-----------------------------------+----------------------------+ - - - -.. TR1: forward_traversal_iterator_tag changed to - forward_traversal_tag for consistency - - -Bidirectional Traversal Iterators [lib.bidirectional.traversal.iterators] -------------------------------------------------------------------------- - -A class or built-in type ``X`` models the *Bidirectional Traversal -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 | 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 - -Random Access Traversal Iterators [lib.random.access.traversal.iterators] -------------------------------------------------------------------------- - -A class or built-in type ``X`` models the *Random Access Traversal -Iterator* concept if the following expressions are valid and respect -the stated semantics. In the table below, ``Distance`` is -``iterator_traits::difference_type`` and ``n`` represents a -constant object of type ``Distance``. - -+------------------------------------------------------------------------------------------------------------------+ -|Random Access Traversal Iterator Requirements (in addition to Bidirectional Traversal Iterator) | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|Expression |Return Type |Operational Semantics |Assertion/ | -| | | |Precondition | -+===============================+=================================+=========================+======================+ -|``r += n`` |``X&`` |:: | | -| | | | | -| | | { | | -| | | Distance m = n; | | -| | | if (m >= 0) | | -| | | while (m--) | | -| | | ++r; | | -| | | else | | -| | | while (m++) | | -| | | --r; | | -| | | return r; | | -| | | } | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a + n``, ``n + a`` |``X`` |``{ X tmp = a; return tmp| | -| | |+= n; }`` | | -| | | | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``r -= n`` |``X&`` |``return r += -n`` | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a - n`` |``X`` |``{ X tmp = a; return tmp| | -| | |-= n; }`` | | -| | | | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``b - a`` |``Distance`` |``a < b ? distance(a,b) |pre: there exists a | -| | |: -distance(b,a)`` |value ``n`` of | -| | | |``Distance`` such that| -| | | |``a + n == b``. ``b | -| | | |== a + (b - a)``. | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``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 < b`` |convertible to ``bool`` |``b - a > 0`` |``<`` is a total | -| | | |ordering relation | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a > b`` |convertible to ``bool`` |``b < a`` |``>`` is a total | -| | | |ordering relation | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a >= b`` |convertible to ``bool`` |``!(a < b)`` | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``a <= b`` |convertible to ``bool`` |``!(a > b)`` | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ -|``iterator_traversal::type``|Convertible to | | | -| |``random_access_traversal_tag`` | | | -+-------------------------------+---------------------------------+-------------------------+----------------------+ - -.. TR1: random_access_traversal_iterator_tag changed to - random_access_traversal_tag for consistency - - -Interoperable Iterators [lib.interoperable.iterators] ------------------------------------------------------ - -A class or built-in type ``X`` that models Single Pass Iterator is -*interoperable with* a class or built-in type ``Y`` that also models -Single Pass Iterator if the following expressions are valid and -respect the stated semantics. In the tables below, ``x`` is an object -of type ``X``, ``y`` is an object of type ``Y``, ``Distance`` is -``iterator_traits::difference_type``, and ``n`` represents a -constant object of type ``Distance``. - -+-----------+-----------------------+---------------------------------------------------+ -|Expression |Return Type |Assertion/Precondition/Postcondition | -+===========+=======================+===================================================+ -|``y = x`` |``Y`` |post: ``y == x`` | -+-----------+-----------------------+---------------------------------------------------+ -|``Y(x)`` |``Y`` |post: ``Y(x) == x`` | -+-----------+-----------------------+---------------------------------------------------+ -|``x == y`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. | -+-----------+-----------------------+---------------------------------------------------+ -|``y == x`` |convertible to ``bool``|``==`` is an equivalence relation over its domain. | -+-----------+-----------------------+---------------------------------------------------+ -|``x != y`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain. | -+-----------+-----------------------+---------------------------------------------------+ -|``y != x`` |convertible to ``bool``|``bool(a==b) != bool(a!=b)`` over its domain. | -+-----------+-----------------------+---------------------------------------------------+ - -If ``X`` and ``Y`` both model Random Access Traversal Iterator then -the following additional requirements must be met. - -+-----------+-----------------------+---------------------+--------------------------------------+ -|Expression |Return Type |Operational Semantics|Assertion/ Precondition | -+===========+=======================+=====================+======================================+ -|``x < y`` |convertible to ``bool``|``y - x > 0`` |``<`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y < x`` |convertible to ``bool``|``x - y > 0`` |``<`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x > y`` |convertible to ``bool``|``y < x`` |``>`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y > x`` |convertible to ``bool``|``x < y`` |``>`` is a total ordering relation | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x >= y`` |convertible to ``bool``|``!(x < y)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y >= x`` |convertible to ``bool``|``!(y < x)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x <= y`` |convertible to ``bool``|``!(x > y)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y <= x`` |convertible to ``bool``|``!(y > x)`` | | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``y - x`` |``Distance`` |``distance(Y(x),y)`` |pre: there exists a value ``n`` of | -| | | |``Distance`` such that ``x + n == y``.| -| | | |``y == x + (y - x)``. | -+-----------+-----------------------+---------------------+--------------------------------------+ -|``x - y`` |``Distance`` |``distance(y,Y(x))`` |pre: there exists a value ``n`` of | -| | | |``Distance`` such that ``y + n == x``.| -| | | |``x == y + (x - y)``. | -+-----------+-----------------------+---------------------+--------------------------------------+ - - - -Addition to [lib.iterator.synopsis] -=================================== - - -:: - - // lib.iterator.traits, traits and tags - template struct is_readable_iterator; - template struct iterator_traversal; - - struct incrementable_traversal_tag { }; - struct single_pass_traversal_tag : incrementable_traversal_tag { }; - struct forward_traversal_tag : single_pass_traversal_tag { }; - struct bidirectional_traversal_tag : forward_traversal_tag { }; - struct random_access_traversal_tag : bidirectional_traversal_tag { }; - -Addition to [lib.iterator.traits] -================================= - -The ``is_readable_iterator`` class -template satisfies the UnaryTypeTrait_ requirements. - -Given an iterator type ``X``, ``is_readable_iterator::value`` -yields ``true`` if, for an object ``a`` of type ``X``, ``*a`` is -convertible to ``iterator_traits::value_type``, and ``false`` -otherwise. - -``iterator_traversal::type`` is - -.. parsed-literal:: - - *category-to-traversal*\ (iterator_traits::iterator_category) - -where *category-to-traversal* is defined as follows - -.. _`category-to-traversal`: - -.. parsed-literal:: - - *category-to-traversal*\ (C) = - if (C is convertible to incrementable_traversal_tag) - return C; - else if (C is convertible to random_access_iterator_tag) - return random_access_traversal_tag; - else if (C is convertible to bidirectional_iterator_tag) - return bidirectional_traversal_tag; - else if (C is convertible to forward_iterator_tag) - return forward_traversal_tag; - else if (C is convertible to input_iterator_tag) - return single_pass_traversal_tag; - else if (C is convertible to output_iterator_tag) - return incrementable_traversal_tag; - else - *the program is ill-formed* - - -=========== - Footnotes -=========== - -.. _UnaryTypeTrait: n1519_ - -The UnaryTypeTrait concept is defined in n1519_; the LWG is -considering adding the requirement that specializations are derived -from their nested ``::type``. - -.. _n1519: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1519.htm - -.. - LocalWords: Abrahams Siek Witt const bool Sutter's WG int UL LI href Lvalue - LocalWords: ReadableIterator WritableIterator SwappableIterator cv pre iter - LocalWords: ConstantLvalueIterator MutableLvalueIterator CopyConstructible TR - LocalWords: ForwardTraversalIterator BidirectionalTraversalIterator lvalue - LocalWords: RandomAccessTraversalIterator dereferenceable Incrementable tmp - LocalWords: incrementable xxx min prev inplace png oldeqnew AccessTag struct - LocalWords: TraversalTag typename lvalues DWA Hmm JGS mis enum diff --git a/doc/oldeqnew.png b/doc/oldeqnew.png deleted file mode 100644 index 30cd159..0000000 Binary files a/doc/oldeqnew.png and /dev/null differ diff --git a/doc/permutation_iter_abstract.rst b/doc/permutation_iter_abstract.rst deleted file mode 100644 index 578b3ed..0000000 --- a/doc/permutation_iter_abstract.rst +++ /dev/null @@ -1,4 +0,0 @@ -The permutation iterator adaptor provides a permuted view of a given -range. That is, the view includes every element of the given range but -in a potentially different order. - diff --git a/doc/permutation_iterator.html b/doc/permutation_iterator.html deleted file mode 100644 index 667edfb..0000000 --- a/doc/permutation_iterator.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -Permutation Iterator - - - - - - - -
-

Permutation Iterator

- --- - - - - - - - - - - - -
Author:Toon Knapen, David Abrahams, Roland Richter, Jeremy Siek
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu
Organization:Boost Consulting, Indiana University Open Systems -Lab
Date:2004-11-01
Copyright:Copyright Toon Knapen, David Abrahams, Roland Richter, and Jeremy Siek 2003.
- --- - - - -
abstract:The permutation iterator adaptor provides a permuted view of a given -range. That is, the view includes every element of the given range but -in a potentially different order.
- -
-

Introduction

-

The adaptor takes two arguments:

-
-
    -
  • an iterator to the range V on which the permutation -will be applied
  • -
  • the reindexing scheme that defines how the -elements of V will be permuted.
  • -
-
-

Note that the permutation iterator is not limited to strict -permutations of the given range V. The distance between begin and end -of the reindexing iterators is allowed to be smaller compared to the -size of the range V, in which case the permutation iterator only -provides a permutation of a subrange of V. The indexes neither need -to be unique. In this same context, it must be noted that the past the -end permutation iterator is completely defined by means of the -past-the-end iterator to the indices.

-
-
-

Reference

-
-template< class ElementIterator
-        , class IndexIterator
-        , class ValueT        = use_default
-        , class CategoryT     = use_default
-        , class ReferenceT    = use_default
-        , class DifferenceT   = use_default >
-class permutation_iterator
-{
-public:
-  permutation_iterator();
-  explicit permutation_iterator(ElementIterator x, IndexIterator y);
-
-  template< class OEIter, class OIIter, class V, class C, class R, class D >
-  permutation_iterator(
-      permutation_iterator<OEIter, OIIter, V, C, R, D> const& r
-      , typename enable_if_convertible<OEIter, ElementIterator>::type* = 0
-      , typename enable_if_convertible<OIIter, IndexIterator>::type* = 0
-      );
-  reference operator*() const;
-  permutation_iterator& operator++();
-  ElementIterator const& base() const;
-private:
-  ElementIterator m_elt;      // exposition only
-  IndexIterator m_order;      // exposition only
-};
-
-template <class ElementIterator, class IndexIterator>
-permutation_iterator<ElementIterator, IndexIterator> 
-make_permutation_iterator( ElementIterator e, IndexIterator i);
-
-
-

permutation_iterator requirements

-

ElementIterator shall model Random Access Traversal Iterator. -IndexIterator shall model Readable Iterator. The value type of -the IndexIterator must be convertible to the difference type of -ElementIterator.

-
-
-

permutation_iterator models

-

permutation_iterator models the same iterator traversal concepts -as IndexIterator and the same iterator access concepts as -ElementIterator.

-

If IndexIterator models Single Pass Iterator and -ElementIterator models Readable Iterator then -permutation_iterator models Input Iterator.

-

If IndexIterator models Forward Traversal Iterator and -ElementIterator models Readable Lvalue Iterator then -permutation_iterator models Forward Iterator.

-

If IndexIterator models Bidirectional Traversal Iterator and -ElementIterator models Readable Lvalue Iterator then -permutation_iterator models Bidirectional Iterator.

-

If IndexIterator models Random Access Traversal Iterator and -ElementIterator models Readable Lvalue Iterator then -permutation_iterator models Random Access Iterator.

-

permutation_iterator<E1, X, V1, C2, R1, D1> is interoperable -with permutation_iterator<E2, Y, V2, C2, R2, D2> if and only if -X is interoperable with Y and E1 is convertible -to E2.

-
-
-

permutation_iterator operations

-

In addition to those operations required by the concepts that -permutation_iterator models, permutation_iterator provides the -following operations.

-

permutation_iterator();

- --- - - - -
Effects:Default constructs m_elt and m_order.
-

explicit permutation_iterator(ElementIterator x, IndexIterator y);

- --- - - - -
Effects:Constructs m_elt from x and m_order from y.
-
-template< class OEIter, class OIIter, class V, class C, class R, class D >
-permutation_iterator(
-    permutation_iterator<OEIter, OIIter, V, C, R, D> const& r
-    , typename enable_if_convertible<OEIter, ElementIterator>::type* = 0
-    , typename enable_if_convertible<OIIter, IndexIterator>::type* = 0
-    );
-
- --- - - - -
Effects:Constructs m_elt from r.m_elt and -m_order from y.m_order.
-

reference operator*() const;

- --- - - - -
Returns:*(m_elt + *m_order)
-

permutation_iterator& operator++();

- --- - - - - - -
Effects:++m_order
Returns:*this
-

ElementIterator const& base() const;

- --- - - - -
Returns:m_order
-
-template <class ElementIterator, class IndexIterator>
-permutation_iterator<ElementIterator, IndexIterator> 
-make_permutation_iterator(ElementIterator e, IndexIterator i);
-
- --- - - - -
Returns:permutation_iterator<ElementIterator, IndexIterator>(e, i)
-
-
-
-

Example

-
-using namespace boost;
-int i = 0;
-
-typedef std::vector< int > element_range_type;
-typedef std::list< int > index_type;
-
-static const int element_range_size = 10;
-static const int index_size = 4;
-
-element_range_type elements( element_range_size );
-for(element_range_type::iterator el_it = elements.begin() ; el_it != elements.end() ; ++el_it)
-  *el_it = std::distance(elements.begin(), el_it);
-
-index_type indices( index_size );
-for(index_type::iterator i_it = indices.begin() ; i_it != indices.end() ; ++i_it ) 
-  *i_it = element_range_size - index_size + std::distance(indices.begin(), i_it);
-std::reverse( indices.begin(), indices.end() );
-
-typedef permutation_iterator< element_range_type::iterator, index_type::iterator > permutation_type;
-permutation_type begin = make_permutation_iterator( elements.begin(), indices.begin() );
-permutation_type it = begin;
-permutation_type end = make_permutation_iterator( elements.begin(), indices.end() );
-
-std::cout << "The original range is : ";
-std::copy( elements.begin(), elements.end(), std::ostream_iterator< int >( std::cout, " " ) );
-std::cout << "\n";
-
-std::cout << "The reindexing scheme is : ";
-std::copy( indices.begin(), indices.end(), std::ostream_iterator< int >( std::cout, " " ) );
-std::cout << "\n";
-
-std::cout << "The permutated range is : ";
-std::copy( begin, end, std::ostream_iterator< int >( std::cout, " " ) );
-std::cout << "\n";
-
-std::cout << "Elements at even indices in the permutation : ";
-it = begin;
-for(i = 0; i < index_size / 2 ; ++i, it+=2 ) std::cout << *it << " ";
-std::cout << "\n";
-
-std::cout << "Permutation backwards : ";
-it = begin + (index_size);
-assert( it != begin );
-for( ; it-- != begin ; ) std::cout << *it << " ";
-std::cout << "\n";
-
-std::cout << "Iterate backward with stride 2 : ";
-it = begin + (index_size - 1);
-for(i = 0 ; i < index_size / 2 ; ++i, it-=2 ) std::cout << *it << " ";
-std::cout << "\n";
-
-

The output is:

-
-The original range is : 0 1 2 3 4 5 6 7 8 9 
-The reindexing scheme is : 9 8 7 6 
-The permutated range is : 9 8 7 6 
-Elements at even indices in the permutation : 9 7 
-Permutation backwards : 6 7 8 9 
-Iterate backward with stride 2 : 6 8 
-
-

The source code for this example can be found here.

-
-
- - - - diff --git a/doc/permutation_iterator.pdf b/doc/permutation_iterator.pdf deleted file mode 100755 index 37fef06..0000000 Binary files a/doc/permutation_iterator.pdf and /dev/null differ diff --git a/doc/permutation_iterator.rst b/doc/permutation_iterator.rst deleted file mode 100644 index d2f0ee0..0000000 --- a/doc/permutation_iterator.rst +++ /dev/null @@ -1,37 +0,0 @@ -++++++++++++++++++++++ - Permutation Iterator -++++++++++++++++++++++ - -:Author: Toon Knapen, David Abrahams, Roland Richter, Jeremy Siek -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_ -:date: $Date$ -:copyright: Copyright Toon Knapen, David Abrahams, Roland Richter, and Jeremy Siek 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu - -:abstract: - - .. include:: permutation_iter_abstract.rst - -.. contents:: Table of Contents - - -Introduction -============ - -.. include:: permutation_iterator_body.rst - - -Reference -========= - -.. include:: permutation_iterator_ref.rst - - -Example -======= - -.. include:: permutation_iterator_eg.rst diff --git a/doc/permutation_iterator_body.rst b/doc/permutation_iterator_body.rst deleted file mode 100644 index 0f838e7..0000000 --- a/doc/permutation_iterator_body.rst +++ /dev/null @@ -1,15 +0,0 @@ -The adaptor takes two arguments: - - * an iterator to the range V on which the permutation - will be applied - * the reindexing scheme that defines how the - elements of V will be permuted. - -Note that the permutation iterator is not limited to strict -permutations of the given range V. The distance between begin and end -of the reindexing iterators is allowed to be smaller compared to the -size of the range V, in which case the permutation iterator only -provides a permutation of a subrange of V. The indexes neither need -to be unique. In this same context, it must be noted that the past the -end permutation iterator is completely defined by means of the -past-the-end iterator to the indices. diff --git a/doc/permutation_iterator_eg.rst b/doc/permutation_iterator_eg.rst deleted file mode 100644 index 8b79cb9..0000000 --- a/doc/permutation_iterator_eg.rst +++ /dev/null @@ -1,67 +0,0 @@ -:: - - using namespace boost; - int i = 0; - - typedef std::vector< int > element_range_type; - typedef std::list< int > index_type; - - static const int element_range_size = 10; - static const int index_size = 4; - - element_range_type elements( element_range_size ); - for(element_range_type::iterator el_it = elements.begin() ; el_it != elements.end() ; ++el_it) - *el_it = std::distance(elements.begin(), el_it); - - index_type indices( index_size ); - for(index_type::iterator i_it = indices.begin() ; i_it != indices.end() ; ++i_it ) - *i_it = element_range_size - index_size + std::distance(indices.begin(), i_it); - std::reverse( indices.begin(), indices.end() ); - - typedef permutation_iterator< element_range_type::iterator, index_type::iterator > permutation_type; - permutation_type begin = make_permutation_iterator( elements.begin(), indices.begin() ); - permutation_type it = begin; - permutation_type end = make_permutation_iterator( elements.begin(), indices.end() ); - - std::cout << "The original range is : "; - std::copy( elements.begin(), elements.end(), std::ostream_iterator< int >( std::cout, " " ) ); - std::cout << "\n"; - - std::cout << "The reindexing scheme is : "; - std::copy( indices.begin(), indices.end(), std::ostream_iterator< int >( std::cout, " " ) ); - std::cout << "\n"; - - std::cout << "The permutated range is : "; - std::copy( begin, end, std::ostream_iterator< int >( std::cout, " " ) ); - std::cout << "\n"; - - std::cout << "Elements at even indices in the permutation : "; - it = begin; - for(i = 0; i < index_size / 2 ; ++i, it+=2 ) std::cout << *it << " "; - std::cout << "\n"; - - std::cout << "Permutation backwards : "; - it = begin + (index_size); - assert( it != begin ); - for( ; it-- != begin ; ) std::cout << *it << " "; - std::cout << "\n"; - - std::cout << "Iterate backward with stride 2 : "; - it = begin + (index_size - 1); - for(i = 0 ; i < index_size / 2 ; ++i, it-=2 ) std::cout << *it << " "; - std::cout << "\n"; - - -The output is:: - - The original range is : 0 1 2 3 4 5 6 7 8 9 - The reindexing scheme is : 9 8 7 6 - The permutated range is : 9 8 7 6 - Elements at even indices in the permutation : 9 7 - Permutation backwards : 6 7 8 9 - Iterate backward with stride 2 : 6 8 - - -The source code for this example can be found `here`__. - -__ ../example/permutation_iter_example.cpp diff --git a/doc/permutation_iterator_ref.rst b/doc/permutation_iterator_ref.rst deleted file mode 100644 index c29f285..0000000 --- a/doc/permutation_iterator_ref.rst +++ /dev/null @@ -1,126 +0,0 @@ -.. parsed-literal:: - - template< class ElementIterator - , class IndexIterator - , class ValueT = use_default - , class CategoryT = use_default - , class ReferenceT = use_default - , class DifferenceT = use_default > - class permutation_iterator - { - public: - permutation_iterator(); - explicit permutation_iterator(ElementIterator x, IndexIterator y); - - template< class OEIter, class OIIter, class V, class C, class R, class D > - permutation_iterator( - permutation_iterator const& r - , typename enable_if_convertible::type* = 0 - , typename enable_if_convertible::type* = 0 - ); - reference operator*() const; - permutation_iterator& operator++(); - ElementIterator const& base() const; - private: - ElementIterator m_elt; // exposition only - IndexIterator m_order; // exposition only - }; - - template - permutation_iterator - make_permutation_iterator( ElementIterator e, IndexIterator i); - - - -``permutation_iterator`` requirements -------------------------------------- - -``ElementIterator`` shall model Random Access Traversal Iterator. -``IndexIterator`` shall model Readable Iterator. The value type of -the ``IndexIterator`` must be convertible to the difference type of -``ElementIterator``. - - -``permutation_iterator`` models -------------------------------- - -``permutation_iterator`` models the same iterator traversal concepts -as ``IndexIterator`` and the same iterator access concepts as -``ElementIterator``. - -If ``IndexIterator`` models Single Pass Iterator and -``ElementIterator`` models Readable Iterator then -``permutation_iterator`` models Input Iterator. - -If ``IndexIterator`` models Forward Traversal Iterator and -``ElementIterator`` models Readable Lvalue Iterator then -``permutation_iterator`` models Forward Iterator. - -If ``IndexIterator`` models Bidirectional Traversal Iterator and -``ElementIterator`` models Readable Lvalue Iterator then -``permutation_iterator`` models Bidirectional Iterator. - -If ``IndexIterator`` models Random Access Traversal Iterator and -``ElementIterator`` models Readable Lvalue Iterator then -``permutation_iterator`` models Random Access Iterator. - -``permutation_iterator`` is interoperable -with ``permutation_iterator`` if and only if -``X`` is interoperable with ``Y`` and ``E1`` is convertible -to ``E2``. - - -``permutation_iterator`` operations ------------------------------------ - -In addition to those operations required by the concepts that -``permutation_iterator`` models, ``permutation_iterator`` provides the -following operations. - -``permutation_iterator();`` - -:Effects: Default constructs ``m_elt`` and ``m_order``. - - -``explicit permutation_iterator(ElementIterator x, IndexIterator y);`` - -:Effects: Constructs ``m_elt`` from ``x`` and ``m_order`` from ``y``. - - -:: - - template< class OEIter, class OIIter, class V, class C, class R, class D > - permutation_iterator( - permutation_iterator const& r - , typename enable_if_convertible::type* = 0 - , typename enable_if_convertible::type* = 0 - ); - -:Effects: Constructs ``m_elt`` from ``r.m_elt`` and - ``m_order`` from ``y.m_order``. - - -``reference operator*() const;`` - -:Returns: ``*(m_elt + *m_order)`` - - -``permutation_iterator& operator++();`` - -:Effects: ``++m_order`` -:Returns: ``*this`` - - -``ElementIterator const& base() const;`` - -:Returns: ``m_order`` - - -:: - - template - permutation_iterator - make_permutation_iterator(ElementIterator e, IndexIterator i); - -:Returns: ``permutation_iterator(e, i)`` - diff --git a/doc/pointee.html b/doc/pointee.html deleted file mode 100755 index 5766c54..0000000 --- a/doc/pointee.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - -pointee and indirect_reference - - - - - - - -
-

pointee and indirect_reference

- --- - - - - - - - - - - - -
Author:David Abrahams
Contact:dave@boost-consulting.com
Organization:Boost Consulting
Date:2005-02-27
Copyright:Copyright David Abrahams 2004.
- --- - - - -
abstract:Provides the capability to deduce the referent types of -pointers, smart pointers and iterators in generic code.
-
-

Overview

-

Have you ever wanted to write a generic function that can operate -on any kind of dereferenceable object? If you have, you've -probably run into the problem of how to determine the type that the -object "points at":

-
-template <class Dereferenceable>
-void f(Dereferenceable p)
-{
-    what-goes-here? value = *p;
-    ...
-}
-
-
-

pointee

-

It turns out to be impossible to come up with a fully-general -algorithm to do determine what-goes-here directly, but it is -possible to require that pointee<Dereferenceable>::type is -correct. Naturally, pointee has the same difficulty: it can't -determine the appropriate ::type reliably for all -Dereferenceables, but it makes very good guesses (it works -for all pointers, standard and boost smart pointers, and -iterators), and when it guesses wrongly, it can be specialized as -necessary:

-
-namespace boost
-{
-  template <class T>
-  struct pointee<third_party_lib::smart_pointer<T> >
-  {
-      typedef T type;
-  };
-}
-
-
-
-

indirect_reference

-

indirect_reference<T>::type is rather more specialized than -pointee, and is meant to be used to forward the result of -dereferencing an object of its argument type. Most dereferenceable -types just return a reference to their pointee, but some return -proxy references or return the pointee by value. When that -information is needed, call on indirect_reference.

-

Both of these templates are essential to the correct functioning of -indirect_iterator.

-
-
-
-

Reference

-
-

pointee

- - - -
-template <class Dereferenceable>
-struct pointee
-{
-    typedef /* see below */ type;
-};
-
- --- - - - -
Requires:For an object x of type Dereferenceable, *x -is well-formed. If ++x is ill-formed it shall neither be -ambiguous nor shall it violate access control, and -Dereferenceable::element_type shall be an accessible type. -Otherwise iterator_traits<Dereferenceable>::value_type shall -be well formed. [Note: These requirements need not apply to -explicit or partial specializations of pointee]
-

type is determined according to the following algorithm, where -x is an object of type Dereferenceable:

-
-if ( ++x is ill-formed )
-{
-    return ``Dereferenceable::element_type``
-}
-else if (``*x`` is a mutable reference to
-         std::iterator_traits<Dereferenceable>::value_type)
-{
-    return iterator_traits<Dereferenceable>::value_type
-}
-else
-{
-    return iterator_traits<Dereferenceable>::value_type const
-}
-
-
-
-

indirect_reference

- - - -
-template <class Dereferenceable>
-struct indirect_reference
-{
-    typedef /* see below */ type;
-};
-
- --- - - - -
Requires:For an object x of type Dereferenceable, *x -is well-formed. If ++x is ill-formed it shall neither be -ambiguous nor shall it violate access control, and -pointee<Dereferenceable>::type& shall be well-formed. -Otherwise iterator_traits<Dereferenceable>::reference shall -be well formed. [Note: These requirements need not apply to -explicit or partial specializations of indirect_reference]
-

type is determined according to the following algorithm, where -x is an object of type Dereferenceable:

-
-if ( ++x is ill-formed )
-    return ``pointee<Dereferenceable>::type&``
-else
-    std::iterator_traits<Dereferenceable>::reference
-
-
-
-
- - - - diff --git a/doc/pointee.pdf b/doc/pointee.pdf deleted file mode 100755 index 98efe93..0000000 Binary files a/doc/pointee.pdf and /dev/null differ diff --git a/doc/pointee.rst b/doc/pointee.rst deleted file mode 100755 index 9f47692..0000000 --- a/doc/pointee.rst +++ /dev/null @@ -1,84 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++ - ``pointee`` and ``indirect_reference`` -++++++++++++++++++++++++++++++++++++++++ - -:Author: David Abrahams -:Contact: dave@boost-consulting.com -:organization: `Boost Consulting`_ -:date: $Date$ -:copyright: Copyright David Abrahams 2004. - -.. _`Boost Consulting`: http://www.boost-consulting.com - -:abstract: Provides the capability to deduce the referent types of - pointers, smart pointers and iterators in generic code. - -Overview -======== - -Have you ever wanted to write a generic function that can operate -on any kind of dereferenceable object? If you have, you've -probably run into the problem of how to determine the type that the -object "points at": - -.. parsed-literal:: - - template - void f(Dereferenceable p) - { - *what-goes-here?* value = \*p; - ... - } - - -``pointee`` ------------ - -It turns out to be impossible to come up with a fully-general -algorithm to do determine *what-goes-here* directly, but it is -possible to require that ``pointee::type`` is -correct. Naturally, ``pointee`` has the same difficulty: it can't -determine the appropriate ``::type`` reliably for all -``Dereferenceable``\ s, but it makes very good guesses (it works -for all pointers, standard and boost smart pointers, and -iterators), and when it guesses wrongly, it can be specialized as -necessary:: - - namespace boost - { - template - struct pointee > - { - typedef T type; - }; - } - -``indirect_reference`` ----------------------- - -``indirect_reference::type`` is rather more specialized than -``pointee``, and is meant to be used to forward the result of -dereferencing an object of its argument type. Most dereferenceable -types just return a reference to their pointee, but some return -proxy references or return the pointee by value. When that -information is needed, call on ``indirect_reference``. - -Both of these templates are essential to the correct functioning of -|indirect_iterator|_. - -.. |indirect_iterator| replace:: ``indirect_iterator`` -.. _indirect_iterator: indirect_iterator.html - -Reference -========= - -``pointee`` ------------ - -.. include:: pointee_ref.rst - -``indirect_reference`` ----------------------- - -.. include:: indirect_reference_ref.rst - diff --git a/doc/pointee_ref.rst b/doc/pointee_ref.rst deleted file mode 100755 index 19aed24..0000000 --- a/doc/pointee_ref.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. Copyright David Abrahams 2004. Use, modification and distribution is -.. subject to the Boost Software License, Version 1.0. (See accompanying -.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -:: - - template - struct pointee - { - typedef /* see below */ type; - }; - -:Requires: For an object ``x`` of type ``Dereferenceable``, ``*x`` - is well-formed. If ``++x`` is ill-formed it shall neither be - ambiguous nor shall it violate access control, and - ``Dereferenceable::element_type`` shall be an accessible type. - Otherwise ``iterator_traits::value_type`` shall - be well formed. [Note: These requirements need not apply to - explicit or partial specializations of ``pointee``] - -``type`` is determined according to the following algorithm, where -``x`` is an object of type ``Dereferenceable``:: - - if ( ++x is ill-formed ) - { - return ``Dereferenceable::element_type`` - } - else if (``*x`` is a mutable reference to - std::iterator_traits::value_type) - { - return iterator_traits::value_type - } - else - { - return iterator_traits::value_type const - } - - \ No newline at end of file diff --git a/doc/ref_problem.html b/doc/ref_problem.html deleted file mode 100755 index cdc6682..0000000 --- a/doc/ref_problem.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -Problem with reference and old/new iterator category correspondance - - - -

Problem with reference and old/new iterator category correspondance

-
- --- - - - - - - - - - - - -
Author:David Abrahams and Jeremy Siek
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu
Organization:Boost Consulting, Indiana University Bloomington
date:$Date$
Copyright:Copyright David Abrahams, Jeremy Siek 2003. Use, modification and -distribution is subject to the Boost Software License, -Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -at http://www.boost.org/LICENSE_1_0.txt)
-
-

Introduction

-

The new iterator categories are intended to correspond to the old -iterator categories, as specified in a diagram in N1550. For example, -an iterator categorized as a mutable Forward Iterator under the old -scheme is now a Writable, Lvalue, and Foward Traversal iterator. -However, there is a problem with this correspondance, the new iterator -categories place requirements on the iterator_traits<X>::reference -type whereas the standard iterator requirements say nothing about the -reference type . In particular, the new Readable Iterator -requirements say that the return type of *a must be -iterator_traits<X>::reference and the Lvalue Iterator requirements -says that iterator_traits<X>::reference must be T& or const -T&.

-
-
-

Proposed Resolution

-

Change the standard requirements to match the requirements of the new -iterators. (more details to come)

-
-
-

Rationale

-

The lack of specification in the standard of the reference type is -certainly a defect. Without specification, it is entirely useless in a -generic function. The current practice in the community is generally -to assume there are requirements on the reference type, such as -those proposed in the new iterator categories.

-

There is some danger in adding requirements to existing concepts. -This will mean that some existing iterator types will no longer meet -the iterator requirements. However, we feel that the impact of this is -small enough to warrant going ahead with this change.

-

An alternative solution would be to leave the standard requirements as -is, and to remove the requirements for the reference type in the -new iterator concepts. We are not in favor of this approach because it -extends what we see as a defect further into the future.

-
-
- - - - diff --git a/doc/ref_problem.rst b/doc/ref_problem.rst deleted file mode 100644 index 2f2908a..0000000 --- a/doc/ref_problem.rst +++ /dev/null @@ -1,63 +0,0 @@ -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Problem with ``reference`` and old/new iterator category correspondance -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -.. _N1550: http://www.boost-consulting.com/writing/n1550.html -.. _N1530: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1530.html - -:Author: David Abrahams and Jeremy Siek -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu -:Organization: `Boost Consulting`_, Indiana University Bloomington -:date: $Date$ -:Copyright: Copyright David Abrahams, Jeremy Siek 2003. Use, modification and - distribution is subject to the Boost Software License, - Version 1.0. (See accompanying file LICENSE_1_0.txt or copy - at http://www.boost.org/LICENSE_1_0.txt) - -.. _`Boost Consulting`: http://www.boost-consulting.com - -============== - Introduction -============== - -The new iterator categories are intended to correspond to the old -iterator categories, as specified in a diagram in N1550_. For example, -an iterator categorized as a mutable Forward Iterator under the old -scheme is now a Writable, Lvalue, and Foward Traversal iterator. -However, there is a problem with this correspondance, the new iterator -categories place requirements on the ``iterator_traits::reference`` -type whereas the standard iterator requirements say nothing about the -``reference`` type . In particular, the new Readable Iterator -requirements say that the return type of ``*a`` must be -``iterator_traits::reference`` and the Lvalue Iterator requirements -says that ``iterator_traits::reference`` must be ``T&`` or ``const -T&``. - - -==================== - Proposed Resolution -==================== - -Change the standard requirements to match the requirements of the new -iterators. (more details to come) - - -========== - Rationale -========== - -The lack of specification in the standard of the ``reference`` type is -certainly a defect. Without specification, it is entirely useless in a -generic function. The current practice in the community is generally -to assume there are requirements on the ``reference`` type, such as -those proposed in the new iterator categories. - -There is some danger in *adding* requirements to existing concepts. -This will mean that some existing iterator types will no longer meet -the iterator requirements. However, we feel that the impact of this is -small enough to warrant going ahead with this change. - -An alternative solution would be to leave the standard requirements as -is, and to remove the requirements for the ``reference`` type in the -new iterator concepts. We are not in favor of this approach because it -extends what we see as a defect further into the future. diff --git a/doc/reverse_iterator.html b/doc/reverse_iterator.html deleted file mode 100644 index fb6c759..0000000 --- a/doc/reverse_iterator.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - -Reverse Iterator - - - - - - - -
-

Reverse Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:The reverse iterator adaptor iterates through the adapted iterator -range in the opposite direction.
- -
-

reverse_iterator synopsis

-
-template <class Iterator>
-class reverse_iterator
-{
-public:
-  typedef iterator_traits<Iterator>::value_type value_type;
-  typedef iterator_traits<Iterator>::reference reference;
-  typedef iterator_traits<Iterator>::pointer pointer;
-  typedef iterator_traits<Iterator>::difference_type difference_type;
-  typedef /* see below */ iterator_category;
-
-  reverse_iterator() {}
-  explicit reverse_iterator(Iterator x) ;
-
-  template<class OtherIterator>
-  reverse_iterator(
-      reverse_iterator<OtherIterator> const& r
-    , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-  );
-  Iterator const& base() const;
-  reference operator*() const;
-  reverse_iterator& operator++();
-  reverse_iterator& operator--();
-private:
-  Iterator m_iterator; // exposition
-};
-
-

If Iterator models Random Access Traversal Iterator and Readable -Lvalue Iterator, then iterator_category is convertible to -random_access_iterator_tag. Otherwise, if -Iterator models Bidirectional Traversal Iterator and Readable -Lvalue Iterator, then iterator_category is convertible to -bidirectional_iterator_tag. Otherwise, iterator_category is -convertible to input_iterator_tag.

-
-
-

reverse_iterator requirements

-

Iterator must be a model of Bidirectional Traversal Iterator. The -type iterator_traits<Iterator>::reference must be the type of -*i, where i is an object of type Iterator.

-
-
-

reverse_iterator models

-

A specialization of reverse_iterator models the same iterator -traversal and iterator access concepts modeled by its Iterator -argument. In addition, it may model old iterator concepts -specified in the following table:

- ---- - - - - - - - - - - - - - - - - - - - -
If I modelsthen reverse_iterator<I> models
Readable Lvalue Iterator, -Bidirectional Traversal IteratorBidirectional Iterator
Writable Lvalue Iterator, -Bidirectional Traversal IteratorMutable Bidirectional Iterator
Readable Lvalue Iterator, -Random Access Traversal IteratorRandom Access Iterator
Writable Lvalue Iterator, -Random Access Traversal IteratorMutable Random Access Iterator
-

reverse_iterator<X> is interoperable with -reverse_iterator<Y> if and only if X is interoperable with -Y.

-
-
-

reverse_iterator operations

-

In addition to the operations required by the concepts modeled by -reverse_iterator, reverse_iterator provides the following -operations.

-

reverse_iterator();

- --- - - - - - -
Requires:Iterator must be Default Constructible.
Effects:Constructs an instance of reverse_iterator with m_iterator -default constructed.
-

explicit reverse_iterator(Iterator x);

- --- - - - -
Effects:Constructs an instance of reverse_iterator with -m_iterator copy constructed from x.
-
-template<class OtherIterator>
-reverse_iterator(
-    reverse_iterator<OtherIterator> const& r
-  , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
-);
-
- --- - - - - - -
Requires:OtherIterator is implicitly convertible to Iterator.
Effects:Constructs instance of reverse_iterator whose -m_iterator subobject is constructed from y.base().
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Effects:
-
-Iterator tmp = m_iterator;
-return *--tmp;
-
-

reverse_iterator& operator++();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-

reverse_iterator& operator--();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-
-template <class BidirectionalIterator>
-reverse_iterator<BidirectionalIterator>n
-make_reverse_iterator(BidirectionalIterator x);
-
- --- - - - -
Returns:An instance of reverse_iterator<BidirectionalIterator> -with a current constructed from x.
-
-
-

Example

-

The following example prints an array of characters in reverse order -using reverse_iterator.

-
-char letters_[] = "hello world!";
-const int N = sizeof(letters_)/sizeof(char) - 1;
-typedef char* base_iterator;
-base_iterator letters(letters_);
-std::cout << "original sequence of letters:\t\t\t" << letters_ << std::endl;
-
-boost::reverse_iterator<base_iterator>
-  reverse_letters_first(letters + N),
-  reverse_letters_last(letters);
-
-std::cout << "sequence in reverse order:\t\t\t";
-std::copy(reverse_letters_first, reverse_letters_last,
-          std::ostream_iterator<char>(std::cout));
-std::cout << std::endl;
-
-std::cout << "sequence in double-reversed (normal) order:\t";
-std::copy(boost::make_reverse_iterator(reverse_letters_last),
-          boost::make_reverse_iterator(reverse_letters_first),
-          std::ostream_iterator<char>(std::cout));
-std::cout << std::endl;
-
-

The output is:

-
-original sequence of letters:                   hello world!
-sequence in reverse order:                      !dlrow olleh
-sequence in double-reversed (normal) order:     hello world!
-
-

The source code for this example can be found here.

-
-
- - - - diff --git a/doc/reverse_iterator.pdf b/doc/reverse_iterator.pdf deleted file mode 100755 index 761c451..0000000 Binary files a/doc/reverse_iterator.pdf and /dev/null differ diff --git a/doc/reverse_iterator.rst b/doc/reverse_iterator.rst deleted file mode 100644 index b33687b..0000000 --- a/doc/reverse_iterator.rst +++ /dev/null @@ -1,29 +0,0 @@ -++++++++++++++++++ - Reverse Iterator -++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - - .. include:: reverse_iterator_abstract.rst - -.. contents:: Table of Contents - -``reverse_iterator`` synopsis -............................. - -.. include:: reverse_iterator_ref.rst -.. include:: make_reverse_iterator.rst - -.. include:: reverse_iterator_eg.rst diff --git a/doc/reverse_iterator_abstract.rst b/doc/reverse_iterator_abstract.rst deleted file mode 100644 index a4caee5..0000000 --- a/doc/reverse_iterator_abstract.rst +++ /dev/null @@ -1,9 +0,0 @@ - -The reverse iterator adaptor iterates through the adapted iterator -range in the opposite direction. - - - - - - diff --git a/doc/reverse_iterator_eg.rst b/doc/reverse_iterator_eg.rst deleted file mode 100644 index 7923f2f..0000000 --- a/doc/reverse_iterator_eg.rst +++ /dev/null @@ -1,42 +0,0 @@ - -Example -....... - -The following example prints an array of characters in reverse order -using ``reverse_iterator``. - -:: - - char letters_[] = "hello world!"; - const int N = sizeof(letters_)/sizeof(char) - 1; - typedef char* base_iterator; - base_iterator letters(letters_); - std::cout << "original sequence of letters:\t\t\t" << letters_ << std::endl; - - boost::reverse_iterator - reverse_letters_first(letters + N), - reverse_letters_last(letters); - - std::cout << "sequence in reverse order:\t\t\t"; - std::copy(reverse_letters_first, reverse_letters_last, - std::ostream_iterator(std::cout)); - std::cout << std::endl; - - std::cout << "sequence in double-reversed (normal) order:\t"; - std::copy(boost::make_reverse_iterator(reverse_letters_last), - boost::make_reverse_iterator(reverse_letters_first), - std::ostream_iterator(std::cout)); - std::cout << std::endl; - - - -The output is:: - - original sequence of letters: hello world! - sequence in reverse order: !dlrow olleh - sequence in double-reversed (normal) order: hello world! - - -The source code for this example can be found `here`__. - -__ ../example/reverse_iterator_example.cpp diff --git a/doc/reverse_iterator_ref.rst b/doc/reverse_iterator_ref.rst deleted file mode 100644 index 36b93d6..0000000 --- a/doc/reverse_iterator_ref.rst +++ /dev/null @@ -1,137 +0,0 @@ -:: - - template - class reverse_iterator - { - public: - typedef iterator_traits::value_type value_type; - typedef iterator_traits::reference reference; - typedef iterator_traits::pointer pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - reverse_iterator() {} - explicit reverse_iterator(Iterator x) ; - - template - reverse_iterator( - reverse_iterator const& r - , typename enable_if_convertible::type* = 0 // exposition - ); - Iterator const& base() const; - reference operator*() const; - reverse_iterator& operator++(); - reverse_iterator& operator--(); - private: - Iterator m_iterator; // exposition - }; - - -If ``Iterator`` models Random Access Traversal Iterator and Readable -Lvalue Iterator, then ``iterator_category`` is convertible to -``random_access_iterator_tag``. Otherwise, if -``Iterator`` models Bidirectional Traversal Iterator and Readable -Lvalue Iterator, then ``iterator_category`` is convertible to -``bidirectional_iterator_tag``. Otherwise, ``iterator_category`` is -convertible to ``input_iterator_tag``. - - - -``reverse_iterator`` requirements -................................. - -``Iterator`` must be a model of Bidirectional Traversal Iterator. The -type ``iterator_traits::reference`` must be the type of -``*i``, where ``i`` is an object of type ``Iterator``. - - - -``reverse_iterator`` models -........................... - -A specialization of ``reverse_iterator`` models the same iterator -traversal and iterator access concepts modeled by its ``Iterator`` -argument. In addition, it may model old iterator concepts -specified in the following table: - -+---------------------------------------+-----------------------------------+ -| If ``I`` models |then ``reverse_iterator`` models| -+=======================================+===================================+ -| Readable Lvalue Iterator, | Bidirectional Iterator | -| Bidirectional Traversal Iterator | | -+---------------------------------------+-----------------------------------+ -| Writable Lvalue Iterator, | Mutable Bidirectional Iterator | -| Bidirectional Traversal Iterator | | -+---------------------------------------+-----------------------------------+ -| Readable Lvalue Iterator, | Random Access Iterator | -| Random Access Traversal Iterator | | -+---------------------------------------+-----------------------------------+ -| Writable Lvalue Iterator, | Mutable Random Access Iterator | -| Random Access Traversal Iterator | | -+---------------------------------------+-----------------------------------+ - - -``reverse_iterator`` is interoperable with -``reverse_iterator`` if and only if ``X`` is interoperable with -``Y``. - -``reverse_iterator`` operations -............................... - -In addition to the operations required by the concepts modeled by -``reverse_iterator``, ``reverse_iterator`` provides the following -operations. - - - -``reverse_iterator();`` - -:Requires: ``Iterator`` must be Default Constructible. -:Effects: Constructs an instance of ``reverse_iterator`` with ``m_iterator`` - default constructed. - -``explicit reverse_iterator(Iterator x);`` - -:Effects: Constructs an instance of ``reverse_iterator`` with - ``m_iterator`` copy constructed from ``x``. - - -:: - - template - reverse_iterator( - reverse_iterator const& r - , typename enable_if_convertible::type* = 0 // exposition - ); - -:Requires: ``OtherIterator`` is implicitly convertible to ``Iterator``. -:Effects: Constructs instance of ``reverse_iterator`` whose - ``m_iterator`` subobject is constructed from ``y.base()``. - - - -``Iterator const& base() const;`` - -:Returns: ``m_iterator`` - - -``reference operator*() const;`` - -:Effects: - -:: - - Iterator tmp = m_iterator; - return *--tmp; - - -``reverse_iterator& operator++();`` - -:Effects: ``--m_iterator`` -:Returns: ``*this`` - - -``reverse_iterator& operator--();`` - -:Effects: ``++m_iterator`` -:Returns: ``*this`` diff --git a/doc/rst2html b/doc/rst2html deleted file mode 100755 index b332e1c..0000000 --- a/doc/rst2html +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -PYTHONPATH="c:/src/docutils/docutils;c:/src/docutils/docutils/extras" -export PYTHONPATH -python c:/src/docutils/docutils/tools/rst2html.py -gs $1 `echo $1 | sed 's/\(.*\)\..*/\1.html/'` - - - diff --git a/doc/rst2latex b/doc/rst2latex deleted file mode 100755 index 3636587..0000000 --- a/doc/rst2latex +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -PYTHONPATH="c:/src/docutils/docutils;c:/src/docutils/docutils/extras" -export PYTHONPATH -python c:/src/docutils/docutils/tools/rst2latex.py --documentoptions pdftex --stylesheet=docutils.sty $1 `echo $1 | sed 's/\(.*\)\..*/\1.tex/'` diff --git a/doc/scanrst.py b/doc/scanrst.py deleted file mode 100644 index 484d879..0000000 --- a/doc/scanrst.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright David Abrahams 2004. Use, modification and distribution is -# subject to the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -# This script accepts a list of .rst files to be processed and -# generates Makefile dependencies for .html and .rst files to stdout. -import os,sys -import re - -include = re.compile(r' *\.\. +(include|image):: +(.*)', re.MULTILINE) - -def deps(path, found): - dir = os.path.split(path)[0] - for m in re.findall(include, open(path).read()): - - dependency = os.path.normpath(os.path.join(dir,m[1])) - if dependency not in found: - found[dependency] = 1 - - if m[0] == 'include': - deps(dependency, found) - - return found - -for file in sys.argv[1:]: - found = deps(file, {}) - if found: - base = os.path.splitext(os.path.basename(file))[0] - print '%s.tex %s.html: %s' % (base, base, ' '.join(found.keys())) diff --git a/doc/sources.py b/doc/sources.py deleted file mode 100644 index 5f954a5..0000000 --- a/doc/sources.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright David Abrahams 2004. Use, modification and distribution is -# subject to the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -sources = [ -'counting_iterator.rst', -'facade-and-adaptor.rst', -'filter_iterator.rst', -'function_output_iterator.rst', -'index.rst', -'indirect_iterator.rst', -'pointee.rst', -'iterator_adaptor.rst', -'iterator_facade.rst', -'new-iter-concepts.rst', -'permutation_iterator.rst', -'reverse_iterator.rst', -'transform_iterator.rst', -'zip_iterator.rst', -'iterator_archetypes.rst', -'iterator_concepts.rst', -'iterator_traits.rst' - ] - diff --git a/doc/syscmd.py b/doc/syscmd.py deleted file mode 100644 index e6a8dca..0000000 --- a/doc/syscmd.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright David Abrahams 2004. Use, modification and distribution is -# subject to the Boost Software License, Version 1.0. (See accompanying -# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -import os -import sys - -def syscmd(s): - print 'executing: ', repr(s) - sys.stdout.flush() - err = os.system(s) - if err: - raise SystemError, 'command: %s returned %s' % ( - repr(s), err) diff --git a/doc/transform_iterator.html b/doc/transform_iterator.html deleted file mode 100644 index b431111..0000000 --- a/doc/transform_iterator.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - -Transform Iterator - - - - - - - -
-

Transform Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Jeremy Siek, Thomas Witt
Contact:dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
Organization:Boost Consulting, Indiana University Open Systems -Lab, University of Hanover Institute for Transport -Railway Operation and Construction
Date:2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
- --- - - - -
abstract:The transform iterator adapts an iterator by modifying the -operator* to apply a function object to the result of -dereferencing the iterator and returning the result.
- -
-

transform_iterator synopsis

- -
-template <class UnaryFunction,
-          class Iterator, 
-          class Reference = use_default, 
-          class Value = use_default>
-class transform_iterator
-{
-public:
-  typedef /* see below */ value_type;
-  typedef /* see below */ reference;
-  typedef /* see below */ pointer;
-  typedef iterator_traits<Iterator>::difference_type difference_type;
-  typedef /* see below */ iterator_category;
-
-  transform_iterator();
-  transform_iterator(Iterator const& x, UnaryFunction f);
-
-  template<class F2, class I2, class R2, class V2>
-  transform_iterator(
-        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
-  );
-  UnaryFunction functor() const;
-  Iterator const& base() const;
-  reference operator*() const;
-  transform_iterator& operator++();
-  transform_iterator& operator--();
-private:
-  Iterator m_iterator; // exposition only
-  UnaryFunction m_f;   // exposition only
-};
-
-

If Reference is use_default then the reference member of -transform_iterator is -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type. -Otherwise, reference is Reference.

-

If Value is use_default then the value_type member is -remove_cv<remove_reference<reference> >::type. Otherwise, -value_type is Value.

-

If Iterator models Readable Lvalue Iterator and if Iterator -models Random Access Traversal Iterator, then iterator_category is -convertible to random_access_iterator_tag. Otherwise, if -Iterator models Bidirectional Traversal Iterator, then -iterator_category is convertible to -bidirectional_iterator_tag. Otherwise iterator_category is -convertible to forward_iterator_tag. If Iterator does not -model Readable Lvalue Iterator then iterator_category is -convertible to input_iterator_tag.

-
-
-

transform_iterator requirements

-

The type UnaryFunction must be Assignable, Copy Constructible, and -the expression f(*i) must be valid where f is an object of -type UnaryFunction, i is an object of type Iterator, and -where the type of f(*i) must be -result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type.

-

The argument Iterator shall model Readable Iterator.

-
-
-

transform_iterator models

-

The resulting transform_iterator models the most refined of the -following that is also modeled by Iterator.

-
-
    -
  • Writable Lvalue Iterator if transform_iterator::reference is a non-const reference.
  • -
  • Readable Lvalue Iterator if transform_iterator::reference is a const reference.
  • -
  • Readable Iterator otherwise.
  • -
-
-

The transform_iterator models the most refined standard traversal -concept that is modeled by the Iterator argument.

-

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.

- ---- - - - - - - - - - - - - - - - - - - - -
If Iterator modelsthen transform_iterator models
Single Pass IteratorInput Iterator
Forward Traversal IteratorForward Iterator
Bidirectional Traversal IteratorBidirectional Iterator
Random Access Traversal IteratorRandom Access Iterator
-

If transform_iterator models Writable Lvalue Iterator then it is a -mutable iterator (as defined in the old iterator requirements).

-

transform_iterator<F1, X, R1, V1> is interoperable with -transform_iterator<F2, Y, R2, V2> if and only if X is -interoperable with Y.

-
-
-

transform_iterator operations

-

In addition to the operations required by the concepts modeled by -transform_iterator, transform_iterator provides the following -operations.

-

transform_iterator();

- --- - - - -
Returns:An instance of transform_iterator with m_f -and m_iterator default constructed.
-

transform_iterator(Iterator const& x, UnaryFunction f);

- --- - - - -
Returns:An instance of transform_iterator with m_f -initialized to f and m_iterator initialized to x.
-
-template<class F2, class I2, class R2, class V2>
-transform_iterator(
-      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
-);
-
- --- - - - - - -
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.
-

UnaryFunction functor() const;

- --- - - - -
Returns:m_f
-

Iterator const& base() const;

- --- - - - -
Returns:m_iterator
-

reference operator*() const;

- --- - - - -
Returns:m_f(*m_iterator)
-

transform_iterator& operator++();

- --- - - - - - -
Effects:++m_iterator
Returns:*this
-

transform_iterator& operator--();

- --- - - - - - -
Effects:--m_iterator
Returns:*this
-
-template <class UnaryFunction, class Iterator>
-transform_iterator<UnaryFunction, Iterator>
-make_transform_iterator(Iterator it, UnaryFunction fun);
-
- --- - - - -
Returns:An instance of transform_iterator<UnaryFunction, Iterator> with m_f -initialized to f and m_iterator initialized to x.
-
-template <class UnaryFunction, class Iterator>
-transform_iterator<UnaryFunction, Iterator>
-make_transform_iterator(Iterator it);
-
- --- - - - -
Returns:An instance of transform_iterator<UnaryFunction, Iterator> with m_f -default constructed and m_iterator initialized to x.
-
-
-

Example

-

This is a simple example of using the transform_iterators class to -generate iterators that multiply (or add to) the value returned by -dereferencing the iterator. It would be cooler to use lambda library -in this example.

-
-int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
-const int N = sizeof(x)/sizeof(int);
-
-typedef boost::binder1st< std::multiplies<int> > Function;
-typedef boost::transform_iterator<Function, int*> doubling_iterator;
-
-doubling_iterator i(x, boost::bind1st(std::multiplies<int>(), 2)),
-  i_end(x + N, boost::bind1st(std::multiplies<int>(), 2));
-
-std::cout << "multiplying the array by 2:" << std::endl;
-while (i != i_end)
-  std::cout << *i++ << " ";
-std::cout << std::endl;
-
-std::cout << "adding 4 to each element in the array:" << std::endl;
-std::copy(boost::make_transform_iterator(x, boost::bind1st(std::plus<int>(), 4)),
-          boost::make_transform_iterator(x + N, boost::bind1st(std::plus<int>(), 4)),
-          std::ostream_iterator<int>(std::cout, " "));
-std::cout << std::endl;
-
-

The output is:

-
-multiplying the array by 2:
-2 4 6 8 10 12 14 16 
-adding 4 to each element in the array:
-5 6 7 8 9 10 11 12
-
-

The source code for this example can be found here.

-
-
- - - - diff --git a/doc/transform_iterator.pdf b/doc/transform_iterator.pdf deleted file mode 100755 index 5517e99..0000000 Binary files a/doc/transform_iterator.pdf and /dev/null differ diff --git a/doc/transform_iterator.rst b/doc/transform_iterator.rst deleted file mode 100644 index dff6dd9..0000000 --- a/doc/transform_iterator.rst +++ /dev/null @@ -1,28 +0,0 @@ -++++++++++++++++++++ - Transform Iterator -++++++++++++++++++++ - -:Author: David Abrahams, Jeremy Siek, Thomas Witt -:Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de -:organization: `Boost Consulting`_, Indiana University `Open Systems - Lab`_, University of Hanover `Institute for Transport - Railway Operation and Construction`_ -:date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Open Systems Lab`: http://www.osl.iu.edu -.. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de - -:abstract: - - .. include:: transform_iterator_abstract.rst - -.. contents:: Table of Contents - -``transform_iterator`` synopsis -............................... - -.. include:: transform_iterator_ref.rst -.. include:: make_transform_iterator.rst -.. include:: transform_iterator_eg.rst diff --git a/doc/transform_iterator_abstract.rst b/doc/transform_iterator_abstract.rst deleted file mode 100644 index 4d40536..0000000 --- a/doc/transform_iterator_abstract.rst +++ /dev/null @@ -1,3 +0,0 @@ -The transform iterator adapts an iterator by modifying the -``operator*`` to apply a function object to the result of -dereferencing the iterator and returning the result. diff --git a/doc/transform_iterator_eg.rst b/doc/transform_iterator_eg.rst deleted file mode 100755 index a6629ca..0000000 --- a/doc/transform_iterator_eg.rst +++ /dev/null @@ -1,42 +0,0 @@ -Example -....... - -This is a simple example of using the transform_iterators class to -generate iterators that multiply (or add to) the value returned by -dereferencing the iterator. It would be cooler to use lambda library -in this example. - -:: - - int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; - const int N = sizeof(x)/sizeof(int); - - typedef boost::binder1st< std::multiplies > Function; - typedef boost::transform_iterator doubling_iterator; - - doubling_iterator i(x, boost::bind1st(std::multiplies(), 2)), - i_end(x + N, boost::bind1st(std::multiplies(), 2)); - - std::cout << "multiplying the array by 2:" << std::endl; - while (i != i_end) - std::cout << *i++ << " "; - std::cout << std::endl; - - std::cout << "adding 4 to each element in the array:" << std::endl; - std::copy(boost::make_transform_iterator(x, boost::bind1st(std::plus(), 4)), - boost::make_transform_iterator(x + N, boost::bind1st(std::plus(), 4)), - std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - -The output is:: - - multiplying the array by 2: - 2 4 6 8 10 12 14 16 - adding 4 to each element in the array: - 5 6 7 8 9 10 11 12 - - -The source code for this example can be found `here`__. - -__ ../example/transform_iterator_example.cpp diff --git a/doc/transform_iterator_ref.diff b/doc/transform_iterator_ref.diff deleted file mode 100644 index 0f2d704..0000000 --- a/doc/transform_iterator_ref.diff +++ /dev/null @@ -1,202 +0,0 @@ -Index: transform_iterator_ref.rst -=================================================================== -RCS file: /cvsroot/boost/boost/libs/iterator/doc/transform_iterator_ref.rst,v -retrieving revision 1.3 -retrieving revision 1.15 -diff -w -d -u -b -r1.3 -r1.15 ---- transform_iterator_ref.rst 21 Sep 2003 11:13:46 -0000 1.3 -+++ transform_iterator_ref.rst 15 Jan 2004 00:06:57 -0000 1.15 -@@ -1,3 +1,5 @@ -+.. Version 1.3 of this document was accepted for TR1 -+ - :: - - template - class transform_iterator - -Issue 9.37x - -- : public iterator_adaptor - { -- friend class iterator_core_access; - public: -+ typedef /* see below */ value_type; -+ typedef /* see below */ reference; -+ typedef /* see below */ pointer; -+ typedef iterator_traits::difference_type difference_type; -+ typedef /* see below */ iterator_category; -+ - transform_iterator(); - transform_iterator(Iterator const& x, UnaryFunction f); - - -Issue 9.43x - -- template -+ template - transform_iterator( -- transform_iterator const& t -- , typename enable_if_convertible::type* = 0 // exposition -+ transform_iterator const& t -+ , typename enable_if_convertible::type* = 0 // exposition only -+ , typename enable_if_convertible::type* = 0 // exposition only - ); -- - -Issues 9.37x and 9.12 - -+ Iterator const& base() const; -+ reference operator*() const; -+ transform_iterator& operator++(); -+ transform_iterator& operator--(); - private: -- typename transform_iterator::value_type dereference() const; -- UnaryFunction m_f; -+ Iterator m_iterator; // exposition only -+ UnaryFunction m_f; // exposition only - }; - - -Issue 9.41x - -+If ``Reference`` is ``use_default`` then the ``reference`` member of -+``transform_iterator`` is -+``result_of::reference)>::type``. -+Otherwise, ``reference`` is ``Reference``. -+ -+If ``Value`` is ``use_default`` then the ``value_type`` member is -+``remove_cv >::type``. Otherwise, -+``value_type`` is ``Value``. -+ -+ - -Issue 9.37x - -+If ``Iterator`` models Readable Lvalue Iterator and if ``Iterator`` -+models Random Access Traversal Iterator, then ``iterator_category`` is -+convertible to ``random_access_iterator_tag``. Otherwise, if -+``Iterator`` models Bidirectional Traversal Iterator, then -+``iterator_category`` is convertible to -+``bidirectional_iterator_tag``. Otherwise ``iterator_category`` is -+convertible to ``forward_iterator_tag``. If ``Iterator`` does not -+model Readable Lvalue Iterator then ``iterator_category`` is -+convertible to ``input_iterator_tag``. -+ -+ - ``transform_iterator`` requirements - ................................... - -@@ -34,27 +65,55 @@ - where the type of ``f(*i)`` must be - ``result_of::reference)>::type``. - - -Issue 9.37x - --The type ``Iterator`` must at least model Readable Iterator. The --resulting ``transform_iterator`` models the most refined of the -+The argument ``Iterator`` shall model Readable Iterator. -+ -+ -+``transform_iterator`` models -+............................. -+ -+The resulting ``transform_iterator`` models the most refined of the - following options that is also modeled by ``Iterator``. - -- * Writable Lvalue Iterator if ``result_of::reference)>::type`` is a non-const reference. -+ * Writable Lvalue Iterator if ``transform_iterator::reference`` is a non-const reference. - -- * Readable Lvalue Iterator if ``result_of::reference)>::type`` is a const -- reference. -+ * Readable Lvalue Iterator if ``transform_iterator::reference`` is a const reference. - - * Readable Iterator otherwise. - -- - The ``transform_iterator`` models the most refined standard traversal --concept that is modeled by ``Iterator``. -+concept that is modeled by the ``Iterator`` argument. - -Issue 9.41x - --The ``reference`` type of ``transform_iterator`` is --``result_of::reference)>::type``. --The ``value_type`` is ``remove_cv >::type``. - -Issue 9.37x. - -+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. - --``transform_iterator`` public operations --........................................ -++-----------------------------------+---------------------------------+ -+| If ``Iterator`` models | then ``filter_iterator`` models | -++===================================+=================================+ -+| Single Pass Iterator | Input Iterator | -++-----------------------------------+---------------------------------+ -+| Forward Traversal Iterator | Forward Iterator | -++-----------------------------------+---------------------------------+ -+| Bidirectional Traversal Iterator | Bidirectional Iterator | -++-----------------------------------+---------------------------------+ -+| Random Access Traversal Iterator | Random Access Iterator | -++-----------------------------------+---------------------------------+ -+ -+If ``transform_iterator`` models Writable Lvalue Iterator then it is a -+mutable iterator (as defined in the old iterator requirements). -+ -+``transform_iterator`` is interoperable with -+``transform_iterator`` if and only if ``X`` is -+interoperable with ``Y``. -+ -+ -+ -+``transform_iterator`` operations -+................................. -+ -+In addition to the operations required by the concepts modeled by -+``transform_iterator``, ``transform_iterator`` provides the following -+operations. - - - ``transform_iterator();`` -@@ -80,14 +139,30 @@ - :Returns: An instance of ``transform_iterator`` that is a copy of ``t``. - :Requires: ``OtherIterator`` is implicitly convertible to ``Iterator``. - -+ -+``Iterator const& base() const;`` -+ -+:Returns: ``m_iterator`` -+ -+ - ``UnaryFunction functor() const;`` - - :Returns: ``m_f`` - --``transform_iterator`` private operations --......................................... - --``typename transform_iterator::value_type dereference() const;`` -+``reference operator*() const;`` - --:Returns: ``m_f(transform_iterator::dereference());`` -+:Returns: ``m_f(*m_iterator)`` -+ -+ -+``transform_iterator& operator++();`` -+ -+:Effects: ``++m_iterator`` -+:Returns: ``*this`` -+ -+ -+``transform_iterator& operator--();`` -+ -+:Effects: ``--m_iterator`` -+:Returns: ``*this`` - diff --git a/doc/transform_iterator_ref.rst b/doc/transform_iterator_ref.rst deleted file mode 100644 index 58f6f26..0000000 --- a/doc/transform_iterator_ref.rst +++ /dev/null @@ -1,171 +0,0 @@ -.. Version 1.3 of this document was accepted for TR1 - -:: - - template - class transform_iterator - { - public: - typedef /* see below */ value_type; - typedef /* see below */ reference; - typedef /* see below */ pointer; - typedef iterator_traits::difference_type difference_type; - typedef /* see below */ iterator_category; - - transform_iterator(); - transform_iterator(Iterator const& x, UnaryFunction f); - - template - transform_iterator( - transform_iterator const& t - , typename enable_if_convertible::type* = 0 // exposition only - , typename enable_if_convertible::type* = 0 // exposition only - ); - UnaryFunction functor() const; - Iterator const& base() const; - reference operator*() const; - transform_iterator& operator++(); - transform_iterator& operator--(); - private: - Iterator m_iterator; // exposition only - UnaryFunction m_f; // exposition only - }; - - -If ``Reference`` is ``use_default`` then the ``reference`` member of -``transform_iterator`` is -``result_of::reference)>::type``. -Otherwise, ``reference`` is ``Reference``. - -If ``Value`` is ``use_default`` then the ``value_type`` member is -``remove_cv >::type``. Otherwise, -``value_type`` is ``Value``. - - -If ``Iterator`` models Readable Lvalue Iterator and if ``Iterator`` -models Random Access Traversal Iterator, then ``iterator_category`` is -convertible to ``random_access_iterator_tag``. Otherwise, if -``Iterator`` models Bidirectional Traversal Iterator, then -``iterator_category`` is convertible to -``bidirectional_iterator_tag``. Otherwise ``iterator_category`` is -convertible to ``forward_iterator_tag``. If ``Iterator`` does not -model Readable Lvalue Iterator then ``iterator_category`` is -convertible to ``input_iterator_tag``. - - -``transform_iterator`` requirements -................................... - -The type ``UnaryFunction`` must be Assignable, Copy Constructible, and -the expression ``f(*i)`` must be valid where ``f`` is an object of -type ``UnaryFunction``, ``i`` is an object of type ``Iterator``, and -where the type of ``f(*i)`` must be -``result_of::reference)>::type``. - -The argument ``Iterator`` shall model Readable Iterator. - - -``transform_iterator`` models -............................. - -The resulting ``transform_iterator`` models the most refined of the -following that is also modeled by ``Iterator``. - - * Writable Lvalue Iterator if ``transform_iterator::reference`` is a non-const reference. - - * Readable Lvalue Iterator if ``transform_iterator::reference`` is a const reference. - - * Readable Iterator otherwise. - -The ``transform_iterator`` models the most refined standard traversal -concept that is modeled by the ``Iterator`` argument. - -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. - -+-----------------------------------+---------------------------------------+ -| If ``Iterator`` models | then ``transform_iterator`` models | -+===================================+=======================================+ -| Single Pass Iterator | Input Iterator | -+-----------------------------------+---------------------------------------+ -| Forward Traversal Iterator | Forward Iterator | -+-----------------------------------+---------------------------------------+ -| Bidirectional Traversal Iterator | Bidirectional Iterator | -+-----------------------------------+---------------------------------------+ -| Random Access Traversal Iterator | Random Access Iterator | -+-----------------------------------+---------------------------------------+ - -If ``transform_iterator`` models Writable Lvalue Iterator then it is a -mutable iterator (as defined in the old iterator requirements). - -``transform_iterator`` is interoperable with -``transform_iterator`` if and only if ``X`` is -interoperable with ``Y``. - - - -``transform_iterator`` operations -................................. - -In addition to the operations required by the concepts modeled by -``transform_iterator``, ``transform_iterator`` provides the following -operations. - - -``transform_iterator();`` - -:Returns: An instance of ``transform_iterator`` with ``m_f`` - and ``m_iterator`` default constructed. - - -``transform_iterator(Iterator const& x, UnaryFunction f);`` - -:Returns: An instance of ``transform_iterator`` with ``m_f`` - initialized to ``f`` and ``m_iterator`` initialized to ``x``. - - -:: - - template - transform_iterator( - transform_iterator const& t - , typename enable_if_convertible::type* = 0 // exposition only - , typename enable_if_convertible::type* = 0 // exposition only - ); - -: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``. - - -``UnaryFunction functor() const;`` - -:Returns: ``m_f`` - - -``Iterator const& base() const;`` - -:Returns: ``m_iterator`` - - -``reference operator*() const;`` - -:Returns: ``m_f(*m_iterator)`` - - -``transform_iterator& operator++();`` - -:Effects: ``++m_iterator`` -:Returns: ``*this`` - - -``transform_iterator& operator--();`` - -:Effects: ``--m_iterator`` -:Returns: ``*this`` - diff --git a/doc/traversal.png b/doc/traversal.png deleted file mode 100644 index a9bbe98..0000000 Binary files a/doc/traversal.png and /dev/null differ diff --git a/doc/zip_iterator.html b/doc/zip_iterator.html deleted file mode 100755 index 3021ed4..0000000 --- a/doc/zip_iterator.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - -Zip Iterator - - - - - - - -
-

Zip Iterator

- --- - - - - - - - - - - - -
Author:David Abrahams, Thomas Becker
Contact:dave@boost-consulting.com, thomas@styleadvisor.com
Organization:Boost Consulting, Zephyr Associates, Inc.
Date:2004-11-01
Copyright:Copyright David Abrahams and Thomas Becker 2003.
- --- - - - -
abstract:The zip iterator provides the ability to parallel-iterate -over several controlled sequences simultaneously. A zip -iterator is constructed from a tuple of iterators. Moving -the zip iterator moves all the iterators in parallel. -Dereferencing the zip iterator returns a tuple that contains -the results of dereferencing the individual iterators.
- -
-

zip_iterator synopsis

-
-template<typename IteratorTuple>
-class zip_iterator
-{  
-
-public:
-  typedef /* see below */ reference;
-  typedef reference value_type;
-  typedef value_type* pointer;
-  typedef /* see below */ difference_type;
-  typedef /* see below */ iterator_category;
-
-  zip_iterator();
-  zip_iterator(IteratorTuple iterator_tuple);
-
-  template<typename OtherIteratorTuple>
-  zip_iterator(
-        const zip_iterator<OtherIteratorTuple>& other
-      , typename enable_if_convertible<
-              OtherIteratorTuple
-            , IteratorTuple>::type* = 0     // exposition only
-  );
-
-  const IteratorTuple& get_iterator_tuple() const;
-
-private:
-  IteratorTuple m_iterator_tuple;     // exposition only
-};
-
-template<typename IteratorTuple> 
-zip_iterator<IteratorTuple> 
-make_zip_iterator(IteratorTuple t);
-
-

The reference member of zip_iterator is the type of the tuple -made of the reference types of the iterator types in the IteratorTuple -argument.

-

The difference_type member of zip_iterator is the difference_type -of the first of the iterator types in the IteratorTuple argument.

-

The iterator_category member of zip_iterator is convertible to the -minimum of the traversal categories of the iterator types in the IteratorTuple -argument. For example, if the zip_iterator holds only vector -iterators, then iterator_category is convertible to -boost::random_access_traversal_tag. If you add a list iterator, then -iterator_category will be convertible to boost::bidirectional_traversal_tag, -but no longer to boost::random_access_traversal_tag.

-
-
-

zip_iterator requirements

-

All iterator types in the argument IteratorTuple shall model Readable Iterator.

-
-
-

zip_iterator models

-

The resulting zip_iterator models Readable Iterator.

-

The fact that the zip_iterator models only Readable Iterator does not -prevent you from modifying the values that the individual iterators point -to. The tuple returned by the zip_iterator's operator* is a tuple -constructed from the reference types of the individual iterators, not -their value types. For example, if zip_it is a zip_iterator whose -first member iterator is an std::vector<double>::iterator, then the -following line will modify the value which the first member iterator of -zip_it currently points to:

-
-zip_it->get<0>() = 42.0;
-
-

Consider the set of standard traversal concepts obtained by taking -the most refined standard traversal concept modeled by each individual -iterator type in the IteratorTuple argument.The zip_iterator -models the least refined standard traversal concept in this set.

-

zip_iterator<IteratorTuple1> is interoperable with -zip_iterator<IteratorTuple2> if and only if IteratorTuple1 -is interoperable with IteratorTuple2.

-
-
-

zip_iterator operations

-

In addition to the operations required by the concepts modeled by -zip_iterator, zip_iterator provides the following -operations.

-

zip_iterator();

- --- - - - -
Returns:An instance of zip_iterator with m_iterator_tuple -default constructed.
-

zip_iterator(IteratorTuple iterator_tuple);

- --- - - - -
Returns:An instance of zip_iterator with m_iterator_tuple -initialized to iterator_tuple.
-
-template<typename OtherIteratorTuple>
-zip_iterator(
-      const zip_iterator<OtherIteratorTuple>& other
-    , typename enable_if_convertible<
-            OtherIteratorTuple
-          , IteratorTuple>::type* = 0     // exposition only
-);
-
- --- - - - - - -
Returns:An instance of zip_iterator that is a copy of other.
Requires:OtherIteratorTuple is implicitly convertible to IteratorTuple.
-

const IteratorTuple& get_iterator_tuple() const;

- --- - - - -
Returns:m_iterator_tuple
-

reference operator*() const;

- --- - - - -
Returns:A tuple consisting of the results of dereferencing all iterators in -m_iterator_tuple.
-

zip_iterator& operator++();

- --- - - - - - -
Effects:Increments each iterator in m_iterator_tuple.
Returns:*this
-

zip_iterator& operator--();

- --- - - - - - -
Effects:Decrements each iterator in m_iterator_tuple.
Returns:*this
-
-template<typename IteratorTuple> 
-zip_iterator<IteratorTuple> 
-make_zip_iterator(IteratorTuple t);
-
- --- - - - -
Returns:An instance of zip_iterator<IteratorTuple> with m_iterator_tuple -initialized to t.
-
-template<typename IteratorTuple> 
-zip_iterator<IteratorTuple> 
-make_zip_iterator(IteratorTuple t);
-
- --- - - - -
Returns:An instance of zip_iterator<IteratorTuple> with m_iterator_tuple -initialized to t.
-
-
-

Examples

-

There are two main types of applications of the zip_iterator. The first -one concerns runtime efficiency: If one has several controlled sequences -of the same length that must be somehow processed, e.g., with the -for_each algorithm, then it is more efficient to perform just -one parallel-iteration rather than several individual iterations. For an -example, assume that vect_of_doubles and vect_of_ints -are two vectors of equal length containing doubles and ints, respectively, -and consider the following two iterations:

-
-std::vector<double>::const_iterator beg1 = vect_of_doubles.begin();
-std::vector<double>::const_iterator end1 = vect_of_doubles.end();
-std::vector<int>::const_iterator beg2 = vect_of_ints.begin();
-std::vector<int>::const_iterator end2 = vect_of_ints.end();
-
-std::for_each(beg1, end1, func_0());
-std::for_each(beg2, end2, func_1());
-
-

These two iterations can now be replaced with a single one as follows:

-
-std::for_each(
-  boost::make_zip_iterator(
-    boost::make_tuple(beg1, beg2)
-    ),
-  boost::make_zip_iterator(
-    boost::make_tuple(end1, end2)
-    ),
-  zip_func()
-  );
-
-

A non-generic implementation of zip_func could look as follows:

-
-struct zip_func : 
-  public std::unary_function<const boost::tuple<const double&, const int&>&, void>
-{
-  void operator()(const boost::tuple<const double&, const int&>& t) const
-  {
-    m_f0(t.get<0>());
-    m_f1(t.get<1>());
-  }
-
-private:
-  func_0 m_f0;
-  func_1 m_f1;
-};
-
-

The second important application of the zip_iterator is as a building block -to make combining iterators. A combining iterator is an iterator -that parallel-iterates over several controlled sequences and, upon -dereferencing, returns the result of applying a functor to the values of the -sequences at the respective positions. This can now be achieved by using the -zip_iterator in conjunction with the transform_iterator.

-

Suppose, for example, that you have two vectors of doubles, say -vect_1 and vect_2, and you need to expose to a client -a controlled sequence containing the products of the elements of -vect_1 and vect_2. Rather than placing these products -in a third vector, you can use a combining iterator that calculates the -products on the fly. Let us assume that tuple_multiplies is a -functor that works like std::multiplies, except that it takes -its two arguments packaged in a tuple. Then the two iterators -it_begin and it_end defined below delimit a controlled -sequence containing the products of the elements of vect_1 and -vect_2:

-
-typedef boost::tuple<
-  std::vector<double>::const_iterator,
-  std::vector<double>::const_iterator
-  > the_iterator_tuple;
-
-typedef boost::zip_iterator<
-  the_iterator_tuple
-  > the_zip_iterator;
-
-typedef boost::transform_iterator<
-  tuple_multiplies<double>,
-  the_zip_iterator
-  > the_transform_iterator;
-
-the_transform_iterator it_begin(
-  the_zip_iterator(
-    the_iterator_tuple(
-      vect_1.begin(),
-      vect_2.begin()
-      )
-    ),
-  tuple_multiplies<double>()
-  );
-
-the_transform_iterator it_end(
-  the_zip_iterator(
-    the_iterator_tuple(
-      vect_1.end(),
-      vect_2.end()
-      )
-    ),
-  tuple_multiplies<double>()
-  );
-
-
-
- - - - diff --git a/doc/zip_iterator.pdf b/doc/zip_iterator.pdf deleted file mode 100755 index 81374a6..0000000 Binary files a/doc/zip_iterator.pdf and /dev/null differ diff --git a/doc/zip_iterator.rst b/doc/zip_iterator.rst deleted file mode 100755 index a853237..0000000 --- a/doc/zip_iterator.rst +++ /dev/null @@ -1,25 +0,0 @@ -+++++++++++++ - Zip Iterator -+++++++++++++ - -:Author: David Abrahams, Thomas Becker -:Contact: dave@boost-consulting.com, thomas@styleadvisor.com -:organization: `Boost Consulting`_, `Zephyr Associates, Inc.`_ -:date: $Date$ -:copyright: Copyright David Abrahams and Thomas Becker 2003. - -.. _`Boost Consulting`: http://www.boost-consulting.com -.. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com - -:abstract: - - .. include:: zip_iterator_abstract.rst - -.. contents:: Table of Contents - -``zip_iterator`` synopsis -............................... - -.. include:: zip_iterator_ref.rst -.. include:: make_zip_iterator.rst -.. include:: zip_iterator_eg.rst diff --git a/doc/zip_iterator_abstract.rst b/doc/zip_iterator_abstract.rst deleted file mode 100755 index 0d1cf11..0000000 --- a/doc/zip_iterator_abstract.rst +++ /dev/null @@ -1,6 +0,0 @@ -The zip iterator provides the ability to parallel-iterate -over several controlled sequences simultaneously. A zip -iterator is constructed from a tuple of iterators. Moving -the zip iterator moves all the iterators in parallel. -Dereferencing the zip iterator returns a tuple that contains -the results of dereferencing the individual iterators. diff --git a/doc/zip_iterator_eg.rst b/doc/zip_iterator_eg.rst deleted file mode 100755 index 9016708..0000000 --- a/doc/zip_iterator_eg.rst +++ /dev/null @@ -1,112 +0,0 @@ -Examples -........ - -There are two main types of applications of the ``zip_iterator``. The first -one concerns runtime efficiency: If one has several controlled sequences -of the same length that must be somehow processed, e.g., with the -``for_each`` algorithm, then it is more efficient to perform just -one parallel-iteration rather than several individual iterations. For an -example, assume that ``vect_of_doubles`` and ``vect_of_ints`` -are two vectors of equal length containing doubles and ints, respectively, -and consider the following two iterations: - -:: - - - std::vector::const_iterator beg1 = vect_of_doubles.begin(); - std::vector::const_iterator end1 = vect_of_doubles.end(); - std::vector::const_iterator beg2 = vect_of_ints.begin(); - std::vector::const_iterator end2 = vect_of_ints.end(); - - std::for_each(beg1, end1, func_0()); - std::for_each(beg2, end2, func_1()); - -These two iterations can now be replaced with a single one as follows: - -:: - - - std::for_each( - boost::make_zip_iterator( - boost::make_tuple(beg1, beg2) - ), - boost::make_zip_iterator( - boost::make_tuple(end1, end2) - ), - zip_func() - ); - -A non-generic implementation of ``zip_func`` could look as follows: - -:: - - - struct zip_func : - public std::unary_function&, void> - { - void operator()(const boost::tuple& t) const - { - m_f0(t.get<0>()); - m_f1(t.get<1>()); - } - - private: - func_0 m_f0; - func_1 m_f1; - }; - -The second important application of the ``zip_iterator`` is as a building block -to make combining iterators. A combining iterator is an iterator -that parallel-iterates over several controlled sequences and, upon -dereferencing, returns the result of applying a functor to the values of the -sequences at the respective positions. This can now be achieved by using the -``zip_iterator`` in conjunction with the ``transform_iterator``. - -Suppose, for example, that you have two vectors of doubles, say -``vect_1`` and ``vect_2``, and you need to expose to a client -a controlled sequence containing the products of the elements of -``vect_1`` and ``vect_2``. Rather than placing these products -in a third vector, you can use a combining iterator that calculates the -products on the fly. Let us assume that ``tuple_multiplies`` is a -functor that works like ``std::multiplies``, except that it takes -its two arguments packaged in a tuple. Then the two iterators -``it_begin`` and ``it_end`` defined below delimit a controlled -sequence containing the products of the elements of ``vect_1`` and -``vect_2``: - -:: - - - typedef boost::tuple< - std::vector::const_iterator, - std::vector::const_iterator - > the_iterator_tuple; - - typedef boost::zip_iterator< - the_iterator_tuple - > the_zip_iterator; - - typedef boost::transform_iterator< - tuple_multiplies, - the_zip_iterator - > the_transform_iterator; - - the_transform_iterator it_begin( - the_zip_iterator( - the_iterator_tuple( - vect_1.begin(), - vect_2.begin() - ) - ), - tuple_multiplies() - ); - - the_transform_iterator it_end( - the_zip_iterator( - the_iterator_tuple( - vect_1.end(), - vect_2.end() - ) - ), - tuple_multiplies() - ); diff --git a/doc/zip_iterator_ref.rst b/doc/zip_iterator_ref.rst deleted file mode 100755 index 340fdc8..0000000 --- a/doc/zip_iterator_ref.rst +++ /dev/null @@ -1,152 +0,0 @@ - -:: - - template - class zip_iterator - { - - public: - typedef /* see below */ reference; - typedef reference value_type; - typedef value_type* pointer; - typedef /* see below */ difference_type; - typedef /* see below */ iterator_category; - - zip_iterator(); - zip_iterator(IteratorTuple iterator_tuple); - - template - zip_iterator( - const zip_iterator& other - , typename enable_if_convertible< - OtherIteratorTuple - , IteratorTuple>::type* = 0 // exposition only - ); - - const IteratorTuple& get_iterator_tuple() const; - - private: - IteratorTuple m_iterator_tuple; // exposition only - }; - - template - zip_iterator - make_zip_iterator(IteratorTuple t); - - -The ``reference`` member of ``zip_iterator`` is the type of the tuple -made of the reference types of the iterator types in the ``IteratorTuple`` -argument. - -The ``difference_type`` member of ``zip_iterator`` is the ``difference_type`` -of the first of the iterator types in the ``IteratorTuple`` argument. - -The ``iterator_category`` member of ``zip_iterator`` is convertible to the -minimum of the traversal categories of the iterator types in the ``IteratorTuple`` -argument. For example, if the ``zip_iterator`` holds only vector -iterators, then ``iterator_category`` is convertible to -``boost::random_access_traversal_tag``. If you add a list iterator, then -``iterator_category`` will be convertible to ``boost::bidirectional_traversal_tag``, -but no longer to ``boost::random_access_traversal_tag``. - - -``zip_iterator`` requirements -................................... - -All iterator types in the argument ``IteratorTuple`` shall model Readable Iterator. - - -``zip_iterator`` models -............................. - -The resulting ``zip_iterator`` models Readable Iterator. - -The fact that the ``zip_iterator`` models only Readable Iterator does not -prevent you from modifying the values that the individual iterators point -to. The tuple returned by the ``zip_iterator``'s ``operator*`` is a tuple -constructed from the reference types of the individual iterators, not -their value types. For example, if ``zip_it`` is a ``zip_iterator`` whose -first member iterator is an ``std::vector::iterator``, then the -following line will modify the value which the first member iterator of -``zip_it`` currently points to: - -:: - - zip_it->get<0>() = 42.0; - - -Consider the set of standard traversal concepts obtained by taking -the most refined standard traversal concept modeled by each individual -iterator type in the ``IteratorTuple`` argument.The ``zip_iterator`` -models the least refined standard traversal concept in this set. - -``zip_iterator`` is interoperable with -``zip_iterator`` if and only if ``IteratorTuple1`` -is interoperable with ``IteratorTuple2``. - - - -``zip_iterator`` operations -................................. - -In addition to the operations required by the concepts modeled by -``zip_iterator``, ``zip_iterator`` provides the following -operations. - - -``zip_iterator();`` - -:Returns: An instance of ``zip_iterator`` with ``m_iterator_tuple`` - default constructed. - - -``zip_iterator(IteratorTuple iterator_tuple);`` - -:Returns: An instance of ``zip_iterator`` with ``m_iterator_tuple`` - initialized to ``iterator_tuple``. - - -:: - - template - zip_iterator( - const zip_iterator& other - , typename enable_if_convertible< - OtherIteratorTuple - , IteratorTuple>::type* = 0 // exposition only - ); - -:Returns: An instance of ``zip_iterator`` that is a copy of ``other``. -:Requires: ``OtherIteratorTuple`` is implicitly convertible to ``IteratorTuple``. - - -``const IteratorTuple& get_iterator_tuple() const;`` - -:Returns: ``m_iterator_tuple`` - - -``reference operator*() const;`` - -:Returns: A tuple consisting of the results of dereferencing all iterators in - ``m_iterator_tuple``. - - -``zip_iterator& operator++();`` - -:Effects: Increments each iterator in ``m_iterator_tuple``. -:Returns: ``*this`` - - -``zip_iterator& operator--();`` - -:Effects: Decrements each iterator in ``m_iterator_tuple``. -:Returns: ``*this`` - -:: - - template - zip_iterator - make_zip_iterator(IteratorTuple t); - -:Returns: An instance of ``zip_iterator`` with ``m_iterator_tuple`` - initialized to ``t``. diff --git a/example/Jamfile b/example/Jamfile deleted file mode 100644 index 71301a5..0000000 --- a/example/Jamfile +++ /dev/null @@ -1,20 +0,0 @@ -subproject libs/iterator/example ; - -import testing ; - -# Make tests run by default. -DEPENDS all : test ; - -test-suite iterator_examples - : [ run reverse_iterator.cpp ] - [ run node_iterator1.cpp ] - [ run node_iterator2.cpp ] - [ run node_iterator3.cpp ] - [ run counting_iterator_example.cpp ] - [ run filter_iterator_example.cpp ] - [ run func_output_iter_example.cpp ] - [ run indirect_iterator_example.cpp ] - [ run permutation_iter_example.cpp ] - [ run reverse_iterator_example.cpp ] - [ run transform_iterator_example.cpp ] - ; diff --git a/example/counting_iterator_example.cpp b/example/counting_iterator_example.cpp deleted file mode 100644 index c7d8add..0000000 --- a/example/counting_iterator_example.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// (C) Copyright Jeremy Siek 2000-2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int, char*[]) -{ - // Example of using counting_iterator - std::cout << "counting from 0 to 4:" << std::endl; - boost::counting_iterator first(0), last(4); - std::copy(first, last, std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - // Example of using counting iterator to create an array of pointers. - int N = 7; - std::vector numbers; - typedef std::vector::iterator n_iter; - // Fill "numbers" array with [0,N) - std::copy( - boost::counting_iterator(0) - , boost::counting_iterator(N) - , std::back_inserter(numbers)); - - std::vector::iterator> pointers; - - // Use counting iterator to fill in the array of pointers. - // causes an ICE with MSVC6 - std::copy(boost::make_counting_iterator(numbers.begin()), - boost::make_counting_iterator(numbers.end()), - std::back_inserter(pointers)); - - // Use indirect iterator to print out numbers by accessing - // them through the array of pointers. - std::cout << "indirectly printing out the numbers from 0 to " - << N << std::endl; - std::copy(boost::make_indirect_iterator(pointers.begin()), - boost::make_indirect_iterator(pointers.end()), - std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - return boost::exit_success; -} diff --git a/example/filter_iterator_example.cpp b/example/filter_iterator_example.cpp deleted file mode 100644 index 8880c8d..0000000 --- a/example/filter_iterator_example.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// (C) Copyright Jeremy Siek 1999-2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include // for exit_success - -struct is_positive_number { - bool operator()(int x) { return 0 < x; } -}; - -int main() -{ - int numbers_[] = { 0, -1, 4, -3, 5, 8, -2 }; - const int N = sizeof(numbers_)/sizeof(int); - - typedef int* base_iterator; - base_iterator numbers(numbers_); - - // Example using make_filter_iterator() - std::copy(boost::make_filter_iterator(numbers, numbers + N), - boost::make_filter_iterator(numbers + N, numbers + N), - std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - // Example using filter_iterator - typedef boost::filter_iterator - FilterIter; - - is_positive_number predicate; - FilterIter filter_iter_first(predicate, numbers, numbers + N); - FilterIter filter_iter_last(predicate, numbers + N, numbers + N); - - std::copy(filter_iter_first, filter_iter_last, std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - // Another example using make_filter_iterator() - std::copy( - boost::make_filter_iterator( - std::bind2nd(std::greater(), -2) - , numbers, numbers + N) - - , boost::make_filter_iterator( - std::bind2nd(std::greater(), -2) - , numbers + N, numbers + N) - - , std::ostream_iterator(std::cout, " ") - ); - - std::cout << std::endl; - - return boost::exit_success; -} diff --git a/example/func_output_iter_example.cpp b/example/func_output_iter_example.cpp deleted file mode 100644 index 9c06319..0000000 --- a/example/func_output_iter_example.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// (C) Copyright Jeremy Siek 2001-2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Revision History: - -// 27 Feb 2001 Jeremy Siek -// Initial checkin. - -#include -#include -#include - -#include - -struct string_appender -{ - string_appender(std::string& s) - : m_str(&s) - {} - - void operator()(const std::string& x) const - { - *m_str += x; - } - - std::string* m_str; -}; - -int main(int, char*[]) -{ - std::vector x; - x.push_back("hello"); - x.push_back(" "); - x.push_back("world"); - x.push_back("!"); - - std::string s = ""; - std::copy(x.begin(), x.end(), - boost::make_function_output_iterator(string_appender(s))); - - std::cout << s << std::endl; - - return 0; -} diff --git a/example/indirect_iterator_example.cpp b/example/indirect_iterator_example.cpp deleted file mode 100644 index abbf46c..0000000 --- a/example/indirect_iterator_example.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// (C) Copyright Jeremy Siek 2000-2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include -#include - -int main(int, char*[]) -{ - char characters[] = "abcdefg"; - const int N = sizeof(characters)/sizeof(char) - 1; // -1 since characters has a null char - char* pointers_to_chars[N]; // at the end. - for (int i = 0; i < N; ++i) - pointers_to_chars[i] = &characters[i]; - - // Example of using indirect_iterator - - boost::indirect_iterator - indirect_first(pointers_to_chars), indirect_last(pointers_to_chars + N); - - std::copy(indirect_first, indirect_last, std::ostream_iterator(std::cout, ",")); - std::cout << std::endl; - - - // Example of making mutable and constant indirect iterators - - char mutable_characters[N]; - char* pointers_to_mutable_chars[N]; - for (int j = 0; j < N; ++j) - pointers_to_mutable_chars[j] = &mutable_characters[j]; - - boost::indirect_iterator mutable_indirect_first(pointers_to_mutable_chars), - mutable_indirect_last(pointers_to_mutable_chars + N); - boost::indirect_iterator const_indirect_first(pointers_to_chars), - const_indirect_last(pointers_to_chars + N); - - std::transform(const_indirect_first, const_indirect_last, - mutable_indirect_first, std::bind1st(std::plus(), 1)); - - std::copy(mutable_indirect_first, mutable_indirect_last, - std::ostream_iterator(std::cout, ",")); - std::cout << std::endl; - - - // Example of using make_indirect_iterator() - - std::copy(boost::make_indirect_iterator(pointers_to_chars), - boost::make_indirect_iterator(pointers_to_chars + N), - std::ostream_iterator(std::cout, ",")); - std::cout << std::endl; - - return 0; -} diff --git a/example/node.hpp b/example/node.hpp deleted file mode 100755 index c3ed315..0000000 --- a/example/node.hpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef NODE_DWA2004110_HPP -# define NODE_DWA2004110_HPP - -# include - -// Polymorphic list node base class - -struct node_base -{ - node_base() : m_next(0) {} - - virtual ~node_base() - { - delete m_next; - } - - node_base* next() const - { - return m_next; - } - - virtual void print(std::ostream& s) const = 0; - virtual void double_me() = 0; - - void append(node_base* p) - { - if (m_next) - m_next->append(p); - else - m_next = p; - } - - private: - node_base* m_next; -}; - -inline std::ostream& operator<<(std::ostream& s, node_base const& n) -{ - n.print(s); - return s; -} - -template -struct node : node_base -{ - node(T x) - : m_value(x) - {} - - void print(std::ostream& s) const { s << this->m_value; } - void double_me() { m_value += m_value; } - - private: - T m_value; -}; - -#endif // NODE_DWA2004110_HPP diff --git a/example/node_iterator1.cpp b/example/node_iterator1.cpp deleted file mode 100755 index 6411b03..0000000 --- a/example/node_iterator1.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include "node_iterator1.hpp" -#include -#include -#include -#include -#include - -int main() -{ - std::auto_ptr > nodes(new node(42)); - nodes->append(new node(" is greater than ")); - nodes->append(new node(13)); - - std::copy( - node_iterator(nodes.get()), node_iterator() - , std::ostream_iterator(std::cout, " ") - ); - std::cout << std::endl; - - std::for_each( - node_iterator(nodes.get()), node_iterator() - , std::mem_fun_ref(&node_base::double_me) - ); - - std::copy( - node_iterator(nodes.get()), node_iterator() - , std::ostream_iterator(std::cout, "/") - ); - std::cout << std::endl; -} diff --git a/example/node_iterator1.hpp b/example/node_iterator1.hpp deleted file mode 100755 index 5e068b4..0000000 --- a/example/node_iterator1.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef NODE_ITERATOR1_DWA2004110_HPP -# define NODE_ITERATOR1_DWA2004110_HPP - -# include "node.hpp" -# include - -class node_iterator - : public boost::iterator_facade< - node_iterator - , node_base - , boost::forward_traversal_tag - > -{ - public: - node_iterator() - : m_node(0) - {} - - explicit node_iterator(node_base* p) - : m_node(p) - {} - - private: - friend class boost::iterator_core_access; - - void increment() - { m_node = m_node->next(); } - - bool equal(node_iterator const& other) const - { return this->m_node == other.m_node; } - - node_base& dereference() const - { return *m_node; } - - node_base* m_node; -}; - - -#endif // NODE_ITERATOR1_DWA2004110_HPP diff --git a/example/node_iterator2.cpp b/example/node_iterator2.cpp deleted file mode 100755 index 62211b2..0000000 --- a/example/node_iterator2.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include "node_iterator2.hpp" -#include -#include -#include -#include -#include -#include - -int main() -{ - std::auto_ptr > nodes(new node(42)); - nodes->append(new node(" is greater than ")); - nodes->append(new node(13)); - - // Check interoperability - assert(node_iterator(nodes.get()) == node_const_iterator(nodes.get())); - assert(node_const_iterator(nodes.get()) == node_iterator(nodes.get())); - - assert(node_iterator(nodes.get()) != node_const_iterator()); - assert(node_const_iterator(nodes.get()) != node_iterator()); - - std::copy( - node_iterator(nodes.get()), node_iterator() - , std::ostream_iterator(std::cout, " ") - ); - std::cout << std::endl; - - std::for_each( - node_iterator(nodes.get()), node_iterator() - , boost::mem_fn(&node_base::double_me) - ); - - std::copy( - node_const_iterator(nodes.get()), node_const_iterator() - , std::ostream_iterator(std::cout, "/") - ); - std::cout << std::endl; - return 0; -} diff --git a/example/node_iterator2.hpp b/example/node_iterator2.hpp deleted file mode 100755 index 6aa0a4c..0000000 --- a/example/node_iterator2.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef NODE_ITERATOR2_DWA2004110_HPP -# define NODE_ITERATOR2_DWA2004110_HPP - -# include "node.hpp" -# include - -# ifndef BOOST_NO_SFINAE -# include -# include -# endif - -template -class node_iter - : public boost::iterator_facade< - node_iter - , Value - , boost::forward_traversal_tag - > -{ - private: - struct enabler {}; // a private type avoids misuse - - public: - node_iter() - : m_node(0) {} - - explicit node_iter(Value* p) - : m_node(p) {} - - template - node_iter( - node_iter const& other -# ifndef BOOST_NO_SFINAE - , typename boost::enable_if< - boost::is_convertible - , enabler - >::type = enabler() -# endif - ) - : m_node(other.m_node) {} - - -# if !BOOST_WORKAROUND(__GNUC__, == 2) - private: // GCC2 can't grant friendship to template member functions - friend class boost::iterator_core_access; -# endif - - template - bool equal(node_iter const& other) const - { - return this->m_node == other.m_node; - } - - void increment() { m_node = m_node->next(); } - - Value& dereference() const { return *m_node; } - -# ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS - public: -# else - private: - template friend class node_iter; -# endif - Value* m_node; -}; - -typedef node_iter node_iterator; -typedef node_iter node_const_iterator; - -#endif // NODE_ITERATOR2_DWA2004110_HPP diff --git a/example/node_iterator3.cpp b/example/node_iterator3.cpp deleted file mode 100755 index 331cc93..0000000 --- a/example/node_iterator3.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include "node_iterator3.hpp" -#include -#include -#include -#include -#include -#include - -int main() -{ - std::auto_ptr > nodes(new node(42)); - nodes->append(new node(" is greater than ")); - nodes->append(new node(13)); - - // Check interoperability - assert(node_iterator(nodes.get()) == node_const_iterator(nodes.get())); - assert(node_const_iterator(nodes.get()) == node_iterator(nodes.get())); - - assert(node_iterator(nodes.get()) != node_const_iterator()); - assert(node_const_iterator(nodes.get()) != node_iterator()); - - std::copy( - node_iterator(nodes.get()), node_iterator() - , std::ostream_iterator(std::cout, " ") - ); - std::cout << std::endl; - - std::for_each( - node_iterator(nodes.get()), node_iterator() - , boost::mem_fn(&node_base::double_me) - ); - - std::copy( - node_const_iterator(nodes.get()), node_const_iterator() - , std::ostream_iterator(std::cout, "/") - ); - std::cout << std::endl; - return 0; -} diff --git a/example/node_iterator3.hpp b/example/node_iterator3.hpp deleted file mode 100755 index 85127e1..0000000 --- a/example/node_iterator3.hpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef NODE_ITERATOR3_DWA2004110_HPP -# define NODE_ITERATOR3_DWA2004110_HPP - -# include "node.hpp" -# include - -# ifndef BOOST_NO_SFINAE -# include -# include -# endif - -template -class node_iter - : public boost::iterator_adaptor< - node_iter // Derived - , Value* // Base - , boost::use_default // Value - , boost::forward_traversal_tag // CategoryOrTraversal - > -{ - private: - struct enabler {}; // a private type avoids misuse - - typedef boost::iterator_adaptor< - node_iter, Value*, boost::use_default, boost::forward_traversal_tag - > super_t; - - public: - node_iter() - : super_t(0) {} - - explicit node_iter(Value* p) - : super_t(p) {} - - template - node_iter( - node_iter const& other -# ifndef BOOST_NO_SFINAE - , typename boost::enable_if< - boost::is_convertible - , enabler - >::type = enabler() -# endif - ) - : super_t(other.base()) {} - -# if !BOOST_WORKAROUND(__GNUC__, == 2) - private: // GCC2 can't grant friendship to template member functions - friend class boost::iterator_core_access; -# endif - void increment() { this->base_reference() = this->base()->next(); } -}; - -typedef node_iter node_iterator; -typedef node_iter node_const_iterator; - -#endif // NODE_ITERATOR3_DWA2004110_HPP diff --git a/example/permutation_iter_example.cpp b/example/permutation_iter_example.cpp deleted file mode 100644 index e6ff889..0000000 --- a/example/permutation_iter_example.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2004 Jeremy Siek -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include - - -int main() { - using namespace boost; - int i = 0; - - typedef std::vector< int > element_range_type; - typedef std::deque< int > index_type; - - static const int element_range_size = 10; - static const int index_size = 4; - - element_range_type elements( element_range_size ); - for(element_range_type::iterator el_it = elements.begin() ; el_it != elements.end() ; ++el_it) - *el_it = std::distance(elements.begin(), el_it); - - index_type indices( index_size ); - for(index_type::iterator i_it = indices.begin() ; i_it != indices.end() ; ++i_it ) - *i_it = element_range_size - index_size + std::distance(indices.begin(), i_it); - std::reverse( indices.begin(), indices.end() ); - - typedef permutation_iterator< element_range_type::iterator, index_type::iterator > permutation_type; - permutation_type begin = make_permutation_iterator( elements.begin(), indices.begin() ); - permutation_type it = begin; - permutation_type end = make_permutation_iterator( elements.begin(), indices.end() ); - - std::cout << "The original range is : "; - std::copy( elements.begin(), elements.end(), std::ostream_iterator< int >( std::cout, " " ) ); - std::cout << "\n"; - - std::cout << "The reindexing scheme is : "; - std::copy( indices.begin(), indices.end(), std::ostream_iterator< int >( std::cout, " " ) ); - std::cout << "\n"; - - std::cout << "The permutated range is : "; - std::copy( begin, end, std::ostream_iterator< int >( std::cout, " " ) ); - std::cout << "\n"; - - std::cout << "Elements at even indices in the permutation : "; - it = begin; - for(i = 0; i < index_size / 2 ; ++i, it+=2 ) std::cout << *it << " "; - std::cout << "\n"; - - std::cout << "Permutation backwards : "; - it = begin + (index_size); - assert( it != begin ); - for( ; it-- != begin ; ) std::cout << *it << " "; - std::cout << "\n"; - - std::cout << "Iterate backward with stride 2 : "; - it = begin + (index_size - 1); - for(i = 0 ; i < index_size / 2 ; ++i, it-=2 ) std::cout << *it << " "; - std::cout << "\n"; - - return boost::exit_success; -} diff --git a/example/reverse_iterator.cpp b/example/reverse_iterator.cpp deleted file mode 100644 index b5f10f7..0000000 --- a/example/reverse_iterator.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2004 Jeremy Siek -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include - -int main() -{ - int x[] = { 1, 2, 3, 4 }; - boost::reverse_iterator first(x + 4), last(x); - std::copy(first, last, std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - return 0; -} diff --git a/example/reverse_iterator_example.cpp b/example/reverse_iterator_example.cpp deleted file mode 100644 index 61b8c4f..0000000 --- a/example/reverse_iterator_example.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// (C) Copyright Jeremy Siek 2000-2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include - -int main(int, char*[]) -{ - char letters_[] = "hello world!"; - const int N = sizeof(letters_)/sizeof(char) - 1; - typedef char* base_iterator; - base_iterator letters(letters_); - - std::cout << "original sequence of letters:\t\t\t" - << letters_ << std::endl; - - // Use reverse_iterator to print a sequence of letters in reverse - // order. - - boost::reverse_iterator - reverse_letters_first(letters + N), - reverse_letters_last(letters); - - std::cout << "sequence in reverse order:\t\t\t"; - std::copy(reverse_letters_first, reverse_letters_last, - std::ostream_iterator(std::cout)); - std::cout << std::endl; - - std::cout << "sequence in double-reversed (normal) order:\t"; - std::copy(boost::make_reverse_iterator(reverse_letters_last), - boost::make_reverse_iterator(reverse_letters_first), - std::ostream_iterator(std::cout)); - std::cout << std::endl; - - return boost::exit_success; -} diff --git a/example/transform_iterator_example.cpp b/example/transform_iterator_example.cpp deleted file mode 100644 index 6f51f01..0000000 --- a/example/transform_iterator_example.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// (C) Copyright Jeremy Siek 2000-2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - -#include -#include -#include -#include - -// What a bummer. We can't use std::binder1st with transform iterator -// because it does not have a default constructor. Here's a version -// that does. - -namespace boost { - - template - class binder1st - : public std::unary_function { - protected: - Operation op; - typename Operation::first_argument_type value; - public: - binder1st() { } // this had to be added! - binder1st(const Operation& x, - const typename Operation::first_argument_type& y) - : op(x), value(y) {} - typename Operation::result_type - operator()(const typename Operation::second_argument_type& x) const { - return op(value, x); - } - }; - - template - inline binder1st bind1st(const Operation& op, const T& x) { - typedef typename Operation::first_argument_type arg1_type; - return binder1st(op, arg1_type(x)); - } - -} // namespace boost - -int -main(int, char*[]) -{ - // This is a simple example of using the transform_iterators class to - // generate iterators that multiply the value returned by dereferencing - // the iterator. In this case we are multiplying by 2. - // Would be cooler to use lambda library in this example. - - int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; - const int N = sizeof(x)/sizeof(int); - - typedef boost::binder1st< std::multiplies > Function; - typedef boost::transform_iterator doubling_iterator; - - doubling_iterator i(x, boost::bind1st(std::multiplies(), 2)), - i_end(x + N, boost::bind1st(std::multiplies(), 2)); - - std::cout << "multiplying the array by 2:" << std::endl; - while (i != i_end) - std::cout << *i++ << " "; - std::cout << std::endl; - - std::cout << "adding 4 to each element in the array:" << std::endl; - - std::copy(boost::make_transform_iterator(x, boost::bind1st(std::plus(), 4)), - boost::make_transform_iterator(x + N, boost::bind1st(std::plus(), 4)), - std::ostream_iterator(std::cout, " ")); - std::cout << std::endl; - - return 0; -} - - diff --git a/index.html b/index.html deleted file mode 100755 index 40f1ae1..0000000 --- a/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -Automatically loading index page... if nothing happens, please go to -doc/index.html. - - diff --git a/test/Jamfile b/test/Jamfile deleted file mode 100644 index f240d69..0000000 --- a/test/Jamfile +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright David Abrahams 2003. Permission to copy, use, -# modify, sell and distribute this software is granted provided this -# copyright notice appears in all copies. This software is provided -# "as is" without express or implied warranty, and with no claim as -# to its suitability for any purpose. - -subproject libs/iterator/test ; - -import testing ; - -rule vc6-stlport-debug-inlining ( toolset variant : non-defaults * ) -{ - if [ MATCH (vc-(6[_0-9]*)-stlport) : $(toolset) ] - && ( off in $(non-defaults) ) - { - non-defaults = [ difference $(non-defaults) : off ] - on ; - } - return $(non-defaults) ; -} - -test-suite iterator - : - # These first two tests will run last, and are expected to fail - # for many less-capable compilers. - - [ compile-fail interoperable_fail.cpp ] - # test uses expected success, so that we catch unrelated - # compilation problems. - [ run is_convertible_fail.cpp ] - - [ run zip_iterator_test.cpp - : : : vc6-stlport-debug-inlining - - # stlport's debug mode generates long symbols which overwhelm - # vc6 unless you turn on inlining -# <*>-Ob1 -# <*>-Ob1 - ] - - # These tests should work for just about everything. - [ compile is_lvalue_iterator.cpp ] - [ compile is_readable_iterator.cpp ] - [ compile pointee.cpp ] - - [ run unit_tests.cpp ] - [ run concept_tests.cpp ] - [ run iterator_adaptor_cc.cpp ] - [ run iterator_adaptor_test.cpp ] - [ compile iterator_archetype_cc.cpp ] - [ compile-fail iter_archetype_default_ctor.cpp ] - [ compile-fail lvalue_concept_fail.cpp ] - [ run transform_iterator_test.cpp ] - [ run indirect_iterator_test.cpp ] - [ compile indirect_iter_member_types.cpp ] - [ run filter_iterator_test.cpp ] - [ run iterator_facade.cpp ] - [ run reverse_iterator_test.cpp ] - [ run counting_iterator_test.cpp ] - [ run interoperable.cpp ] - [ run iterator_traits_test.cpp ] - [ run permutation_iterator_test.cpp : : : # on - ] - -; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 deleted file mode 100644 index f55fd3e..0000000 --- a/test/Jamfile.v2 +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright David Abrahams 2003. Permission to copy, use, -# modify, sell and distribute this software is granted provided this -# copyright notice appears in all copies. This software is provided -# "as is" without express or implied warranty, and with no claim as -# to its suitability for any purpose. - -test-suite iterator - : - # These first two tests will run last, and are expected to fail - # for many less-capable compilers. - - [ compile-fail interoperable_fail.cpp ] - # test uses expected success, so that we catch unrelated - # compilation problems. - [ run is_convertible_fail.cpp ] - - [ run zip_iterator_test.cpp - : : : - - # stlport's debug mode generates long symbols which overwhelm - # vc6 - #<*>release - ] - - # These tests should work for just about everything. - [ compile is_lvalue_iterator.cpp ] - [ compile is_readable_iterator.cpp ] - [ compile pointee.cpp ] - - [ run unit_tests.cpp ] - [ run concept_tests.cpp ] - [ run iterator_adaptor_cc.cpp ] - [ run iterator_adaptor_test.cpp ] - [ compile iterator_archetype_cc.cpp ] - [ compile-fail iter_archetype_default_ctor.cpp ] - [ compile-fail lvalue_concept_fail.cpp ] - [ run transform_iterator_test.cpp ] - [ run indirect_iterator_test.cpp ] - [ compile indirect_iter_member_types.cpp ] - [ run filter_iterator_test.cpp ] - [ run iterator_facade.cpp ] - [ run reverse_iterator_test.cpp ] - [ run counting_iterator_test.cpp ] - [ run interoperable.cpp ] - [ run iterator_traits_test.cpp ] - [ run permutation_iterator_test.cpp : : : # on - ] - -; diff --git a/test/concept_tests.cpp b/test/concept_tests.cpp deleted file mode 100644 index f3d518a..0000000 --- a/test/concept_tests.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// (C) Copyright Jeremy Siek 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -struct new_random_access - : std::random_access_iterator_tag - , boost::random_access_traversal_tag -{}; - -struct new_iterator - : public boost::iterator< new_random_access, int > -{ - int& operator*() const { return *m_x; } - new_iterator& operator++() { return *this; } - new_iterator operator++(int) { return *this; } - new_iterator& operator--() { return *this; } - new_iterator operator--(int) { return *this; } - new_iterator& operator+=(std::ptrdiff_t) { return *this; } - new_iterator operator+(std::ptrdiff_t) { return *this; } - new_iterator& operator-=(std::ptrdiff_t) { return *this; } - std::ptrdiff_t operator-(const new_iterator&) const { return 0; } - new_iterator operator-(std::ptrdiff_t) const { return *this; } - bool operator==(const new_iterator&) const { return false; } - bool operator!=(const new_iterator&) const { return false; } - bool operator<(const new_iterator&) const { return false; } - int* m_x; -}; -new_iterator operator+(std::ptrdiff_t, new_iterator x) { return x; } - -struct old_iterator - : public boost::iterator -{ - int& operator*() const { return *m_x; } - old_iterator& operator++() { return *this; } - old_iterator operator++(int) { return *this; } - old_iterator& operator--() { return *this; } - old_iterator operator--(int) { return *this; } - old_iterator& operator+=(std::ptrdiff_t) { return *this; } - old_iterator operator+(std::ptrdiff_t) { return *this; } - old_iterator& operator-=(std::ptrdiff_t) { return *this; } - old_iterator operator-(std::ptrdiff_t) const { return *this; } - std::ptrdiff_t operator-(const old_iterator&) const { return 0; } - bool operator==(const old_iterator&) const { return false; } - bool operator!=(const old_iterator&) const { return false; } - bool operator<(const old_iterator&) const { return false; } - int* m_x; -}; -old_iterator operator+(std::ptrdiff_t, old_iterator x) { return x; } - -int -main() -{ - boost::iterator_traversal::type tc; - boost::random_access_traversal_tag derived = tc; - (void)derived; - - boost::function_requires< - boost_concepts::WritableIteratorConcept >(); - boost::function_requires< - boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessTraversalConcept >(); - - boost::function_requires< - boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< - boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessTraversalConcept >(); - - boost::function_requires< - boost_concepts::WritableIteratorConcept >(); - boost::function_requires< - boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessTraversalConcept >(); - - boost::function_requires< - boost_concepts::WritableIteratorConcept >(); - boost::function_requires< - boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< - boost_concepts::RandomAccessTraversalConcept >(); - - boost::function_requires< - boost_concepts::InteroperableIteratorConcept >(); - - return 0; -} diff --git a/test/constant_iter_arrow.cpp b/test/constant_iter_arrow.cpp deleted file mode 100755 index 3579c53..0000000 --- a/test/constant_iter_arrow.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -struct my_iter : boost::iterator_adaptor const*> -{ - my_iter(std::pair const*); - my_iter(); -}; - -std::pair const x(1,1); -my_iter p(&x); -int y = p->first; // operator-> attempts to return an non-const pointer diff --git a/test/constant_iter_arrow_fail.cpp b/test/constant_iter_arrow_fail.cpp deleted file mode 100755 index 05f551a..0000000 --- a/test/constant_iter_arrow_fail.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -struct my_iter : boost::iterator_adaptor const*> -{ - my_iter(std::pair const*); - my_iter(); -}; - -std::pair const x(1,1); -my_iter p(&x); - -void test() -{ - p->first = 3; -} diff --git a/test/counting_iterator_test.cpp b/test/counting_iterator_test.cpp deleted file mode 100644 index c30a3e0..0000000 --- a/test/counting_iterator_test.cpp +++ /dev/null @@ -1,295 +0,0 @@ -// (C) Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org for most recent version including documentation. -// -// Revision History -// 16 Feb 2001 Added a missing const. Made the tests run (somewhat) with -// plain MSVC again. (David Abrahams) -// 11 Feb 2001 #if 0'd out use of counting_iterator on non-numeric types in -// MSVC without STLport, so that the other tests may proceed -// (David Abrahams) -// 04 Feb 2001 Added use of iterator_tests.hpp (David Abrahams) -// 28 Jan 2001 Removed not_an_iterator detritus (David Abrahams) -// 24 Jan 2001 Initial revision (David Abrahams) - -#include - -#ifdef __BORLANDC__ // Borland mis-detects our custom iterators -# pragma warn -8091 // template argument ForwardIterator passed to '...' is a output iterator -# pragma warn -8071 // Conversion may lose significant digits (due to counting_iterator += n). -#endif - -#ifdef BOOST_MSVC -# pragma warning(disable:4786) // identifier truncated in debug info -#endif - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#ifndef __BORLANDC__ -# include -#endif -#include -#include -#include -#ifndef BOOST_NO_SLIST -# include -#endif - - -#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -template -struct signed_assert_nonnegative -{ - static void test(T x) { assert(x >= 0); } -}; - -template -struct unsigned_assert_nonnegative -{ - static void test(T x) {} -}; - -template -struct assert_nonnegative - : boost::mpl::if_c< - std::numeric_limits::is_signed - , signed_assert_nonnegative - , unsigned_assert_nonnegative - >::type -{ -}; -#endif - -// Special tests for RandomAccess CountingIterators. -template -void category_test( - CountingIterator start, - CountingIterator finish, - Value, - std::random_access_iterator_tag) -{ - typedef typename - boost::detail::iterator_traits::difference_type - difference_type; - difference_type distance = boost::detail::distance(start, finish); - - // Pick a random position internal to the range - difference_type offset = (unsigned)rand() % distance; - -#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - assert(offset >= 0); -#else - assert_nonnegative::test(offset); -#endif - - CountingIterator internal = start; - std::advance(internal, offset); - - // Try some binary searches on the range to show that it's ordered - assert(std::binary_search(start, finish, *internal)); - - // #including tuple crashed borland, so I had to give up on tie(). - std::pair xy( - std::equal_range(start, finish, *internal)); - CountingIterator x = xy.first, y = xy.second; - - assert(boost::detail::distance(x, y) == 1); - - // Show that values outside the range can't be found - assert(!std::binary_search(start, boost::prior(finish), *finish)); - - // Do the generic random_access_iterator_test - typedef typename CountingIterator::value_type value_type; - std::vector v; - for (value_type z = *start; !(z == *finish); ++z) - v.push_back(z); - - // Note that this test requires a that the first argument is - // dereferenceable /and/ a valid iterator prior to the first argument - boost::random_access_iterator_test(start, v.size(), v.begin()); -} - -// Special tests for bidirectional CountingIterators -template -void category_test(CountingIterator start, Value v1, std::bidirectional_iterator_tag) -{ - Value v2 = v1; - ++v2; - - // Note that this test requires a that the first argument is - // dereferenceable /and/ a valid iterator prior to the first argument - boost::bidirectional_iterator_test(start, v1, v2); -} - -template -void category_test(CountingIterator start, CountingIterator finish, Value v1, std::forward_iterator_tag) -{ - Value v2 = v1; - ++v2; - if (finish != start && finish != boost::next(start)) - boost::forward_readable_iterator_test(start, finish, v1, v2); -} - -template -void test_aux(CountingIterator start, CountingIterator finish, Value v1) -{ - typedef typename CountingIterator::iterator_category category; - typedef typename CountingIterator::value_type value_type; - - // If it's a RandomAccessIterator we can do a few delicate tests - category_test(start, finish, v1, category()); - - // Okay, brute force... - for (CountingIterator p = start - ; p != finish && boost::next(p) != finish - ; ++p) - { - assert(boost::next(*p) == *boost::next(p)); - } - - // prove that a reference can be formed to these values - typedef typename CountingIterator::value_type value; - const value* q = &*start; - (void)q; // suppress unused variable warning -} - -template -void test(Incrementable start, Incrementable finish) -{ - test_aux(boost::make_counting_iterator(start), boost::make_counting_iterator(finish), start); -} - -template -void test_integer(Integer* = 0) // default arg works around MSVC bug -{ - Integer start = 0; - Integer finish = 120; - test(start, finish); -} - -template -void test_integer3(Integer* = 0, Category* = 0, Difference* = 0) // default arg works around MSVC bug -{ - Integer start = 0; - Integer finish = 120; - typedef boost::counting_iterator iterator; - test_aux(iterator(start), iterator(finish), start); -} - -template -void test_container(Container* = 0) // default arg works around MSVC bug -{ - Container c(1 + (unsigned)rand() % 1673); - - const typename Container::iterator start = c.begin(); - - // back off by 1 to leave room for dereferenceable value at the end - typename Container::iterator finish = start; - std::advance(finish, c.size() - 1); - - test(start, finish); - - typedef typename Container::const_iterator const_iterator; - test(const_iterator(start), const_iterator(finish)); -} - -class my_int1 { -public: - my_int1() { } - my_int1(int x) : m_int(x) { } - my_int1& operator++() { ++m_int; return *this; } - bool operator==(const my_int1& x) const { return m_int == x.m_int; } -private: - int m_int; -}; - -class my_int2 { -public: - typedef void value_type; - typedef void pointer; - typedef void reference; - typedef std::ptrdiff_t difference_type; - typedef std::bidirectional_iterator_tag iterator_category; - - my_int2() { } - my_int2(int x) : m_int(x) { } - my_int2& operator++() { ++m_int; return *this; } - my_int2& operator--() { --m_int; return *this; } - bool operator==(const my_int2& x) const { return m_int == x.m_int; } -private: - int m_int; -}; - -class my_int3 { -public: - typedef void value_type; - typedef void pointer; - typedef void reference; - typedef std::ptrdiff_t difference_type; - typedef std::random_access_iterator_tag iterator_category; - - my_int3() { } - my_int3(int x) : m_int(x) { } - my_int3& operator++() { ++m_int; return *this; } - my_int3& operator+=(std::ptrdiff_t n) { m_int += n; return *this; } - std::ptrdiff_t operator-(const my_int3& x) const { return m_int - x.m_int; } - my_int3& operator--() { --m_int; return *this; } - bool operator==(const my_int3& x) const { return m_int == x.m_int; } - bool operator!=(const my_int3& x) const { return m_int != x.m_int; } - bool operator<(const my_int3& x) const { return m_int < x.m_int; } -private: - int m_int; -}; - -int main() -{ - // Test the built-in integer types. - test_integer(); - test_integer(); - test_integer(); - test_integer(); - test_integer(); - test_integer(); - test_integer(); - test_integer(); - test_integer(); - test_integer(); -#if defined(BOOST_HAS_LONG_LONG) - test_integer< ::boost::long_long_type>(); - test_integer< ::boost::ulong_long_type>(); -#endif - - // Test user-defined type. - - test_integer3(); - test_integer(); - test_integer(); - - // Some tests on container iterators, to prove we handle a few different categories - test_container >(); - test_container >(); -# ifndef BOOST_NO_SLIST - test_container >(); -# endif - - // Also prove that we can handle raw pointers. - int array[2000]; - test(boost::make_counting_iterator(array), boost::make_counting_iterator(array+2000-1)); - - return 0; -} diff --git a/test/filter_iterator_test.cpp b/test/filter_iterator_test.cpp deleted file mode 100644 index f4eb635..0000000 --- a/test/filter_iterator_test.cpp +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright David Abrahams 2003, Jeremy Siek 2004. - -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using boost::dummyT; - -struct one_or_four -{ - bool operator()(dummyT x) const - { - return x.foo() == 1 || x.foo() == 4; - } -}; - -template struct undefined; - -template struct see_type; - -// Test filter iterator -int main() -{ - // Concept checks - // Adapting old-style iterators - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::SinglePassIteratorConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost::OutputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::SinglePassIteratorConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::ForwardIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::ForwardTraversalConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::Mutable_ForwardIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::ForwardTraversalConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::Mutable_BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::filter_iterator > Iter; - boost::function_requires< boost::Mutable_BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - // Adapting new-style iterators - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_iterator_t - , boost::single_pass_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::SinglePassIteratorConcept >(); - } -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) // Causes Internal Error in linker. - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::readable_writable_iterator_t - , boost::single_pass_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost::OutputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::SinglePassIteratorConcept >(); - } -#endif - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_iterator_t - , boost::forward_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::ForwardTraversalConcept >(); - } - -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) // Causes Internal Error in linker. - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::readable_writable_iterator_t - , boost::forward_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::ForwardTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_lvalue_iterator_t - , boost::forward_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::ForwardIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::ForwardTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::writable_lvalue_iterator_t - , boost::forward_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::Mutable_ForwardIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::ForwardTraversalConcept >(); - } -#endif - - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_iterator_t - , boost::random_access_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) // Causes Internal Error in linker. - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::readable_writable_iterator_t - , boost::random_access_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_lvalue_iterator_t - , boost::random_access_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::writable_lvalue_iterator_t - , boost::random_access_traversal_tag - > BaseIter; - typedef boost::filter_iterator Iter; - boost::function_requires< boost::Mutable_BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } -#endif - - // Run-time tests - - dummyT array[] = { dummyT(0), dummyT(1), dummyT(2), - dummyT(3), dummyT(4), dummyT(5) }; - const int N = sizeof(array)/sizeof(dummyT); - - typedef boost::filter_iterator filter_iter; - - boost::bidirectional_readable_iterator_test( - filter_iter(one_or_four(), array, array+N) - , dummyT(1), dummyT(4)); - - BOOST_STATIC_ASSERT( - (!boost::is_convertible< - boost::iterator_traversal::type - , boost::random_access_traversal_tag - >::value - )); - - //# endif - - // On compilers not supporting partial specialization, we can do more type - // deduction with deque iterators than with pointers... unless the library - // is broken ;-( - std::deque array2; - std::copy(array+0, array+N, std::back_inserter(array2)); - boost::bidirectional_readable_iterator_test( - boost::make_filter_iterator(one_or_four(), array2.begin(), array2.end()), - dummyT(1), dummyT(4)); - - boost::bidirectional_readable_iterator_test( - boost::make_filter_iterator(one_or_four(), array2.begin(), array2.end()), - dummyT(1), dummyT(4)); - - boost::bidirectional_readable_iterator_test( - boost::make_filter_iterator( - one_or_four() - , boost::make_reverse_iterator(array2.end()) - , boost::make_reverse_iterator(array2.begin()) - ), - dummyT(4), dummyT(1)); - - boost::bidirectional_readable_iterator_test( - filter_iter(array+0, array+N), - dummyT(1), dummyT(4)); - - boost::bidirectional_readable_iterator_test( - filter_iter(one_or_four(), array, array + N), - dummyT(1), dummyT(4)); - - - std::cout << "test successful " << std::endl; - return boost::exit_success; -} diff --git a/test/indirect_iter_member_types.cpp b/test/indirect_iter_member_types.cpp deleted file mode 100644 index 84dcaeb..0000000 --- a/test/indirect_iter_member_types.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// (C) Copyright Jeremy Siek 2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Revision History -// 03 Jan 2004 Jeremy Siek -// First draft. - - -#include -#include - -#include -#include -#include "static_assert_same.hpp" -#include - -struct zow { }; - -struct my_ptr { - typedef zow const element_type; - zow const& operator*() const; -// typedef const zow& reference; -// typedef const zow* pointer; -// typedef void difference_type; -// typedef boost::no_traversal_tag iterator_category; -}; - -BOOST_TT_BROKEN_COMPILER_SPEC(my_ptr) -BOOST_TT_BROKEN_COMPILER_SPEC(zow) - -// Borland 5.6.4 and earlier drop const all over the place, so this -// test will fail in the lines marked with (**) - -int main() -{ - { - typedef boost::indirect_iterator Iter; - STATIC_ASSERT_SAME(Iter::value_type, int); - STATIC_ASSERT_SAME(Iter::reference, int&); - STATIC_ASSERT_SAME(Iter::pointer, int*); - STATIC_ASSERT_SAME(Iter::difference_type, std::ptrdiff_t); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - BOOST_STATIC_ASSERT((boost::is_convertible::type, - boost::random_access_traversal_tag>::value)); - } - { - typedef boost::indirect_iterator Iter; - STATIC_ASSERT_SAME(Iter::value_type, int); - STATIC_ASSERT_SAME(Iter::reference, const int&); - STATIC_ASSERT_SAME(Iter::pointer, const int*); // (**) - } - { - typedef boost::indirect_iterator Iter; - STATIC_ASSERT_SAME(Iter::value_type, int); - STATIC_ASSERT_SAME(Iter::reference, int&); - STATIC_ASSERT_SAME(Iter::pointer, int*); - } - { - typedef boost::indirect_iterator Iter; - STATIC_ASSERT_SAME(Iter::value_type, int); - STATIC_ASSERT_SAME(Iter::reference, const int&); - STATIC_ASSERT_SAME(Iter::pointer, const int*); // (**) - } - { - typedef boost::indirect_iterator Iter; - STATIC_ASSERT_SAME(Iter::value_type, zow); - STATIC_ASSERT_SAME(Iter::reference, const zow&); // (**) - STATIC_ASSERT_SAME(Iter::pointer, const zow*); // (**) - - STATIC_ASSERT_SAME(Iter::difference_type, std::ptrdiff_t); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - BOOST_STATIC_ASSERT((boost::is_convertible::type, - boost::random_access_traversal_tag>::value)); - } - { - typedef boost::indirect_iterator Iter; - STATIC_ASSERT_SAME(Iter::value_type, int); - STATIC_ASSERT_SAME(Iter::reference, long&); - STATIC_ASSERT_SAME(Iter::pointer, int*); - STATIC_ASSERT_SAME(Iter::difference_type, short); - } - return 0; -} diff --git a/test/indirect_iterator_test.cpp b/test/indirect_iterator_test.cpp deleted file mode 100644 index e79cf12..0000000 --- a/test/indirect_iterator_test.cpp +++ /dev/null @@ -1,219 +0,0 @@ -// (C) Copyright Jeremy Siek 1999. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Revision History -// 22 Nov 2002 Thomas Witt -// Added interoperability check. -// 08 Mar 2001 Jeremy Siek -// Moved test of indirect iterator into its own file. It to -// to be in iterator_adaptor_test.cpp. - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#if !defined(__SGI_STL_PORT) \ - && (defined(BOOST_MSVC_STD_ITERATOR) \ - || BOOST_WORKAROUND(_CPPLIB_VER, <= 310) \ - || BOOST_WORKAROUND(__GNUC__, <= 2)) - -// std container random-access iterators don't support mutable/const -// interoperability (but may support const/mutable interop). -# define NO_MUTABLE_CONST_STD_SET_ITERATOR_INTEROPERABILITY - -#endif - - -template struct see_type; -template struct see_val; - -struct my_iterator_tag : public std::random_access_iterator_tag { }; - -using boost::dummyT; -BOOST_TT_BROKEN_COMPILER_SPEC(boost::shared_ptr) - -typedef std::vector storage; -typedef std::vector pointer_ra_container; -typedef std::set iterator_set; - -template -struct indirect_iterator_pair_generator -{ - typedef boost::indirect_iterator iterator; - - typedef boost::indirect_iterator< - typename Container::iterator - , typename iterator::value_type const - > const_iterator; -}; - -void more_indirect_iterator_tests() -{ - storage store(1000); - std::generate(store.begin(), store.end(), rand); - - pointer_ra_container ptr_ra_container; - iterator_set iter_set; - - for (storage::iterator p = store.begin(); p != store.end(); ++p) - { - ptr_ra_container.push_back(&*p); - iter_set.insert(p); - } - - typedef indirect_iterator_pair_generator indirect_ra_container; - - indirect_ra_container::iterator db(ptr_ra_container.begin()); - indirect_ra_container::iterator de(ptr_ra_container.end()); - assert(static_cast(de - db) == store.size()); - assert(db + store.size() == de); - indirect_ra_container::const_iterator dci = db; - - assert(dci == db); - -#ifndef NO_MUTABLE_CONST_RA_ITERATOR_INTEROPERABILITY - assert(db == dci); -#endif - - assert(dci != de); - assert(dci < de); - assert(dci <= de); - -#ifndef NO_MUTABLE_CONST_RA_ITERATOR_INTEROPERABILITY - assert(de >= dci); - assert(de > dci); -#endif - - dci = de; - assert(dci == de); - - boost::random_access_iterator_test(db + 1, store.size() - 1, boost::next(store.begin())); - - *db = 999; - assert(store.front() == 999); - - // Borland C++ is getting very confused about the typedefs here - typedef boost::indirect_iterator indirect_set_iterator; - typedef boost::indirect_iterator< - iterator_set::iterator - , iterator_set::iterator::value_type const - > const_indirect_set_iterator; - - indirect_set_iterator sb(iter_set.begin()); - indirect_set_iterator se(iter_set.end()); - const_indirect_set_iterator sci(iter_set.begin()); - assert(sci == sb); - -# ifndef NO_MUTABLE_CONST_STD_SET_ITERATOR_INTEROPERABILITY - assert(se != sci); -# endif - - assert(sci != se); - sci = se; - assert(sci == se); - - *boost::prior(se) = 888; - assert(store.back() == 888); - assert(std::equal(sb, se, store.begin())); - - boost::bidirectional_iterator_test(boost::next(sb), store[1], store[2]); - assert(std::equal(db, de, store.begin())); -} - -// element_type detector; defaults to true so the test passes when -// has_xxx isn't implemented -BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_element_type, element_type, true) - -int -main() -{ - dummyT array[] = { dummyT(0), dummyT(1), dummyT(2), - dummyT(3), dummyT(4), dummyT(5) }; - const int N = sizeof(array)/sizeof(dummyT); - -# if BOOST_WORKAROUND(BOOST_MSVC, == 1200) - boost::shared_ptr zz((dummyT*)0); // Why? I don't know, but it suppresses a bad instantiation. -# endif - - typedef std::vector > shared_t; - shared_t shared; - - // Concept checks - { - typedef boost::indirect_iterator iter_t; - - BOOST_STATIC_ASSERT( - has_element_type< - boost::detail::iterator_traits::value_type - >::value - ); - - typedef boost::indirect_iterator< - shared_t::iterator - , boost::iterator_value::type const - > c_iter_t; - -# ifndef NO_MUTABLE_CONST_RA_ITERATOR_INTEROPERABILITY - boost::function_requires< boost_concepts::InteroperableIteratorConcept >(); -# endif - } - - // Test indirect_iterator_generator - { - for (int jj = 0; jj < N; ++jj) - shared.push_back(boost::shared_ptr(new dummyT(jj))); - - dummyT* ptr[N]; - for (int k = 0; k < N; ++k) - ptr[k] = array + k; - - typedef boost::indirect_iterator indirect_iterator; - - typedef boost::indirect_iterator - const_indirect_iterator; - - indirect_iterator i(ptr); - boost::random_access_iterator_test(i, N, array); - - boost::random_access_iterator_test( - boost::indirect_iterator(shared.begin()) - , N, array); - - boost::random_access_iterator_test(boost::make_indirect_iterator(ptr), N, array); - - // check operator-> - assert((*i).m_x == i->foo()); - - const_indirect_iterator j(ptr); - boost::random_access_iterator_test(j, N, array); - - dummyT const*const* const_ptr = ptr; - boost::random_access_iterator_test(boost::make_indirect_iterator(const_ptr), N, array); - - boost::const_nonconst_iterator_test(i, ++j); - - more_indirect_iterator_tests(); - } - std::cout << "test successful " << std::endl; - return 0; -} diff --git a/test/interoperable.cpp b/test/interoperable.cpp deleted file mode 100755 index c228b9c..0000000 --- a/test/interoperable.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -struct mutable_it : boost::iterator_adaptor -{ - typedef boost::iterator_adaptor super_t; - - mutable_it(); - explicit mutable_it(int* p) : super_t(p) {} - - bool equal(mutable_it const& rhs) const - { - return this->base() == rhs.base(); - } -}; - -struct constant_it : boost::iterator_adaptor -{ - typedef boost::iterator_adaptor super_t; - - constant_it(); - explicit constant_it(int* p) : super_t(p) {} - constant_it(mutable_it const& x) : super_t(x.base()) {} - - bool equal(constant_it const& rhs) const - { - return this->base() == rhs.base(); - } -}; - -int main() -{ - int data[] = { 49, 77 }; - - mutable_it i(data); - constant_it j(data + 1); - assert(i < j); - assert(j > i); - assert(i <= j); - assert(j >= i); - assert(j - i == 1); - assert(i - j == -1); - - constant_it k = i; - - assert(!(i < k)); - assert(!(k > i)); - assert(i <= k); - assert(k >= i); - assert(k - i == 0); - assert(i - k == 0); - - return 0; -} diff --git a/test/interoperable_fail.cpp b/test/interoperable_fail.cpp deleted file mode 100644 index d6d249a..0000000 --- a/test/interoperable_fail.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright Thomas Witt 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include -#include -#include -#include -#include - -int main() -{ - { - typedef boost::reverse_iterator::iterator> rev_iter; - typedef boost::indirect_iterator::iterator> ind_iter; - - ind_iter() == rev_iter(); - } - - return boost::exit_success; -} diff --git a/test/is_convertible_fail.cpp b/test/is_convertible_fail.cpp deleted file mode 100644 index 757b5c6..0000000 --- a/test/is_convertible_fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (c) Thomas Witt 2002. -// -// Use, modification and distribution is subject to the -// Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#include -#include - -int main() -{ - typedef boost::reverse_iterator rev_iter1; - typedef boost::reverse_iterator rev_iter2; - - return boost::is_convertible::value - ? boost::exit_failure : boost::exit_success; -} diff --git a/test/is_lvalue_iterator.cpp b/test/is_lvalue_iterator.cpp deleted file mode 100755 index fdace52..0000000 --- a/test/is_lvalue_iterator.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright David Abrahams 2003. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include -#include -#include - -// Last, for BOOST_NO_LVALUE_RETURN_DETECTION -#include - -struct v -{ - v(); - ~v(); -}; - -BOOST_TT_BROKEN_COMPILER_SPEC(v) - -struct value_iterator : boost::iterator -{ - v operator*() const; -}; - -struct noncopyable_iterator : boost::iterator -{ - boost::noncopyable const& operator*() const; -}; - -template -struct proxy_iterator - : boost::iterator -{ - typedef T value_type; - -#if BOOST_WORKAROUND(__GNUC__, == 2) - typedef boost::iterator base; - typedef base::iterator_category iterator_category; - typedef base::difference_type difference_type; - typedef base::pointer pointer; - typedef base::reference reference; -#endif - - struct proxy - { - operator value_type&() const; - proxy& operator=(value_type) const; - }; - - proxy operator*() const; -}; - -template -struct lvalue_iterator -{ - typedef T value_type; - typedef T& reference; - typedef T difference_type; - typedef std::input_iterator_tag iterator_category; - typedef T* pointer; - - T& operator*() const; - lvalue_iterator& operator++(); - lvalue_iterator operator++(int); -}; - -template -struct constant_lvalue_iterator -{ - typedef T value_type; - typedef T const& reference; - typedef T difference_type; - typedef std::input_iterator_tag iterator_category; - typedef T const* pointer; - - T const& operator*() const; - constant_lvalue_iterator& operator++(); - constant_lvalue_iterator operator++(int); -}; - -BOOST_TT_BROKEN_COMPILER_SPEC(proxy_iterator::proxy) -BOOST_TT_BROKEN_COMPILER_SPEC(proxy_iterator::proxy) - -int main() -{ - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::iterator>::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::const_iterator>::value); - BOOST_STATIC_ASSERT(!boost::is_lvalue_iterator > >::value); - BOOST_STATIC_ASSERT(!boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_lvalue_iterator >::value); -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION - BOOST_STATIC_ASSERT(!boost::is_lvalue_iterator::value); -#endif - // Make sure inaccessible copy constructor doesn't prevent - // reference binding - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::value); - - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - - - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator >::value); - - - - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator::value); - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator::iterator>::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator::const_iterator>::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator > >::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator::value); -#endif - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator::value); - - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator >::value); -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator >::value); -#endif - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator >::value); - - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); - BOOST_STATIC_ASSERT(!boost::is_non_const_lvalue_iterator >::value); - - return 0; -} diff --git a/test/is_readable_iterator.cpp b/test/is_readable_iterator.cpp deleted file mode 100755 index 15ed099..0000000 --- a/test/is_readable_iterator.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright David Abrahams 2003. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include -#include -#include - -// Last, for BOOST_NO_LVALUE_RETURN_DETECTION -#include - -struct v -{ - v(); - ~v(); -}; - -BOOST_TT_BROKEN_COMPILER_SPEC(v) - -struct value_iterator : boost::iterator -{ - v operator*() const; -}; - -struct noncopyable_iterator : boost::iterator -{ - boost::noncopyable const& operator*() const; -}; - -struct proxy_iterator : boost::iterator -{ -#if BOOST_WORKAROUND(__GNUC__, == 2) - typedef boost::iterator base; - typedef base::iterator_category iterator_category; - typedef base::value_type value_type; - typedef base::difference_type difference_type; - typedef base::pointer pointer; - typedef base::reference reference; -#endif - - struct proxy - { - operator v&(); - proxy& operator=(v) const; - }; - - proxy operator*() const; -}; - -struct proxy_iterator2 : boost::iterator -{ -#if BOOST_WORKAROUND(__GNUC__, == 2) - typedef boost::iterator base; - typedef base::iterator_category iterator_category; - typedef base::value_type value_type; - typedef base::difference_type difference_type; - typedef base::pointer pointer; - typedef base::reference reference; -#endif - - struct proxy - { - proxy& operator=(v) const; - }; - - proxy operator*() const; -}; - -BOOST_TT_BROKEN_COMPILER_SPEC(proxy_iterator::proxy) - -int main() -{ - BOOST_STATIC_ASSERT(boost::is_readable_iterator::value); - BOOST_STATIC_ASSERT(boost::is_readable_iterator::value); - BOOST_STATIC_ASSERT(boost::is_readable_iterator::iterator>::value); - BOOST_STATIC_ASSERT(boost::is_readable_iterator::const_iterator>::value); - BOOST_STATIC_ASSERT(!boost::is_readable_iterator > >::value); - BOOST_STATIC_ASSERT(!boost::is_readable_iterator >::value); - BOOST_STATIC_ASSERT(boost::is_readable_iterator::value); - BOOST_STATIC_ASSERT(!boost::is_readable_iterator::value); - BOOST_STATIC_ASSERT(boost::is_readable_iterator::value); - - // Make sure inaccessible copy constructor doesn't prevent - // readability - BOOST_STATIC_ASSERT(boost::is_readable_iterator::value); - - return 0; -} diff --git a/test/iter_archetype_default_ctor.cpp b/test/iter_archetype_default_ctor.cpp deleted file mode 100755 index 7936bdd..0000000 --- a/test/iter_archetype_default_ctor.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright Thomas Witt 2004. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#include - - -int main() -{ - typedef boost::iterator_archetype< - int - , boost::iterator_archetypes::readable_iterator_t - , boost::single_pass_traversal_tag - > iter; - - // single_pass_traversal iterators are not required to be - // default constructible - iter it; -} diff --git a/test/iterator_adaptor_cc.cpp b/test/iterator_adaptor_cc.cpp deleted file mode 100644 index 599474c..0000000 --- a/test/iterator_adaptor_cc.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2004 Jeremy Siek -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include - -int main() -{ - { - typedef boost::reverse_iterator rev_iter; - typedef boost::reverse_iterator c_rev_iter; - - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::RandomAccessTraversalConcept >(); - boost::function_requires< boost::RandomAccessIteratorConcept >(); - boost::function_requires< boost_concepts::InteroperableIteratorConcept >(); - } - - // Many compilers' builtin container iterators don't interoperate well, though - // STLport fixes that problem. -#if defined(__SGI_STL_PORT) \ - || !BOOST_WORKAROUND(__GNUC__, <= 2) \ - && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 1)) \ - && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) \ - && !BOOST_WORKAROUND(__LIBCOMO_VERSION__, BOOST_TESTED_AT(29)) \ - && !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 1) - { - typedef boost::reverse_iterator::iterator> rev_iter; - typedef boost::reverse_iterator::const_iterator> c_rev_iter; - - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::InteroperableIteratorConcept >(); - } -#endif - - return boost::exit_success; -} diff --git a/test/iterator_adaptor_test.cpp b/test/iterator_adaptor_test.cpp deleted file mode 100644 index dddac26..0000000 --- a/test/iterator_adaptor_test.cpp +++ /dev/null @@ -1,335 +0,0 @@ -// (C) Copyright Thomas Witt 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version including documentation. - -#include -#include - -#include -#include -#include - -#include -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) -# include -# include -#endif -#include - -# include - -#include -#include -#include -#include -#include - -#include "static_assert_same.hpp" - -#include - -using boost::dummyT; - -struct mult_functor { - typedef int result_type; - typedef int argument_type; - // Functors used with transform_iterator must be - // DefaultConstructible, as the transform_iterator must be - // DefaultConstructible to satisfy the requirements for - // TrivialIterator. - mult_functor() { } - mult_functor(int aa) : a(aa) { } - int operator()(int b) const { return a * b; } - int a; -}; - -template -struct select1st_ - : public std::unary_function -{ - const typename Pair::first_type& operator()(const Pair& x) const { - return x.first; - } - typename Pair::first_type& operator()(Pair& x) const { - return x.first; - } -}; - -struct one_or_four { - bool operator()(dummyT x) const { - return x.foo() == 1 || x.foo() == 4; - } -}; - -typedef std::deque storage; -typedef std::deque pointer_deque; -typedef std::set iterator_set; - -template struct foo; - -void blah(int) { } - -struct my_gen -{ - typedef int result_type; - my_gen() : n(0) { } - int operator()() { return ++n; } - int n; -}; - -template -struct ptr_iterator - : boost::iterator_adaptor< - ptr_iterator - , V* - , V - , boost::random_access_traversal_tag -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) - , V& -#endif - > -{ -private: - typedef boost::iterator_adaptor< - ptr_iterator - , V* - , V - , boost::random_access_traversal_tag -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) - , V& -#endif - > super_t; - -public: - ptr_iterator() { } - ptr_iterator(V* d) : super_t(d) { } - - template - ptr_iterator( - const ptr_iterator& x - , typename boost::enable_if_convertible::type* = 0 - ) - : super_t(x.base()) - {} -}; - -// Non-functional iterator for category modification checking -template -struct modify_traversal - : boost::iterator_adaptor< - modify_traversal - , Iter - , boost::use_default - , Traversal - > -{}; - -template -struct fwd_iterator - : boost::iterator_adaptor< - fwd_iterator - , boost::forward_iterator_archetype - > -{ -private: - typedef boost::iterator_adaptor< - fwd_iterator - , boost::forward_iterator_archetype - > super_t; - -public: - fwd_iterator() { } - fwd_iterator(boost::forward_iterator_archetype d) : super_t(d) { } -}; - -template -struct in_iterator - : boost::iterator_adaptor< - in_iterator - , boost::input_iterator_archetype_no_proxy - > -{ -private: - typedef boost::iterator_adaptor< - in_iterator - , boost::input_iterator_archetype_no_proxy - > super_t; - -public: - in_iterator() { } - in_iterator(boost::input_iterator_archetype_no_proxy d) : super_t(d) { } -}; - -template -struct constant_iterator - : boost::iterator_adaptor< - constant_iterator - , Iter - , typename std::iterator_traits::value_type const - > -{ - typedef boost::iterator_adaptor< - constant_iterator - , Iter - , typename std::iterator_traits::value_type const - > base_t; - - constant_iterator() {} - constant_iterator(Iter it) - : base_t(it) {} -}; - -char (& traversal2(boost::incrementable_traversal_tag) )[1]; -char (& traversal2(boost::single_pass_traversal_tag ) )[2]; -char (& traversal2(boost::forward_traversal_tag ) )[3]; -char (& traversal2(boost::bidirectional_traversal_tag) )[4]; -char (& traversal2(boost::random_access_traversal_tag) )[5]; - -template -struct traversal3 -{ - static typename boost::iterator_category_to_traversal::type x; - BOOST_STATIC_CONSTANT(std::size_t, value = sizeof(traversal2(x))); - typedef char (&type)[value]; -}; - -template -typename traversal3::type traversal(Cat); - -template -int static_assert_traversal(Iter* = 0, Trav* = 0) -{ - typedef typename boost::iterator_category_to_traversal< - BOOST_DEDUCED_TYPENAME Iter::iterator_category - >::type t2; - - return static_assert_same::value; -} - -int -main() -{ - dummyT array[] = { dummyT(0), dummyT(1), dummyT(2), - dummyT(3), dummyT(4), dummyT(5) }; - const int N = sizeof(array)/sizeof(dummyT); - - // sanity check, if this doesn't pass the test is buggy - boost::random_access_iterator_test(array, N, array); - - // Test the iterator_adaptor - { - ptr_iterator i(array); - boost::random_access_iterator_test(i, N, array); - - ptr_iterator j(array); - boost::random_access_iterator_test(j, N, array); - boost::const_nonconst_iterator_test(i, ++j); - } - - int test; - // Test the iterator_traits - { - // Test computation of defaults - typedef ptr_iterator Iter1; - // don't use std::iterator_traits here to avoid VC++ problems - test = static_assert_same::value; - test = static_assert_same::value; - test = static_assert_same::value; - test = static_assert_same::value; -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) - BOOST_STATIC_ASSERT((boost::is_convertible::value)); -#endif - } - - { - // Test computation of default when the Value is const - typedef ptr_iterator Iter1; - test = static_assert_same::value; - test = static_assert_same::value; - -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) - BOOST_STATIC_ASSERT(boost::is_readable_iterator::value); -# ifndef BOOST_NO_LVALUE_RETURN_DETECTION - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::value); -# endif -#endif - -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // borland drops constness - test = static_assert_same::value; -#endif - } - - { - // Test constant iterator idiom - typedef ptr_iterator BaseIter; - typedef constant_iterator Iter; - - test = static_assert_same::value; - test = static_assert_same::value; -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // borland drops constness - test = static_assert_same::value; -#endif - -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION - BOOST_STATIC_ASSERT(boost::is_non_const_lvalue_iterator::value); - BOOST_STATIC_ASSERT(boost::is_lvalue_iterator::value); -#endif - - typedef modify_traversal IncrementableIter; - - static_assert_traversal(); - static_assert_traversal(); - } - - // Test the iterator_adaptor - { - ptr_iterator i(array); - boost::random_access_iterator_test(i, N, array); - - ptr_iterator j(array); - boost::random_access_iterator_test(j, N, array); - boost::const_nonconst_iterator_test(i, ++j); - } - - // check operator-> with a forward iterator - { - boost::forward_iterator_archetype forward_iter; - - typedef fwd_iterator adaptor_type; - - adaptor_type i(forward_iter); - int zero = 0; - if (zero) // don't do this, just make sure it compiles - assert((*i).m_x == i->foo()); - } - - // check operator-> with an input iterator - { - boost::input_iterator_archetype_no_proxy input_iter; - typedef in_iterator adaptor_type; - adaptor_type i(input_iter); - int zero = 0; - if (zero) // don't do this, just make sure it compiles - assert((*i).m_x == i->foo()); - } - - // check that base_type is correct - { - // Test constant iterator idiom - typedef ptr_iterator BaseIter; - - test = static_assert_same::value; - test = static_assert_same::base_type,BaseIter>::value; - - typedef modify_traversal IncrementableIter; - - test = static_assert_same::value; - } - - std::cout << "test successful " << std::endl; - (void)test; - return 0; -} diff --git a/test/iterator_archetype_cc.cpp b/test/iterator_archetype_cc.cpp deleted file mode 100644 index 580a32c..0000000 --- a/test/iterator_archetype_cc.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright Thomas Witt 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#include -#include -#include -#include -#include - -int main() -{ - { - typedef boost::iterator_archetype< - int - , boost::iterator_archetypes::readable_iterator_t - , boost::random_access_traversal_tag - > iter; - - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::RandomAccessTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - int - , boost::iterator_archetypes::readable_writable_iterator_t - , boost::random_access_traversal_tag - > iter; - - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::RandomAccessTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - const int // I don't like adding const to Value. It is redundant. -JGS - , boost::iterator_archetypes::readable_lvalue_iterator_t - , boost::random_access_traversal_tag - > iter; - - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::RandomAccessTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - int - , boost::iterator_archetypes::writable_lvalue_iterator_t - , boost::random_access_traversal_tag - > iter; - - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::RandomAccessTraversalConcept >(); - } - - return boost::exit_success; -} - diff --git a/test/iterator_facade.cpp b/test/iterator_facade.cpp deleted file mode 100755 index 871c196..0000000 --- a/test/iterator_facade.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// This is really an incomplete test; should be fleshed out. - -#include -#include -#include - -// This is a really, really limited test so far. All we're doing -// right now is checking that the postfix++ proxy for single-pass -// iterators works properly. -template -class counter_iterator - : public boost::iterator_facade< - counter_iterator - , int const - , boost::single_pass_traversal_tag - , Ref - > -{ - public: - counter_iterator() {} - counter_iterator(int* state) : state(state) {} - - void increment() - { - ++*state; - } - - Ref - dereference() const - { - return *state; - } - - bool equal(counter_iterator const& y) const - { - return *this->state == *y.state; - } - - int* state; -}; - -struct proxy -{ - proxy(int& x) : state(x) {} - - operator int const&() const - { - return state; - } - - int& operator=(int x) { state = x; return state; } - - int& state; -}; - -int main() -{ - int state = 0; - boost::readable_iterator_test(counter_iterator(&state), 0); - state = 3; - boost::readable_iterator_test(counter_iterator(&state), 3); - boost::writable_iterator_test(counter_iterator(&state), 9, 7); - BOOST_ASSERT(state == 8); - return 0; -} diff --git a/test/iterator_traits_test.cpp b/test/iterator_traits_test.cpp deleted file mode 100644 index eed70ff..0000000 --- a/test/iterator_traits_test.cpp +++ /dev/null @@ -1,218 +0,0 @@ -// (C) Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version including documentation. - -// Revision History -// 04 Mar 2001 Patches for Intel C++ (Dave Abrahams) -// 19 Feb 2001 Take advantage of improved iterator_traits to do more tests -// on MSVC. Reordered some #ifdefs for coherency. -// (David Abrahams) -// 13 Feb 2001 Test new VC6 workarounds (David Abrahams) -// 11 Feb 2001 Final fixes for Borland (David Abrahams) -// 11 Feb 2001 Some fixes for Borland get it closer on that compiler -// (David Abrahams) -// 07 Feb 2001 More comprehensive testing; factored out static tests for -// better reuse (David Abrahams) -// 21 Jan 2001 Quick fix to my_iterator, which wasn't returning a -// reference type from operator* (David Abrahams) -// 19 Jan 2001 Initial version with iterator operators (David Abrahams) - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// A UDT for which we can specialize std::iterator_traits on -// compilers which don't support partial specialization. There's no -// other reasonable way to test pointers on those compilers. -struct element {}; - -// An iterator for which we can get traits. -struct my_iterator1 - : boost::forward_iterator_helper -{ - my_iterator1(const char* p) : m_p(p) {} - - bool operator==(const my_iterator1& rhs) const - { return this->m_p == rhs.m_p; } - - my_iterator1& operator++() { ++this->m_p; return *this; } - const char& operator*() { return *m_p; } - private: - const char* m_p; -}; - -// Used to prove that we don't require std::iterator<> in the hierarchy under -// MSVC6, and that we can compute all the traits for a standard-conforming UDT -// iterator. -struct my_iterator2 - : boost::equality_comparable > > -{ - typedef char value_type; - typedef long difference_type; - typedef const char* pointer; - typedef const char& reference; - typedef std::forward_iterator_tag iterator_category; - - my_iterator2(const char* p) : m_p(p) {} - - bool operator==(const my_iterator2& rhs) const - { return this->m_p == rhs.m_p; } - - my_iterator2& operator++() { ++this->m_p; return *this; } - const char& operator*() { return *m_p; } - private: - const char* m_p; -}; - -// Used to prove that we're not overly confused by the existence of -// std::iterator<> in the hierarchy under MSVC6 - we should find that -// boost::detail::iterator_traits::difference_type is int. -struct my_iterator3 : my_iterator1 -{ - typedef int difference_type; - my_iterator3(const char* p) - : my_iterator1(p) {} -}; - -// -// Assertion tools. Used instead of BOOST_STATIC_ASSERT because that -// doesn't give us a nice stack backtrace -// -template struct assertion; - -template <> struct assertion -{ - typedef char type; -}; - -template -struct assert_same - : assertion<(::boost::is_same::value)> -{ -}; - - -// Iterator tests -template -struct non_portable_tests -{ - typedef typename boost::detail::iterator_traits::pointer test_pt; - typedef typename boost::detail::iterator_traits::reference test_rt; - typedef typename assert_same::type a1; - typedef typename assert_same::type a2; -}; - -template -struct portable_tests -{ - typedef typename boost::detail::iterator_traits::difference_type test_dt; - typedef typename boost::detail::iterator_traits::iterator_category test_cat; - typedef typename assert_same::type a1; - typedef typename assert_same::type a2; -}; - -// Test iterator_traits -template -struct input_iterator_test - : portable_tests -{ - typedef typename boost::detail::iterator_traits::value_type test_vt; - typedef typename assert_same::type a1; -}; - -template -struct non_pointer_test - : input_iterator_test - , non_portable_tests -{ -}; - -template -struct maybe_pointer_test - : portable_tests - , non_portable_tests -{ -}; - -input_iterator_test, int, std::ptrdiff_t, int*, int&, std::input_iterator_tag> - istream_iterator_test; - -#if defined(__BORLANDC__) && !defined(__SGI_STL_PORT) -typedef ::std::char_traits::off_type distance; -non_pointer_test,int, - distance,int*,int&,std::output_iterator_tag> ostream_iterator_test; -#elif defined(BOOST_MSVC_STD_ITERATOR) -non_pointer_test, - int, void, int*, int&, std::output_iterator_tag> - ostream_iterator_test; -#elif BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(70190006)) -non_pointer_test, - int, long, int*, int&, std::output_iterator_tag> - ostream_iterator_test; -#else -non_pointer_test, - void, void, void, void, std::output_iterator_tag> - ostream_iterator_test; -#endif - - -#ifdef __KCC - typedef long std_list_diff_type; -#else - typedef std::ptrdiff_t std_list_diff_type; -#endif - -non_pointer_test::iterator, int, std_list_diff_type, int*, int&, std::bidirectional_iterator_tag> - list_iterator_test; - -maybe_pointer_test::iterator, int, std::ptrdiff_t, int*, int&, std::random_access_iterator_tag> - vector_iterator_test; - -maybe_pointer_test - int_pointer_test; - -non_pointer_test - my_iterator1_test; - -non_pointer_test - my_iterator2_test; - -non_pointer_test - my_iterator3_test; - -int main() -{ - char chars[100]; - int ints[100]; - - for (int length = 3; length < 100; length += length / 3) - { - std::list l(length); - assert(boost::detail::distance(l.begin(), l.end()) == length); - - std::vector v(length); - assert(boost::detail::distance(v.begin(), v.end()) == length); - - assert(boost::detail::distance(&ints[0], ints + length) == length); - assert(boost::detail::distance(my_iterator1(chars), my_iterator1(chars + length)) == length); - assert(boost::detail::distance(my_iterator2(chars), my_iterator2(chars + length)) == length); - assert(boost::detail::distance(my_iterator3(chars), my_iterator3(chars + length)) == length); - } - return 0; -} diff --git a/test/lvalue_concept_fail.cpp b/test/lvalue_concept_fail.cpp deleted file mode 100644 index 735bb4a..0000000 --- a/test/lvalue_concept_fail.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (C) 2004 Jeremy Siek -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -int main() -{ - typedef boost::iterator_archetype< - int - , boost::iterator_archetypes::readable_iterator_t - , boost::single_pass_traversal_tag - > Iter; - boost::function_requires< - boost_concepts::LvalueIteratorConcept >(); - return boost::exit_success; -} diff --git a/test/permutation_iterator_test.cpp b/test/permutation_iterator_test.cpp deleted file mode 100644 index af748a9..0000000 --- a/test/permutation_iterator_test.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// (C) Copyright Toon Knapen 2001. -// (C) Copyright Roland Richter 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -#include -#include - -#include -#include - -#include - - -void permutation_test() -{ - // Example taken from documentation of old permutation_iterator. - typedef std::vector< double > element_range_type; - typedef std::list< int > index_type; - - const int element_range_size = 10; - const int index_size = 7; - - BOOST_STATIC_ASSERT(index_size <= element_range_size); - element_range_type elements( element_range_size ); - for( element_range_type::iterator el_it = elements.begin(); el_it != elements.end(); ++el_it ) - { *el_it = std::distance(elements.begin(), el_it); } - - index_type indices( index_size ); - for( index_type::iterator i_it = indices.begin(); i_it != indices.end(); ++i_it ) - { *i_it = element_range_size - index_size + std::distance(indices.begin(), i_it); } - std::reverse( indices.begin(), indices.end() ); - - typedef boost::permutation_iterator< element_range_type::iterator, index_type::iterator > permutation_type; - permutation_type begin = boost::make_permutation_iterator( elements.begin(), indices.begin() ); - permutation_type it = begin; - permutation_type end = boost::make_permutation_iterator( elements.begin(), indices.end() ); - - BOOST_CHECK( it == begin ); - BOOST_CHECK( it != end ); - - BOOST_CHECK( std::distance( begin, end ) == index_size ); - - for( index_type::iterator i_it1 = indices.begin(); it != end; ++i_it1, ++it ) - { - BOOST_CHECK( *it == elements[ *i_it1 ] ); - } - - it = begin; - for( int i1 = 0; i1 < index_size - 1 ; ++++i1, ++++it ) - { - index_type::iterator i_it2 = indices.begin(); - std::advance( i_it2, i1 ); - BOOST_CHECK( *it == elements[ *i_it2 ] ); - } - - it = begin; - std::advance(it, index_size); - for( index_type::iterator i_it3 = indices.end(); it != begin; ) - { - BOOST_CHECK( *--it == elements[ *--i_it3 ] ); - } - - it = begin; - std::advance(it, index_size); - for( int i2 = 0; i2 < index_size - 1; i2+=2, --it ) - { - index_type::iterator i_it4 = --indices.end(); - std::advance( i_it4, -i2 ); - BOOST_CHECK( *--it == elements[ *i_it4 ] ); - } - -} - - -int test_main(int, char *[]) -{ - permutation_test(); - return 0; -} diff --git a/test/pointee.cpp b/test/pointee.cpp deleted file mode 100755 index b39fce1..0000000 --- a/test/pointee.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright David Abrahams 2004. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include "static_assert_same.hpp" -#include -#include - -template -struct proxy_ptr -{ - typedef T element_type; - struct proxy - { - operator Ref() const; - }; - proxy operator*() const; -}; - -template -struct proxy_ref_ptr : proxy_ptr -{ -}; - -template -struct proxy_value_ptr : proxy_ptr -{ - typedef typename boost::add_const::type element_type; -}; - -struct X { - template X(T const&); - template operator T&() const; -}; - -BOOST_TT_BROKEN_COMPILER_SPEC(X) - -int main() -{ - STATIC_ASSERT_SAME(boost::pointee >::type, int); - STATIC_ASSERT_SAME(boost::pointee >::type, X); - - STATIC_ASSERT_SAME(boost::pointee >::type, int const); - STATIC_ASSERT_SAME(boost::pointee >::type, X const); - - STATIC_ASSERT_SAME(boost::pointee >::type, int const); - STATIC_ASSERT_SAME(boost::pointee >::type, X const); - - STATIC_ASSERT_SAME(boost::pointee >::type, int const); - STATIC_ASSERT_SAME(boost::pointee >::type, X const); - - STATIC_ASSERT_SAME(boost::pointee::type, int); - STATIC_ASSERT_SAME(boost::pointee::type, int const); - - STATIC_ASSERT_SAME(boost::pointee::type, X); - STATIC_ASSERT_SAME(boost::pointee::type, X const); - - STATIC_ASSERT_SAME(boost::pointee >::type, int); - STATIC_ASSERT_SAME(boost::pointee >::type, X); - - STATIC_ASSERT_SAME(boost::pointee >::type, int const); - STATIC_ASSERT_SAME(boost::pointee >::type, X const); - - STATIC_ASSERT_SAME(boost::pointee::iterator >::type, int); - STATIC_ASSERT_SAME(boost::pointee::iterator >::type, X); - - STATIC_ASSERT_SAME(boost::pointee::const_iterator >::type, int const); - STATIC_ASSERT_SAME(boost::pointee::const_iterator >::type, X const); - return 0; -} diff --git a/test/reverse_iterator_test.cpp b/test/reverse_iterator_test.cpp deleted file mode 100644 index 0404fed..0000000 --- a/test/reverse_iterator_test.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright Thomas Witt 2003, Jeremy Siek 2004. - -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using boost::dummyT; - -// Test reverse iterator -int main() -{ - dummyT array[] = { dummyT(0), dummyT(1), dummyT(2), - dummyT(3), dummyT(4), dummyT(5) }; - const int N = sizeof(array)/sizeof(dummyT); - - // Concept checks - // Adapting old-style iterators - { - typedef boost::reverse_iterator > Iter; - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::reverse_iterator > Iter; - boost::function_requires< boost::Mutable_BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - // Adapting new-style iterators - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_iterator_t - , boost::bidirectional_traversal_tag - > iter; - typedef boost::reverse_iterator Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } -#if 0 - // It does not seem feasible to make this work. Need to change docs to - // require at lease Readable for the base iterator. -Jeremy - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::writable_iterator_t - , boost::bidirectional_traversal_tag - > iter; - typedef boost::reverse_iterator Iter; - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } -#endif -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) // Causes Internal Error in linker. - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::readable_writable_iterator_t - , boost::bidirectional_traversal_tag - > iter; - typedef boost::reverse_iterator Iter; - boost::function_requires< boost::InputIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - const dummyT - , boost::iterator_archetypes::readable_lvalue_iterator_t - , boost::bidirectional_traversal_tag - > iter; - typedef boost::reverse_iterator Iter; - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::ReadableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } - { - typedef boost::iterator_archetype< - dummyT - , boost::iterator_archetypes::writable_lvalue_iterator_t - , boost::bidirectional_traversal_tag - > iter; - typedef boost::reverse_iterator Iter; - boost::function_requires< boost::BidirectionalIteratorConcept >(); - boost::function_requires< boost_concepts::WritableIteratorConcept >(); - boost::function_requires< boost_concepts::LvalueIteratorConcept >(); - boost::function_requires< boost_concepts::BidirectionalTraversalConcept >(); - } -#endif - - // Test reverse_iterator - { - dummyT reversed[N]; - std::copy(array, array + N, reversed); - std::reverse(reversed, reversed + N); - - typedef boost::reverse_iterator reverse_iterator; - - reverse_iterator i(reversed + N); - boost::random_access_iterator_test(i, N, array); - - boost::random_access_iterator_test(boost::make_reverse_iterator(reversed + N), N, array); - - typedef boost::reverse_iterator const_reverse_iterator; - - const_reverse_iterator j(reversed + N); - boost::random_access_iterator_test(j, N, array); - - const dummyT* const_reversed = reversed; - - boost::random_access_iterator_test(boost::make_reverse_iterator(const_reversed + N), N, array); - - boost::const_nonconst_iterator_test(i, ++j); - } - - // Test reverse_iterator again, with traits fully deducible on all platforms - { - std::deque reversed_container; - std::reverse_copy(array, array + N, std::back_inserter(reversed_container)); - const std::deque::iterator reversed = reversed_container.begin(); - - - typedef boost::reverse_iterator< - std::deque::iterator> reverse_iterator; - typedef boost::reverse_iterator< - std::deque::const_iterator> const_reverse_iterator; - - // MSVC/STLport gives an INTERNAL COMPILER ERROR when any computation - // (e.g. "reversed + N") is used in the constructor below. - const std::deque::iterator finish = reversed_container.end(); - reverse_iterator i(finish); - - boost::random_access_iterator_test(i, N, array); - boost::random_access_iterator_test(boost::make_reverse_iterator(reversed + N), N, array); - - const_reverse_iterator j = reverse_iterator(finish); - boost::random_access_iterator_test(j, N, array); - - const std::deque::const_iterator const_reversed = reversed; - boost::random_access_iterator_test(boost::make_reverse_iterator(const_reversed + N), N, array); - - // Many compilers' builtin deque iterators don't interoperate well, though - // STLport fixes that problem. -#if defined(__SGI_STL_PORT) \ - || !BOOST_WORKAROUND(__GNUC__, <= 2) \ - && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 1)) \ - && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) \ - && !BOOST_WORKAROUND(__LIBCOMO_VERSION__, BOOST_TESTED_AT(29)) \ - && !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 1) - - boost::const_nonconst_iterator_test(i, ++j); - -#endif - } - - std::cout << "test successful " << std::endl; - return boost::exit_success; -} diff --git a/test/static_assert_same.hpp b/test/static_assert_same.hpp deleted file mode 100644 index 6df0506..0000000 --- a/test/static_assert_same.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef STATIC_ASSERT_SAME_DWA2003530_HPP -# define STATIC_ASSERT_SAME_DWA2003530_HPP - -#include -# include - -#define STATIC_ASSERT_SAME( T1,T2 ) BOOST_MPL_ASSERT((::boost::is_same< T1, T2 >)) - -template -struct static_assert_same -{ - BOOST_MPL_ASSERT((::boost::is_same< T1, T2 >)); - enum { value = 1 }; -}; - -#endif // STATIC_ASSERT_SAME_DWA2003530_HPP diff --git a/test/transform_iterator_test.cpp b/test/transform_iterator_test.cpp deleted file mode 100644 index feca9a0..0000000 --- a/test/transform_iterator_test.cpp +++ /dev/null @@ -1,248 +0,0 @@ -// (C) Copyright Jeremy Siek 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Revision History -// 22 Nov 2002 Thomas Witt -// Added interoperability check. -// 28 Oct 2002 Jeremy Siek -// Updated for new iterator adaptors. -// 08 Mar 2001 Jeremy Siek -// Moved test of transform iterator into its own file. It to -// to be in iterator_adaptor_test.cpp. - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -namespace boost { namespace detail -{ - template<> struct function_object_result - { - typedef int type; - }; -}} -#endif - -struct mult_functor { - // Functors used with transform_iterator must be - // DefaultConstructible, as the transform_iterator must be - // DefaultConstructible to satisfy the requirements for - // TrivialIterator. - mult_functor() { } - mult_functor(int aa) : a(aa) { } - int operator()(int b) const { return a * b; } - int a; -}; - -struct adaptable_mult_functor - : mult_functor -{ - typedef int result_type; - typedef int argument_type; - // Functors used with transform_iterator must be - // DefaultConstructible, as the transform_iterator must be - // DefaultConstructible to satisfy the requirements for - // TrivialIterator. - adaptable_mult_functor() { } - adaptable_mult_functor(int aa) : mult_functor(aa) { } -}; - - -struct const_select_first -{ - typedef int const& result_type; - - int const& operator()(std::pairconst& p) const - { - return p.first; - } -}; - -struct select_first - : const_select_first // derivation to allow conversions -{ - typedef int& result_type; - - int& operator()(std::pair& p) const - { - return p.first; - } -}; - -struct select_second -{ - typedef int& result_type; - - int& operator()(std::pair& p) const - { - return p.second; - } -}; - -struct value_select_first -{ - typedef int result_type; - - int operator()(std::pairconst& p) const - { - return p.first; - } -}; - -int mult_2(int arg) -{ - return arg*2; -} - - -int -main() -{ - const int N = 10; - - // Concept checks - { - typedef boost::transform_iterator iter_t; - typedef boost::transform_iterator c_iter_t; - - boost::function_requires< boost_concepts::InteroperableIteratorConcept >(); - } - - // Test transform_iterator - { - int x[N], y[N]; - for (int k = 0; k < N; ++k) - x[k] = k; - std::copy(x, x + N, y); - - for (int k2 = 0; k2 < N; ++k2) - x[k2] = x[k2] * 2; - - typedef boost::transform_iterator iter_t; - iter_t i(y, adaptable_mult_functor(2)); - boost::input_iterator_test(i, x[0], x[1]); - boost::input_iterator_test(iter_t(&y[0], adaptable_mult_functor(2)), x[0], x[1]); - - boost::random_access_readable_iterator_test(i, N, x); - } - - // Test transform_iterator non adaptable functor - { - int x[N], y[N]; - for (int k = 0; k < N; ++k) - x[k] = k; - std::copy(x, x + N, y); - - for (int k2 = 0; k2 < N; ++k2) - x[k2] = x[k2] * 2; - - typedef boost::transform_iterator iter_t; - iter_t i(y, mult_functor(2)); - boost::input_iterator_test(i, x[0], x[1]); - boost::input_iterator_test(iter_t(&y[0], mult_functor(2)), x[0], x[1]); - - boost::random_access_readable_iterator_test(i, N, x); - } - - // Test transform_iterator default argument handling - { - { - typedef boost::transform_iterator iter_t; - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - } - - { - typedef boost::transform_iterator iter_t; - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - } - - { - typedef boost::transform_iterator iter_t; - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - } - } - - // Test transform_iterator with function pointers - { - int x[N], y[N]; - for (int k = 0; k < N; ++k) - x[k] = k; - std::copy(x, x + N, y); - - for (int k2 = 0; k2 < N; ++k2) - x[k2] = x[k2] * 2; - - boost::input_iterator_test( - boost::make_transform_iterator(y, mult_2), x[0], x[1]); - - boost::input_iterator_test( - boost::make_transform_iterator(&y[0], mult_2), x[0], x[1]); - - boost::random_access_readable_iterator_test( - boost::make_transform_iterator(y, mult_2), N, x); - - } - - // Test transform_iterator as projection iterator - { - typedef std::pair pair_t; - - int x[N]; - int y[N]; - pair_t values[N]; - - for(int i = 0; i < N; ++i) { - - x[i] = i; - y[i] = N - (i + 1); - - } - - std::copy( - x - , x + N - , boost::make_transform_iterator((pair_t*)values, select_first()) - ); - - std::copy( - y - , y + N - , boost::make_transform_iterator((pair_t*)values, select_second()) - ); - - boost::random_access_readable_iterator_test( - boost::make_transform_iterator((pair_t*)values, value_select_first()) - , N - , x - ); - - boost::random_access_readable_iterator_test( - boost::make_transform_iterator((pair_t*)values, const_select_first()) - , N, x - ); - - boost::constant_lvalue_iterator_test( - boost::make_transform_iterator((pair_t*)values, const_select_first()), x[0]); - - boost::non_const_lvalue_iterator_test( - boost::make_transform_iterator((pair_t*)values, select_first()), x[0], 17); - - boost::const_nonconst_iterator_test( - ++boost::make_transform_iterator((pair_t*)values, select_first()) - , boost::make_transform_iterator((pair_t*)values, const_select_first()) - ); - } - - return 0; -} diff --git a/test/unit_tests.cpp b/test/unit_tests.cpp deleted file mode 100644 index 2434310..0000000 --- a/test/unit_tests.cpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include -#include - -#include "static_assert_same.hpp" - -#include - -#include - -struct X { int a; }; - -BOOST_TT_BROKEN_COMPILER_SPEC(X) - -struct Xiter : boost::iterator_adaptor -{ - Xiter(); - Xiter(X* p) : boost::iterator_adaptor(p) {} -}; - -void take_xptr(X*) {} -void operator_arrow_test() -{ - // check that the operator-> result is a pointer for lvalue iterators - X x; - take_xptr(Xiter(&x).operator->()); -} - -template -struct static_assert_min_cat - : static_assert_same< - typename boost::detail::minimum_category::type, Min - > -{}; - -void category_test() -{ - using namespace boost; - using namespace boost::detail; - - BOOST_STATIC_ASSERT(( - !boost::is_convertible< - std::input_iterator_tag - , input_output_iterator_tag>::value)); - - BOOST_STATIC_ASSERT(( - !boost::is_convertible< - std::output_iterator_tag - , input_output_iterator_tag>::value)); - - BOOST_STATIC_ASSERT(( - boost::is_convertible< - input_output_iterator_tag - , std::input_iterator_tag>::value)); - - BOOST_STATIC_ASSERT(( - boost::is_convertible< - input_output_iterator_tag - , std::output_iterator_tag>::value)); - -#if 0 // This seems wrong; we're not advertising - // input_output_iterator_tag are we? - BOOST_STATIC_ASSERT(( - boost::is_convertible< - std::forward_iterator_tag - , input_output_iterator_tag>::value)); -#endif - - int test = static_assert_min_cat< - std::input_iterator_tag,input_output_iterator_tag, std::input_iterator_tag - >::value; - - test = static_assert_min_cat< - input_output_iterator_tag,std::input_iterator_tag, std::input_iterator_tag - >::value; - -#if 0 - test = static_assert_min_cat< - input_output_iterator_tag,std::forward_iterator_tag, input_output_iterator_tag - >::value; -#endif - - test = static_assert_min_cat< - std::input_iterator_tag,std::forward_iterator_tag, std::input_iterator_tag - >::value; - - test = static_assert_min_cat< - std::input_iterator_tag,std::random_access_iterator_tag, std::input_iterator_tag - >::value; - -#if 0 // This would be wrong: a random access iterator is not - // neccessarily writable, as is an output iterator. - test = static_assert_min_cat< - std::output_iterator_tag,std::random_access_iterator_tag, std::output_iterator_tag - >::value; -#endif - - (void)test; -} - -int main() -{ - category_test(); - operator_arrow_test(); - return 0; -} - diff --git a/test/zip_iterator_test.cpp b/test/zip_iterator_test.cpp deleted file mode 100755 index 0e98b7d..0000000 --- a/test/zip_iterator_test.cpp +++ /dev/null @@ -1,834 +0,0 @@ -// (C) Copyright Dave Abrahams and Thomas Becker 2003. Permission to -// copy, use, modify, sell and distribute this software is granted -// provided this copyright notice appears in all copies. This software -// is provided "as is" without express or implied warranty, and with -// no claim as to its suitability for any purpose. -// - -// File: -// ===== -// zip_iterator_test_main.cpp - -// Author: -// ======= -// Thomas Becker - -// Created: -// ======== -// Jul 15, 2003 - -// Purpose: -// ======== -// Test driver for zip_iterator.hpp - -// Compilers Tested: -// ================= -// Metrowerks Codewarrior Pro 7.2, 8.3 -// gcc 2.95.3 -// gcc 3.2 -// Microsoft VC 6sp5 (test fails due to some compiler bug) -// Microsoft VC 7 (works) -// Microsoft VC 7.1 -// Intel 5 -// Intel 6 -// Intel 7.1 -// Intel 8 -// Borland 5.5.1 (broken due to lack of support from Boost.Tuples) - -///////////////////////////////////////////////////////////////////////////// -// -// Includes -// -///////////////////////////////////////////////////////////////////////////// - -#include -#include // 2nd #include tests #include guard. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -struct pure_traversal - : boost::detail::pure_traversal_tag< - typename boost::iterator_traversal::type - > -{}; - -///////////////////////////////////////////////////////////////////////////// -// -// Das Main Funktion -// -///////////////////////////////////////////////////////////////////////////// - -int main( void ) -{ - - std::cout << "\n" - << "***********************************************\n" - << "* *\n" - << "* Test driver for boost::zip_iterator *\n" - << "* Copyright Thomas Becker 2003 *\n" - << "* *\n" - << "***********************************************\n\n" - << std::flush; - - size_t num_successful_tests = 0; - size_t num_failed_tests = 0; - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator construction and dereferencing - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator construction and dereferencing: " - << std::flush; - - std::vector vect1(3); - vect1[0] = 42.; - vect1[1] = 43.; - vect1[2] = 44.; - - std::set intset; - intset.insert(52); - intset.insert(53); - intset.insert(54); - // - - typedef - boost::zip_iterator< - boost::tuples::tuple< - std::set::iterator - , std::vector::iterator - > - > zit_mixed; - - zit_mixed zip_it_mixed = zit_mixed( - boost::make_tuple( - intset.begin() - , vect1.begin() - ) - ); - - boost::tuples::tuple val_tuple( - *zip_it_mixed); - - boost::tuples::tuple ref_tuple( - *zip_it_mixed); - - double dblOldVal = boost::tuples::get<1>(ref_tuple); - boost::tuples::get<1>(ref_tuple) -= 41.; - - if( 52 == boost::tuples::get<0>(val_tuple) && - 42. == boost::tuples::get<1>(val_tuple) && - 52 == boost::tuples::get<0>(ref_tuple) && - 1. == boost::tuples::get<1>(ref_tuple) && - 1. == *vect1.begin() - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - // Undo change to vect1 - boost::tuples::get<1>(ref_tuple) = dblOldVal; - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator with 12 components - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterators with 12 components: " - << std::flush; - - // Declare 12 containers - // - std::list li1; - li1.push_back(1); - std::set se1; - se1.insert(2); - std::vector ve1; - ve1.push_back(3); - // - std::list li2; - li2.push_back(4); - std::set se2; - se2.insert(5); - std::vector ve2; - ve2.push_back(6); - // - std::list li3; - li3.push_back(7); - std::set se3; - se3.insert(8); - std::vector ve3; - ve3.push_back(9); - // - std::list li4; - li4.push_back(10); - std::set se4; - se4.insert(11); - std::vector ve4; - ve4.push_back(12); - - // typedefs for cons lists of iterators. - typedef boost::tuples::cons< - std::set::iterator, - boost::tuples::tuple< - std::vector::iterator, - std::list::iterator, - std::set::iterator, - std::vector::iterator, - std::list::iterator, - std::set::iterator, - std::vector::iterator, - std::list::iterator, - std::set::iterator, - std::vector::const_iterator - >::inherited - > cons_11_its_type; - // - typedef boost::tuples::cons< - std::list::const_iterator, - cons_11_its_type - > cons_12_its_type; - - // typedefs for cons lists for dereferencing the zip iterator - // made from the cons list above. - typedef boost::tuples::cons< - const int&, - boost::tuples::tuple< - int&, - int&, - const int&, - int&, - int&, - const int&, - int&, - int&, - const int&, - const int& - >::inherited - > cons_11_refs_type; - // - typedef boost::tuples::cons< - const int&, - cons_11_refs_type - > cons_12_refs_type; - - // typedef for zip iterator with 12 elements - typedef boost::zip_iterator zip_it_12_type; - - // Declare a 12-element zip iterator. - zip_it_12_type zip_it_12( - cons_12_its_type( - li1.begin(), - cons_11_its_type( - se1.begin(), - boost::make_tuple( - ve1.begin(), - li2.begin(), - se2.begin(), - ve2.begin(), - li3.begin(), - se3.begin(), - ve3.begin(), - li4.begin(), - se4.begin(), - ve4.begin() - ) - ) - ) - ); - - // Dereference, mess with the result a little. - cons_12_refs_type zip_it_12_dereferenced(*zip_it_12); - boost::tuples::get<9>(zip_it_12_dereferenced) = 42; - - // Make a copy and move it a little to force some instantiations. - zip_it_12_type zip_it_12_copy(zip_it_12); - ++zip_it_12_copy; - - if( boost::tuples::get<11>(zip_it_12.get_iterator_tuple()) == ve4.begin() && - boost::tuples::get<11>(zip_it_12_copy.get_iterator_tuple()) == ve4.end() && - 1 == boost::tuples::get<0>(zip_it_12_dereferenced) && - 12 == boost::tuples::get<11>(zip_it_12_dereferenced) && - 42 == *(li4.begin()) - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator incrementing and dereferencing - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator ++ and *: " - << std::flush; - - std::vector vect2(3); - vect2[0] = 2.2; - vect2[1] = 3.3; - vect2[2] = 4.4; - - boost::zip_iterator< - boost::tuples::tuple< - std::vector::const_iterator, - std::vector::const_iterator - > - > - zip_it_begin( - boost::make_tuple( - vect1.begin(), - vect2.begin() - ) - ); - - boost::zip_iterator< - boost::tuples::tuple< - std::vector::const_iterator, - std::vector::const_iterator - > - > - zip_it_run( - boost::make_tuple( - vect1.begin(), - vect2.begin() - ) - ); - - boost::zip_iterator< - boost::tuples::tuple< - std::vector::const_iterator, - std::vector::const_iterator - > - > - zip_it_end( - boost::make_tuple( - vect1.end(), - vect2.end() - ) - ); - - if( zip_it_run == zip_it_begin && - 42. == boost::tuples::get<0>(*zip_it_run) && - 2.2 == boost::tuples::get<1>(*zip_it_run) && - 43. == boost::tuples::get<0>(*(++zip_it_run)) && - 3.3 == boost::tuples::get<1>(*zip_it_run) && - 44. == boost::tuples::get<0>(*(++zip_it_run)) && - 4.4 == boost::tuples::get<1>(*zip_it_run) && - zip_it_end == ++zip_it_run - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator decrementing and dereferencing - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator -- and *: " - << std::flush; - - if( zip_it_run == zip_it_end && - zip_it_end == zip_it_run-- && - 44. == boost::tuples::get<0>(*zip_it_run) && - 4.4 == boost::tuples::get<1>(*zip_it_run) && - 43. == boost::tuples::get<0>(*(--zip_it_run)) && - 3.3 == boost::tuples::get<1>(*zip_it_run) && - 42. == boost::tuples::get<0>(*(--zip_it_run)) && - 2.2 == boost::tuples::get<1>(*zip_it_run) && - zip_it_begin == zip_it_run - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator copy construction and equality - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator copy construction and equality: " - << std::flush; - - boost::zip_iterator< - boost::tuples::tuple< - std::vector::const_iterator, - std::vector::const_iterator - > - > zip_it_run_copy(zip_it_run); - - if(zip_it_run == zip_it_run && zip_it_run == zip_it_run_copy) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator inequality - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator inequality: " - << std::flush; - - if(!(zip_it_run != zip_it_run_copy) && zip_it_run != ++zip_it_run_copy) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator less than - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator less than: " - << std::flush; - - // Note: zip_it_run_copy == zip_it_run + 1 - // - if( zip_it_run < zip_it_run_copy && - !( zip_it_run < --zip_it_run_copy) && - zip_it_run == zip_it_run_copy - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator less than or equal - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "zip iterator less than or equal: " - << std::flush; - - // Note: zip_it_run_copy == zip_it_run - // - ++zip_it_run; - zip_it_run_copy += 2; - - if( zip_it_run <= zip_it_run_copy && - zip_it_run <= --zip_it_run_copy && - !( zip_it_run <= --zip_it_run_copy) && - zip_it_run <= zip_it_run - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator greater than - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator greater than: " - << std::flush; - - // Note: zip_it_run_copy == zip_it_run - 1 - // - if( zip_it_run > zip_it_run_copy && - !( zip_it_run > ++zip_it_run_copy) && - zip_it_run == zip_it_run_copy - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator greater than or equal - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator greater than or equal: " - << std::flush; - - ++zip_it_run; - - // Note: zip_it_run == zip_it_run_copy + 1 - // - if( zip_it_run >= zip_it_run_copy && - --zip_it_run >= zip_it_run_copy && - ! (zip_it_run >= ++zip_it_run_copy) - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator + int - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator + int: " - << std::flush; - - // Note: zip_it_run == zip_it_run_copy - 1 - // - zip_it_run = zip_it_run + 2; - ++zip_it_run_copy; - - if( zip_it_run == zip_it_run_copy && zip_it_run == zip_it_begin + 3 ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator - int - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator - int: " - << std::flush; - - // Note: zip_it_run == zip_it_run_copy, and both are at end position - // - zip_it_run = zip_it_run - 2; - --zip_it_run_copy; - --zip_it_run_copy; - - if( zip_it_run == zip_it_run_copy && (zip_it_run - 1) == zip_it_begin ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator += - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator +=: " - << std::flush; - - // Note: zip_it_run == zip_it_run_copy, and both are at begin + 1 - // - zip_it_run += 2; - if( zip_it_run == zip_it_begin + 3 ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator -= - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator -=: " - << std::flush; - - // Note: zip_it_run is at end position, zip_it_run_copy is at - // begin plus one. - // - zip_it_run -= 2; - if( zip_it_run == zip_it_run_copy ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator getting member iterators - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator member iterators: " - << std::flush; - - // Note: zip_it_run and zip_it_run_copy are both at - // begin plus one. - // - if( boost::tuples::get<0>(zip_it_run.get_iterator_tuple()) == vect1.begin() + 1 && - boost::tuples::get<1>(zip_it_run.get_iterator_tuple()) == vect2.begin() + 1 - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Making zip iterators - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Making zip iterators: " - << std::flush; - - std::vector > - vect_of_tuples(3); - - std::copy( - boost::make_zip_iterator( - boost::make_tuple( - vect1.begin(), - vect2.begin() - ) - ), - boost::make_zip_iterator( - boost::make_tuple( - vect1.end(), - vect2.end() - ) - ), - vect_of_tuples.begin() - ); - - if( 42. == boost::tuples::get<0>(*vect_of_tuples.begin()) && - 2.2 == boost::tuples::get<1>(*vect_of_tuples.begin()) && - 43. == boost::tuples::get<0>(*(vect_of_tuples.begin() + 1)) && - 3.3 == boost::tuples::get<1>(*(vect_of_tuples.begin() + 1)) && - 44. == boost::tuples::get<0>(*(vect_of_tuples.begin() + 2)) && - 4.4 == boost::tuples::get<1>(*(vect_of_tuples.begin() + 2)) - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator non-const --> const conversion - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator non-const to const conversion: " - << std::flush; - - boost::zip_iterator< - boost::tuples::tuple< - std::set::const_iterator, - std::vector::const_iterator - > - > - zip_it_const( - boost::make_tuple( - intset.begin(), - vect2.begin() - ) - ); - // - boost::zip_iterator< - boost::tuples::tuple< - std::set::iterator, - std::vector::const_iterator - > - > - zip_it_half_const( - boost::make_tuple( - intset.begin(), - vect2.begin() - ) - ); - // - boost::zip_iterator< - boost::tuples::tuple< - std::set::iterator, - std::vector::iterator - > - > - zip_it_non_const( - boost::make_tuple( - intset.begin(), - vect2.begin() - ) - ); - - zip_it_half_const = ++zip_it_non_const; - zip_it_const = zip_it_half_const; - ++zip_it_const; -// zip_it_non_const = ++zip_it_const; // Error: can't convert from const to non-const - - if( 54 == boost::tuples::get<0>(*zip_it_const) && - 4.4 == boost::tuples::get<1>(*zip_it_const) && - 53 == boost::tuples::get<0>(*zip_it_half_const) && - 3.3 == boost::tuples::get<1>(*zip_it_half_const) - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - - ///////////////////////////////////////////////////////////////////////////// - // - // Zip iterator categories - // - ///////////////////////////////////////////////////////////////////////////// - - std::cout << "Zip iterator categories: " - << std::flush; - - // The big iterator of the previous test has vector, list, and set iterators. - // Therefore, it must be bidirectional, but not random access. - bool bBigItIsBidirectionalIterator = boost::is_convertible< - boost::iterator_traversal::type - , boost::bidirectional_traversal_tag - >::value; - - bool bBigItIsRandomAccessIterator = boost::is_convertible< - boost::iterator_traversal::type - , boost::random_access_traversal_tag - >::value; - - // A combining iterator with all vector iterators must have random access - // traversal. - // - typedef boost::zip_iterator< - boost::tuples::tuple< - std::vector::const_iterator, - std::vector::const_iterator - > - > all_vects_type; - - bool bAllVectsIsRandomAccessIterator = boost::is_convertible< - boost::iterator_traversal::type - , boost::random_access_traversal_tag - >::value; - - // The big test. - if( bBigItIsBidirectionalIterator && - ! bBigItIsRandomAccessIterator && - bAllVectsIsRandomAccessIterator - ) - { - ++num_successful_tests; - std::cout << "OK" << std::endl; - } - else - { - ++num_failed_tests = 0; - std::cout << "not OK" << std::endl; - } - - // Done - // - std::cout << "\nTest Result:" - << "\n============" - << "\nNumber of successful tests: " << static_cast(num_successful_tests) - << "\nNumber of failed tests: " << static_cast(num_failed_tests) - << std::endl; - - return num_failed_tests; -} -