[#BloombergLP-bdlc-CompactedArray-operator_subs] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::operator[] :relfileprefix: ../../../ :mrdocs: Return a const reference to the element at `index`. == Synopsis Declared in `<bdlc_compactedarray.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- TYPE const& operator[](std::size_t index) const; ---- == Description Return a `const` reference to the element at the specified `index` in this array. The behavior is undefined unless `index < length()`. == 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]#