mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-21 16:42:09 +02:00
added requirements on the Base argument
[SVN r21635]
This commit is contained in:
@ -9,9 +9,9 @@
|
|||||||
template <
|
template <
|
||||||
class Derived
|
class Derived
|
||||||
, class Base
|
, class Base
|
||||||
, class Value = use_default
|
, class Value = use_default
|
||||||
, class CategoryOrTraversal = use_default
|
, class CategoryOrTraversal = use_default
|
||||||
, class Reference = use_default
|
, class Reference = use_default
|
||||||
, class Difference = use_default
|
, class Difference = use_default
|
||||||
>
|
>
|
||||||
class iterator_adaptor
|
class iterator_adaptor
|
||||||
@ -47,7 +47,19 @@
|
|||||||
Base m_iterator; // exposition only
|
Base m_iterator; // exposition only
|
||||||
};
|
};
|
||||||
|
|
||||||
__ base_parameters_
|
|
||||||
|
__ requirements_
|
||||||
|
|
||||||
|
.. _requirements:
|
||||||
|
|
||||||
|
``iterator_adaptor`` requirements
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
The ``Derived`` template argument must be a publicly derived from
|
||||||
|
``iterator_adaptor``.
|
||||||
|
|
||||||
|
The ``Base`` argument shall be Assignable and Copy Constructible.
|
||||||
|
|
||||||
|
|
||||||
.. _base_parameters:
|
.. _base_parameters:
|
||||||
|
|
||||||
@ -83,18 +95,17 @@ above are defined as follows:
|
|||||||
else
|
else
|
||||||
return Difference
|
return Difference
|
||||||
|
|
||||||
``iterator_adaptor`` usage
|
``iterator_adaptor`` models
|
||||||
--------------------------
|
---------------------------
|
||||||
|
|
||||||
The ``Derived`` template parameter must be a publicly derived from
|
In order for ``Derived`` to model the iterator concepts corresponding
|
||||||
``iterator_adaptor``. In order for ``Derived`` to model the
|
to ``iterator_traits<Derived>::iterator_category``, the expressions
|
||||||
iterator concepts corresponding to
|
involving ``m_iterator`` in the specifications of those private member
|
||||||
``iterator_traits<Derived>::iterator_category``, the expressions
|
functions of ``iterator_adaptor`` that may be called by
|
||||||
involving ``m_iterator`` in the specifications of those private
|
``iterator_facade<Derived, V, C, R, D>`` in evaluating any valid
|
||||||
member functions of ``iterator_adaptor`` that may be called by
|
expression involving ``Derived`` in those concepts' requirements.
|
||||||
``iterator_facade<Derived, V, C, R, D>``
|
|
||||||
in evaluating any valid expression involving ``Derived``
|
.. The above is confusing and needs a rewrite. -JGS
|
||||||
in those concepts' requirements.
|
|
||||||
|
|
||||||
``iterator_adaptor`` public operations
|
``iterator_adaptor`` public operations
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
Reference in New Issue
Block a user