[#BloombergLP-bdlc-CompactedArray-operator_subs]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::operator&lsqb;&rsqb;
:relfileprefix: ../../../
:mrdocs:

Return a const reference to the element at `index`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
TYPE const&
operator&lsqb;&rsqb;(std::size&lowbar;t index) const;
----

== Description

Return a `const` reference to the element at the specified `index` in this array&period; The behavior is undefined unless `index &lt; length()`&period;

== Return Value

const reference to the element at `index`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *index*
| element index
|===


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