[#BloombergLP-bdlc-CompactedArray_ConstIterator]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::CompactedArray&lowbar;ConstIterator
:relfileprefix: ../../
:mrdocs:

Random&hyphen;access const iterator over a `CompactedArray`&period;

== Synopsis

Declared in `&lt;bdlc&lowbar;compactedarray&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class CompactedArray&lowbar;ConstIterator;
----

== Description

This value&hyphen;semantic class represents a random access iterator providing non&hyphen;modifiable access to the elements of a `CompactedArray`&period; This class provides all functionality of a random access iterator, as defined by the standard, but is _not_ compatible with most standard methods requiring a bidirectional `const&lowbar;iterator`&period;

This class does not perform any bounds checking&period; Any iterator, `it`, referencing a `CompactedArray` `array`, remains valid while `0 &lt;&equals; it &hyphen; array&period;begin() &lt; array&period;length()`&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/difference_type.adoc[`difference&lowbar;type`] 
| Signed type used for distances between iterators&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/iterator_category.adoc[`iterator&lowbar;category`] 
| Tag identifying this type as a random&hyphen;access iterator&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/pointer.adoc[`pointer`] 
| Pointer into the array (unused&semi; always `TYPE &ast;`)&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/reference.adoc[`reference`] 
| Reference to an element (unused&semi; always `TYPE&amp;`)&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/size_type.adoc[`size&lowbar;type`] 
| Unsigned type used for lengths and indices&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/value_type.adoc[`value&lowbar;type`] 
| Element type of the referenced array&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/2constructor-08.adoc[`CompactedArray&lowbar;ConstIterator`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_assign.adoc[`operator&equals;`] 
| Assign to this iterator the value of the specified `rhs` iterator, and return a reference providing modifiable access to this iterator&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_star.adoc[`operator&ast;`] 
| Return a const reference to the element referenced by this iterator&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_inc.adoc[`operator&plus;&plus;`] 
| Advance this iterator and return a reference to it&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_plus_eq.adoc[`operator&plus;&equals;`] 
| Advance this iterator by the specified `offset`&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_dec.adoc[`operator&hyphen;&hyphen;`] 
| Decrement this iterator and return a reference to it&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_minus_eq.adoc[`operator&hyphen;&equals;`] 
| Decrement this iterator by the specified `offset`&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_ptr.adoc[`operator&hyphen;&gt;`] 
| Return a const reference to the element referenced by this iterator&period;
| xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_subs.adoc[`operator&lsqb;&rsqb;`] 
| Return a const reference to the element at the specified `offset`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlc/operator_ge-06.adoc[BloombergLP::bdlc::operator&gt;&equals;]`
| Return whether the left iterator follows or equals the right (see free `operator&gt;&equals;`)&period;
| `xref:BloombergLP/bdlc/operator_gt-05.adoc[BloombergLP::bdlc::operator&gt;]`
| Return whether the left iterator follows the right (see free `operator&gt;`)&period;
| `xref:BloombergLP/bdlc/operator_le-04.adoc[BloombergLP::bdlc::operator&lt;&equals;]`
| Return whether the left iterator precedes or equals the right (see free `operator&lt;&equals;`)&period;
| `xref:BloombergLP/bdlc/operator_lt-03.adoc[BloombergLP::bdlc::operator&lt;]`
| Return whether the left iterator precedes the right (see free `operator&lt;`)&period;
| `xref:BloombergLP/bdlc/operator_minus-0af.adoc[BloombergLP::bdlc::operator&hyphen;]`
| Return the signed distance between two iterators (see free `operator&hyphen;`)&period;
| `xref:BloombergLP/bdlc/operator_minus-01.adoc[BloombergLP::bdlc::operator&hyphen;]`
| Return an iterator at the negated specified offset from the given iterator (see free `operator&hyphen;`)&period;
| `xref:BloombergLP/bdlc/operator_plus-0c.adoc[BloombergLP::bdlc::operator&plus;&lt;&gt;]`
| Return an iterator at the specified offset from the given iterator (see free `operator&plus;`)&period;
| `xref:BloombergLP/bdlc/operator_not_eq-01b.adoc[BloombergLP::bdlc::operator!&equals;]`
| Return whether the iterators refer to different positions (see free `operator!&equals;`)&period;
| `xref:BloombergLP/bdlc/operator_eq-091.adoc[BloombergLP::bdlc::operator&equals;&equals;]`
| Return whether the iterators refer to the same position (see free `operator&equals;&equals;`)&period;
| `xref:BloombergLP/bdlc/operator_dec-0d4.adoc[BloombergLP::bdlc::operator&hyphen;&hyphen;]`
| Decrement `iterator` and return its prior value (see free `operator&hyphen;&hyphen;`)&period;
| `xref:BloombergLP/bdlc/operator_inc-0b.adoc[BloombergLP::bdlc::operator&plus;&plus;]`
| Advance `iterator` and return its prior value (see free `operator&plus;&plus;`)&period;
| `xref:BloombergLP/bdlc/CompactedArray.adoc[BloombergLP::bdlc::CompactedArray]`
| Space&hyphen;efficient value&hyphen;semantic array of `TYPE` elements&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/operator_not_eq-047d.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` iterators differ&period;
| xref:BloombergLP/bdlc/operator_plus-03.adoc[`operator&plus;`]
| Return an iterator at the specified `offset` from `iterator`&period;
| xref:BloombergLP/bdlc/operator_plus-07.adoc[`operator&plus;`]
| Return an iterator at the specified `offset` from `iterator`&period;
| xref:BloombergLP/bdlc/operator_inc-07.adoc[`operator&plus;&plus;`]
| Advance `iterator` and return its prior value&period;
| xref:BloombergLP/bdlc/operator_minus-03.adoc[`operator&hyphen;`]
| Return an iterator at the negated specified `offset` from `iterator`&period;
| xref:BloombergLP/bdlc/operator_minus-08.adoc[`operator&hyphen;`]
| Return the signed distance between the specified `lhs` and `rhs`&period;
| xref:BloombergLP/bdlc/operator_dec-0dd.adoc[`operator&hyphen;&hyphen;`]
| Decrement `iterator` and return its prior value&period;
| xref:BloombergLP/bdlc/operator_lt-0a6.adoc[`operator&lt;`]
| Return `true` if `lhs` is less than `rhs`&period;
| xref:BloombergLP/bdlc/operator_le-0b.adoc[`operator&lt;&equals;`]
| Return `true` if `lhs` is less than or equal to `rhs`&period;
| xref:BloombergLP/bdlc/operator_eq-0e8.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` iterators are equal&period;
| xref:BloombergLP/bdlc/operator_gt-04.adoc[`operator&gt;`]
| Return `true` if `lhs` is greater than `rhs`&period;
| xref:BloombergLP/bdlc/operator_ge-0c.adoc[`operator&gt;&equals;`]
| Return `true` if `lhs` is greater than or equal to `rhs`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
