mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-31 21:34:38 +02:00
Updated pointee and indirect_reference so that pointee represents the
immutability of the pointed-to type via const qualification. The pointee of a proxy-based iterator will be const qualified unless a mutable reference to the value_type can be bound to the returned proxy. Added a test for pointee Fixed iterator_facade so operator[] result type computation didn't cause a problem with abstract types. Updated iterator_facade operator[] docs for accuracy. Allowed Borland to simply fail the indirect_iterator_member_types test because of its lame const-dropping, instead of trying to work around it. [SVN r21579]
This commit is contained in:
@@ -245,10 +245,13 @@ __ `operator arrow`_
|
||||
|
||||
*unspecified* ``operator[](difference_type n) const;``
|
||||
|
||||
:Returns: an object convertible to ``reference`` and holding a copy
|
||||
*p* of ``*static_cast<Derived const*>(this) + n`` such that, for a constant object ``v`` of type
|
||||
``value_type``, ``(*static_cast<Derived const*>(this))[n] = v`` is equivalent
|
||||
to ``p = v``.
|
||||
:Returns: an object convertible to ``value_type``. For constant
|
||||
objects ``v`` of type ``value_type``, and ``n`` of type
|
||||
``difference_type``, and reference ``p`` equal to
|
||||
``*static_cast<Derived const*>(this)``, ``(*this)[n] = v`` is
|
||||
equivalent to ``*(p+ n) = v``, and ``static_cast<value_type
|
||||
const&>((*this)[n])`` is equivalent to
|
||||
``static_cast<value_type const&>(*(p+n))``
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user