diff --git a/doc/facade-and-adaptor.rst b/doc/facade-and-adaptor.rst index afd1cc0..33331fd 100755 --- a/doc/facade-and-adaptor.rst +++ b/doc/facade-and-adaptor.rst @@ -268,13 +268,14 @@ 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. + .. This is no long uptodate -thw + ``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[]`` ================ @@ -411,7 +412,8 @@ Header ```` synopsis [lib.iterator.helper.synopsis] template < class Derived , class Value - , class Category + , class AccessCategory + , class TraversalCategory , class Reference = Value& , class Difference = ptrdiff_t > @@ -475,7 +477,8 @@ Class template ``iterator_facade`` template < class Derived , class Value - , class Category + , class AccessCategory + , class TraversalCategory , class Reference = /* see below */ , class Difference = ptrdiff_t > @@ -485,7 +488,7 @@ Class template ``iterator_facade`` typedef Reference reference; typedef /* see description of operator-> */ pointer; typedef Difference difference_type; - typedef Category iterator_category; + typedef iterator_tag iterator_category; reference operator*() const; /* see below */ operator->() const; @@ -500,58 +503,58 @@ Class template ``iterator_facade`` }; // Comparison operators - template + template typename enable_if_interoperable::type // exposition - operator ==(iterator_facade const& lhs, - iterator_facade const& rhs); + operator ==(iterator_facade const& lhs, + iterator_facade const& rhs); - template + template typename enable_if_interoperable::type - operator !=(iterator_facade const& lhs, - iterator_facade const& rhs); + operator !=(iterator_facade const& lhs, + iterator_facade const& rhs); - template + template typename enable_if_interoperable::type - operator <(iterator_facade const& lhs, - iterator_facade const& rhs); + operator <(iterator_facade const& lhs, + iterator_facade const& rhs); - template + template typename enable_if_interoperable::type - operator <=(iterator_facade const& lhs, - iterator_facade const& rhs); + operator <=(iterator_facade const& lhs, + iterator_facade const& rhs); - template + template typename enable_if_interoperable::type - operator >(iterator_facade const& lhs, - iterator_facade const& rhs); + operator >(iterator_facade const& lhs, + iterator_facade const& rhs); - template + template typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); + operator >=(iterator_facade const& lhs, + iterator_facade const& rhs); - template + template typename enable_if_interoperable::type - operator >=(iterator_facade const& lhs, - iterator_facade const& rhs); + operator >=(iterator_facade const& lhs, + iterator_facade const& rhs); // Iterator difference - template + template typename enable_if_interoperable::type - operator -(iterator_facade const& lhs, - iterator_facade const& rhs); + operator -(iterator_facade const& lhs, + iterator_facade const& rhs); // Iterator addition - template - Derived operator+ (iterator_facade const&, + template + Derived operator+ (iterator_facade const&, typename Derived::difference_type n) @@ -877,16 +880,35 @@ following pseudo-code specifies the traits types for } else reference = Reference; - if (Category == use_default) - iterator_category = iterator_traits::iterator_category; - else - iterator_category = Category; - if (Distance == use_default) difference_type = iterator_traits::difference_type; else difference_type = Distance; + if (Category == use_default) + iterator_category = iterator_tag< + access_category< + iterator< iterator_traits::iterator_category, + Value, + Distance, + Value*, + Reference > >, + traversal_category< + iterator< iterator_traits::iterator_category, + Value, + Distance, + Value*, + Reference > > + else + iterator_category = Category; + + +.. Replaced with new semantics --thw + if (Category == use_default) + iterator_category = iterator_traits::iterator_category; + else + iterator_category = Category; + ``iterator_adaptor`` public operations