[#BloombergLP-bdlc-CompactedArray_ConstIterator] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::CompactedArray_ConstIterator :relfileprefix: ../../ :mrdocs: Random‐access const iterator over a `CompactedArray`. == Synopsis Declared in `<bdlc_compactedarray.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class CompactedArray_ConstIterator; ---- == Description This value‐semantic class represents a random access iterator providing non‐modifiable access to the elements of a `CompactedArray`. 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_iterator`. This class does not perform any bounds checking. Any iterator, `it`, referencing a `CompactedArray` `array`, remains valid while `0 <= it ‐ array.begin() < array.length()`. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/difference_type.adoc[`difference_type`] | Signed type used for distances between iterators. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/iterator_category.adoc[`iterator_category`] | Tag identifying this type as a random‐access iterator. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/pointer.adoc[`pointer`] | Pointer into the array (unused; always `TYPE *`). | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/reference.adoc[`reference`] | Reference to an element (unused; always `TYPE&`). | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/size_type.adoc[`size_type`] | Unsigned type used for lengths and indices. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/value_type.adoc[`value_type`] | Element type of the referenced array. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/2constructor-08.adoc[`CompactedArray_ConstIterator`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_assign.adoc[`operator=`] | Assign to this iterator the value of the specified `rhs` iterator, and return a reference providing modifiable access to this iterator. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_star.adoc[`operator*`] | Return a const reference to the element referenced by this iterator. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_inc.adoc[`operator++`] | Advance this iterator and return a reference to it. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_plus_eq.adoc[`operator+=`] | Advance this iterator by the specified `offset`. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_dec.adoc[`operator‐‐`] | Decrement this iterator and return a reference to it. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_minus_eq.adoc[`operator‐=`] | Decrement this iterator by the specified `offset`. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_ptr.adoc[`operator‐>`] | Return a const reference to the element referenced by this iterator. | xref:BloombergLP/bdlc/CompactedArray_ConstIterator/operator_subs.adoc[`operator[]`] | Return a const reference to the element at the specified `offset`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlc/operator_ge-06.adoc[BloombergLP::bdlc::operator>=]` | Return whether the left iterator follows or equals the right (see free `operator>=`). | `xref:BloombergLP/bdlc/operator_gt-05.adoc[BloombergLP::bdlc::operator>]` | Return whether the left iterator follows the right (see free `operator>`). | `xref:BloombergLP/bdlc/operator_le-04.adoc[BloombergLP::bdlc::operator<=]` | Return whether the left iterator precedes or equals the right (see free `operator<=`). | `xref:BloombergLP/bdlc/operator_lt-03.adoc[BloombergLP::bdlc::operator<]` | Return whether the left iterator precedes the right (see free `operator<`). | `xref:BloombergLP/bdlc/operator_minus-0af.adoc[BloombergLP::bdlc::operator‐]` | Return the signed distance between two iterators (see free `operator‐`). | `xref:BloombergLP/bdlc/operator_minus-01.adoc[BloombergLP::bdlc::operator‐]` | Return an iterator at the negated specified offset from the given iterator (see free `operator‐`). | `xref:BloombergLP/bdlc/operator_plus-0c.adoc[BloombergLP::bdlc::operator+<>]` | Return an iterator at the specified offset from the given iterator (see free `operator+`). | `xref:BloombergLP/bdlc/operator_not_eq-01b.adoc[BloombergLP::bdlc::operator!=]` | Return whether the iterators refer to different positions (see free `operator!=`). | `xref:BloombergLP/bdlc/operator_eq-091.adoc[BloombergLP::bdlc::operator==]` | Return whether the iterators refer to the same position (see free `operator==`). | `xref:BloombergLP/bdlc/operator_dec-0d4.adoc[BloombergLP::bdlc::operator‐‐]` | Decrement `iterator` and return its prior value (see free `operator‐‐`). | `xref:BloombergLP/bdlc/operator_inc-0b.adoc[BloombergLP::bdlc::operator++]` | Advance `iterator` and return its prior value (see free `operator++`). | `xref:BloombergLP/bdlc/CompactedArray.adoc[BloombergLP::bdlc::CompactedArray]` | Space‐efficient value‐semantic array of `TYPE` elements. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlc/operator_not_eq-047d.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` iterators differ. | xref:BloombergLP/bdlc/operator_plus-03.adoc[`operator+`] | Return an iterator at the specified `offset` from `iterator`. | xref:BloombergLP/bdlc/operator_plus-07.adoc[`operator+`] | Return an iterator at the specified `offset` from `iterator`. | xref:BloombergLP/bdlc/operator_inc-07.adoc[`operator++`] | Advance `iterator` and return its prior value. | xref:BloombergLP/bdlc/operator_minus-03.adoc[`operator‐`] | Return an iterator at the negated specified `offset` from `iterator`. | xref:BloombergLP/bdlc/operator_minus-08.adoc[`operator‐`] | Return the signed distance between the specified `lhs` and `rhs`. | xref:BloombergLP/bdlc/operator_dec-0dd.adoc[`operator‐‐`] | Decrement `iterator` and return its prior value. | xref:BloombergLP/bdlc/operator_lt-0a6.adoc[`operator<`] | Return `true` if `lhs` is less than `rhs`. | xref:BloombergLP/bdlc/operator_le-0b.adoc[`operator<=`] | Return `true` if `lhs` is less than or equal to `rhs`. | xref:BloombergLP/bdlc/operator_eq-0e8.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` iterators are equal. | xref:BloombergLP/bdlc/operator_gt-04.adoc[`operator>`] | Return `true` if `lhs` is greater than `rhs`. | xref:BloombergLP/bdlc/operator_ge-0c.adoc[`operator>=`] | Return `true` if `lhs` is greater than or equal to `rhs`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#