mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-29 04:17:32 +02:00
filled out some missing operator--, added a comment about the operations and concepts,
and added some text to the indirect iterator example [SVN r21629]
This commit is contained in:
@ -12,8 +12,11 @@
|
||||
counting_iterator(counting_iterator const& rhs);
|
||||
explicit counting_iterator(Incrementable x);
|
||||
Incrementable base() const;
|
||||
reference operator*() const;
|
||||
counting_iterator& operator++();
|
||||
counting_iterator& operator--();
|
||||
private:
|
||||
Incrementable current; // exposition
|
||||
Incrementable m_inc; // exposition
|
||||
};
|
||||
|
||||
|
||||
@ -61,6 +64,11 @@ required::
|
||||
``counting_iterator`` operations
|
||||
................................
|
||||
|
||||
In addition to the operations required by the concepts modeled by
|
||||
``counting_iterator``, ``counting_iterator`` provides the following
|
||||
operations.
|
||||
|
||||
|
||||
``counting_iterator();``
|
||||
|
||||
:Returns: A default constructed instance of ``counting_iterator``.
|
||||
@ -74,20 +82,27 @@ required::
|
||||
|
||||
``explicit counting_iterator(Incrementable x);``
|
||||
|
||||
:Returns: An instance of ``counting_iterator`` with ``current``
|
||||
:Returns: An instance of ``counting_iterator`` with ``m_inc``
|
||||
constructed from ``x``.
|
||||
|
||||
|
||||
``reference operator*() const;``
|
||||
|
||||
:Returns: ``current``
|
||||
:Returns: ``m_inc``
|
||||
|
||||
|
||||
``counting_iterator& operator++();``
|
||||
|
||||
:Effects: ``++current``
|
||||
|
||||
:Effects: ``++m_inc``
|
||||
:Returns: ``*this``
|
||||
|
||||
|
||||
``counting_iterator& operator--();``
|
||||
|
||||
:Effects: ``--m_inc``
|
||||
:Returns: ``*this``
|
||||
|
||||
|
||||
``Incrementable base() const;``
|
||||
|
||||
:Returns: ``current``
|
||||
:Returns: ``m_inc``
|
||||
|
Reference in New Issue
Block a user