[#BloombergLP-bdlc-PackedIntArrayConstIterator]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::PackedIntArrayConstIterator
:relfileprefix: ../../
:mrdocs:

This unconstrained (value&hyphen;semantic) class represents a random access iterator providing non&hyphen;modifiable access to the elements of a `PackedIntArray`&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;

== Synopsis

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

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

== Description

This class does not perform any bounds checking&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `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/PackedIntArrayConstIterator/difference_type.adoc[`difference&lowbar;type`] 
| Iterator difference type&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/pointer.adoc[`pointer`] 
| Iterator pointer type&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/reference.adoc[`reference`] 
| Iterator reference type&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/size_type.adoc[`size&lowbar;type`] 
| Iterator size type&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/value_type.adoc[`value&lowbar;type`] 
| Iterator value type&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/2constructor-00.adoc[`PackedIntArrayConstIterator`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/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/PackedIntArrayConstIterator/operator_star.adoc[`operator&ast;`] 
| Return the element value referenced by this iterator&period; The behavior is undefined unless for this iterator, referencing an element within a `PackedIntArray` `array`, `PackedIntArrayConstInterator() !&equals; &ast;this` and `&ast;this &hyphen; array&period;begin() &lt; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_plus.adoc[`operator&plus;`] 
| Return an iterator referencing the location at the specified `offset` from the element referenced by this iterator&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless `0 &lt;&equals; &ast;this &hyphen; array&period;begin() &plus; offset &lt;&equals; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_inc.adoc[`operator&plus;&plus;`] 
| Advance this iterator to refer to the next element in the referenced array and return a reference to this iterator _after_ the advancement&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless, on entry, `PackedIntArrayConstInterator() !&equals; &ast;this` and `&ast;this &hyphen; array&period;begin() &lt; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_plus_eq.adoc[`operator&plus;&equals;`] 
| Advance this iterator by the specified `offset` from the element referenced to this iterator&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless `PackedIntArrayConstInterator() !&equals; &ast;this` and `0 &lt;&equals; &ast;this &hyphen; array&period;begin() &plus; offset &lt;&equals; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_minus.adoc[`operator&hyphen;`] 
| Return an iterator referencing the location at the specified `offset` from the element referenced by this iterator&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless `PackedIntArrayConstInterator() !&equals; &ast;this` and `0 &lt;&equals; &ast;this &hyphen; array&period;begin() &hyphen; offset &lt;&equals; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_dec.adoc[`operator&hyphen;&hyphen;`] 
| Decrement this iterator to refer to the previous element in the referenced array and return a reference to this iterator _after_ the decrementation&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless, on entry, `0 &lt; &ast;this &hyphen; array&period;begin()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_minus_eq.adoc[`operator&hyphen;&equals;`] 
| Decrement this iterator by the specified `offset` from the element referenced to this iterator&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless `PackedIntArrayConstInterator() !&equals; &ast;this` and `0 &lt;&equals; &ast;this &hyphen; array&period;begin() &hyphen; offset &lt;&equals; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_ptr.adoc[`operator&hyphen;&gt;`] 
| Return the element value referenced by this iterator&period; The behavior is undefined unless for this iterator, referencing an element within a `PackedIntArray` `array`, `PackedIntArrayConstInterator() !&equals; &ast;this` and `&ast;this &hyphen; array&period;begin() &lt; array&period;length()`&period;
| xref:BloombergLP/bdlc/PackedIntArrayConstIterator/operator_subs.adoc[`operator&lsqb;&rsqb;`] 
| Return the element that is the specified `offset` from the element reference by this array&period; The behavior is undefined unless for this iterator, referencing an element within a `PackedIntArray` `array`, `PackedIntArrayConstInterator() !&equals; &ast;this` and `0 &lt;&equals; &ast;this &hyphen; array&period;begin() &plus; offset &lt; array&period;length()`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlc/operator_ge-0e.adoc[BloombergLP::bdlc::operator&gt;&equals;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_gt-0d.adoc[BloombergLP::bdlc::operator&gt;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_le-08.adoc[BloombergLP::bdlc::operator&lt;&equals;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_lt-02b.adoc[BloombergLP::bdlc::operator&lt;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_minus-05.adoc[BloombergLP::bdlc::operator&hyphen;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_not_eq-0a.adoc[BloombergLP::bdlc::operator!&equals;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_eq-06.adoc[BloombergLP::bdlc::operator&equals;&equals;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_dec-0b.adoc[BloombergLP::bdlc::operator&hyphen;&hyphen;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/operator_inc-06.adoc[BloombergLP::bdlc::operator&plus;&plus;&lt;&gt;]`
| 
| `xref:BloombergLP/bdlc/PackedIntArray-0b.adoc[BloombergLP::bdlc::PackedIntArray]`
| This space&hyphen;efficient value&hyphen;semantic array class represents a sequence of `TYPE` elements&semi; `TYPE` must be convertible to either a signed or unsigned 64&hyphen;bit integer using `static&lowbar;cast`&period; The interface provides functionality similar to a `vector&lt;int&gt;` however references to individual elements are not provided&period; This class provides accessors that return iterators that provide non&hyphen;modifiable access to its elements&period; The returned iterators, unlike those returned by a `vector&lt;int&gt;` are _not_ invalidated upon reallocation&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/operator_not_eq-02.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` iterators do not have the same value and `false` otherwise&period; Two `PackedIntArrayConstIterator` iterators do not have the same value if they do not refer to the same array, or do not have the same index&period;
| xref:BloombergLP/bdlc/operator_inc-01.adoc[`operator&plus;&plus;`]
| Advance the specified iterator `iter` to refer to the next element in the referenced array, and return an iterator referring to the original element (_before_ the advancement)&period; The returned iterator, `it`, referencing an element within a `PackedIntArray`, `array`, remains valid as long as `0 &lt;&equals; it &hyphen; array&period;begin() &lt;&equals; array&period;length()`&period; The behavior is undefined unless, on entry, `PackedIntArrayConstInterator() !&equals; iter` and `iter &hyphen; array&period;begin() &lt; array&period;length()`&period;
| xref:BloombergLP/bdlc/operator_minus-09.adoc[`operator&hyphen;`]
| Return the number of elements between specified `lhs` and `rhs`&period; The behavior is undefined unless `lhs` and `rhs` reference the same array&period;
| xref:BloombergLP/bdlc/operator_dec-06.adoc[`operator&hyphen;&hyphen;`]
| Post&hyphen;decrement the specified iterator `iter`&period;
| xref:BloombergLP/bdlc/operator_lt-02e.adoc[`operator&lt;`]
| Return true if `lhs` precedes `rhs` in the referenced array&period;
| xref:BloombergLP/bdlc/operator_le-06.adoc[`operator&lt;&equals;`]
| Return `true` if the specified `lhs` has a value less than or equal to the specified `rhs, `false&apos; otherwise&period; An iterator has a value less than or equal to another if its index is less or equal the other&apos;s index&period; The behavior is undefined unless `lhs` and `rhs` refer to the same array&period;
| xref:BloombergLP/bdlc/operator_eq-0a.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` iterators have the same value, and `false` otherwise&period; Two `PackedIntArrayConstIterator` iterators have the same value if they refer to the same array, and have the same index&period;
| xref:BloombergLP/bdlc/operator_gt-08.adoc[`operator&gt;`]
| Return true if `lhs` follows `rhs` in the referenced array&period;
| xref:BloombergLP/bdlc/operator_ge-00.adoc[`operator&gt;&equals;`]
| Return `true` if the specified `lhs` has a value greater or equal than the specified `rhs`, `false` otherwise&period; An iterator has a value greater than or equal to another if its index is greater the other&apos;s index&period; The behavior is undefined unless `lhs` and `rhs` refer to the same array&period;
|===


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